diff --git a/.vs/WinformGeneralDeveloperFrame/v16/.suo b/.vs/WinformGeneralDeveloperFrame/v16/.suo index 993644f..8128a31 100644 Binary files a/.vs/WinformGeneralDeveloperFrame/v16/.suo and b/.vs/WinformGeneralDeveloperFrame/v16/.suo differ diff --git a/WinformGeneralDeveloperFrame.Commons/ExtensionMethod.cs b/WinformGeneralDeveloperFrame.Commons/ExtensionMethod.cs index 95be363..486bff3 100644 --- a/WinformGeneralDeveloperFrame.Commons/ExtensionMethod.cs +++ b/WinformGeneralDeveloperFrame.Commons/ExtensionMethod.cs @@ -445,5 +445,12 @@ namespace WinformGeneralDeveloperFrame.Commons } return ts; } + public static string GetDateTimeCode(this DateTime dt) + { + return DateTime.Now.Year + DateTime.Now.Month.ToString("D2") + DateTime.Now.Day.ToString("D2") + + DateTime.Now.Hour.ToString("D2") + + DateTime.Now.Minute.ToString("D2") + DateTime.Now.Second.ToString("D2") + + DateTime.Now.Millisecond.ToString("D3"); + } } } diff --git a/WinformGeneralDeveloperFrame/DB/MESDB.cs b/WinformGeneralDeveloperFrame/DB/MESDB.cs index 3e40900..7e3291f 100644 --- a/WinformGeneralDeveloperFrame/DB/MESDB.cs +++ b/WinformGeneralDeveloperFrame/DB/MESDB.cs @@ -60,5 +60,12 @@ namespace MES public virtual DbSet buyerInfo { get; set; } public virtual DbSet buyerdetailInfo { get; set; } + + public virtual DbSet buyerreturnInfo { get; set; } + + public virtual DbSet buyerreturndetailInfo { get; set; } + + public virtual DbSet workorderInfo { get; set; } + } } \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/buyerdetailInfo.cs b/WinformGeneralDeveloperFrame/Entity/buyerdetailInfo.cs index 280d910..a14d6aa 100644 --- a/WinformGeneralDeveloperFrame/Entity/buyerdetailInfo.cs +++ b/WinformGeneralDeveloperFrame/Entity/buyerdetailInfo.cs @@ -71,5 +71,7 @@ namespace MES.Entity ///明细号 [ModelBindControl("txtbuyerdetailcode")] public string buyerdetailcode { set; get; } + + } } \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/buyerreturnInfo.cs b/WinformGeneralDeveloperFrame/Entity/buyerreturnInfo.cs new file mode 100644 index 0000000..b1acfe1 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Entity/buyerreturnInfo.cs @@ -0,0 +1,40 @@ +using WinformGeneralDeveloperFrame.Commons; + +namespace MES.Entity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + using System.Data.Entity.Spatial; + + [Table("buyerreturn")] + public partial class buyerreturnInfo + { + ///id + [ModelBindControl("txtid")] + public int id{set;get;} + ///退货日期 + [ModelBindControl("txtreturndate")] + public DateTime returndate{set;get;}=DateTime.Now; + ///供应商编号 + [ModelBindControl("txtsuppliercode")] + public string suppliercode{set;get;} + ///供应商名称 + [ModelBindControl("txtsupplierid")] + public int supplierid{set;get;} + ///制单人 + [ModelBindControl("txtcreatorId")] + public int creatorId{set;get;} + ///采购退货单号 + [ModelBindControl("txtreturnbuyercode")] + public string returnbuyercode{set;get;} + ///金额 + [ModelBindControl("txttotalprice")] + public decimal totalprice{set;get;} + ///备注 + [ModelBindControl("txtremark")] + public string remark{set;get;} + + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/buyerreturndetailInfo.cs b/WinformGeneralDeveloperFrame/Entity/buyerreturndetailInfo.cs new file mode 100644 index 0000000..aedaeb7 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Entity/buyerreturndetailInfo.cs @@ -0,0 +1,58 @@ +using WinformGeneralDeveloperFrame.Commons; + +namespace MES.Entity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + using System.Data.Entity.Spatial; + + [Table("buyerreturndetail")] + public partial class buyerreturndetailInfo + { + ///id + [ModelBindControl("txtid")] + public int id{set;get;} + ///采购明细单号 + [ModelBindControl("txtbuyerdetailcode")] + public string buyerdetailcode{set;get;} + ///采购单号 + [ModelBindControl("txtbuyercode")] + public string buyercode{set;get;} + ///物料编码 + [ModelBindControl("txtmaterialcode")] + public string materialcode{set;get;} + ///物料名称 + [ModelBindControl("txtmaterialid")] + public int materialid{set;get;} + ///规格型号 + [ModelBindControl("txtmaterialspec")] + public string materialspec{set;get;} + ///退货数量 + [ModelBindControl("txtreturnnumber")] + public decimal returnnumber{set;get;} + ///计量单位 + [ModelBindControl("txtunit")] + public int unit{set;get;} + ///采购单价 + [ModelBindControl("txtunitprice")] + public decimal unitprice{set;get;} + ///金额 + [ModelBindControl("txtmoney")] + public decimal money{set;get;} + ///仓库 + [ModelBindControl("txtwarehouse")] + public int warehouse{set;get;} + ///退货单号 + [ModelBindControl("txtreturnbuyercode")] + public string returnbuyercode{set;get;} + ///退货明细单号 + [ModelBindControl("txtreturnbuyerdetailcode")] + public string returnbuyerdetailcode{set;get;} + ///备注 + [ModelBindControl("txtremark")] + public string remark{set;get;} + public int buyerreturnid { set; get; } + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/workorderInfo.cs b/WinformGeneralDeveloperFrame/Entity/workorderInfo.cs new file mode 100644 index 0000000..cb92653 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Entity/workorderInfo.cs @@ -0,0 +1,70 @@ +using WinformGeneralDeveloperFrame.Commons; + +namespace MES.Entity +{ + using System; + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + using System.Data.Entity.Spatial; + + [Table("workorder")] + public partial class workorderInfo + { + ///id + [ModelBindControl("txtid")] + public int id{set;get;} + ///工单号 + [ModelBindControl("txtwordordercode")] + public string wordordercode{set;get;} + ///销售单号 + [ModelBindControl("txtsalecode")] + public string salecode{set;get;} + ///销售明细单号 + [ModelBindControl("txtsaledetailcode")] + public string saledetailcode{set;get;} + ///工单类型 + [ModelBindControl("txtworkordertype")] + public int workordertype{set;get;} + ///生产日期 + [ModelBindControl("txtproductdate")] + public DateTime productdate{set;get;}=DateTime.Now; + ///生产单位 + [ModelBindControl("txtproductdept")] + public int productdept{set;get;} + ///产品编号 + [ModelBindControl("txtproductcode")] + public string productcode{set;get;} + ///产品名称 + [ModelBindControl("txtproductid")] + public int productid{set;get;} + ///规格型号 + [ModelBindControl("txtspec")] + public string spec{set;get;} + ///生产数量 + [ModelBindControl("txtproductnumber")] + public decimal productnumber{set;get;} + ///计量单位 + [ModelBindControl("txtunit")] + public int unit{set;get;} + ///完工日期 + [ModelBindControl("txtfinishdate")] + public DateTime finishdate{set;get;}=DateTime.Now; + ///交货日期 + [ModelBindControl("txtdeliverdate")] + public DateTime deliverdate{set;get;}=DateTime.Now; + ///仓库 + [ModelBindControl("txtwarehouse")] + public int warehouse{set;get;} + ///制单人 + [ModelBindControl("txtcreatorId")] + public int creatorId{set;get;} + ///制单日期 + [ModelBindControl("txtcreateTime")] + public DateTime createTime{set;get;}=DateTime.Now; + ///备注 + [ModelBindControl("txtremark")] + public string remark{set;get;} + + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/Frmbuyer.cs b/WinformGeneralDeveloperFrame/Form/Frmbuyer.cs index 8792c88..76a2f1a 100644 --- a/WinformGeneralDeveloperFrame/Form/Frmbuyer.cs +++ b/WinformGeneralDeveloperFrame/Form/Frmbuyer.cs @@ -12,26 +12,32 @@ using DevExpress.XtraLayout; using MES.Entity; using System.Data.Entity.Migrations; using System.Data.Entity; +using CCWin.SkinClass; +using CCWin.SkinControl; + namespace MES.Form { - public partial class Frmbuyer : FrmBaseForm - { + public partial class Frmbuyer : FrmBaseForm + { private Dictionary fieldDictionary = new Dictionary(); - public Frmbuyer() - { - InitializeComponent(); - } - private void Frmbuyer_Load(object sender, EventArgs e) + + public Frmbuyer() { - InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new buyerInfo(),gridControl1,new []{ "txtbuyercode", "txttotalprice" }); + InitializeComponent(); + } + + private void Frmbuyer_Load(object sender, EventArgs e) + { + InitFrom(xtraTabControl1, grdList, grdListView, new LayoutControlGroup[] {layoutControlGroup1}, + new buyerInfo(), gridControl1, new[] {"txtbuyercode", "txttotalprice"}); InitSearchDicData(); repositoryItemTextEditrequisitioncode.KeyDown += RepositoryItemTextEditrequisitioncode_KeyDown; txtsupplierid.EditValueChanged += Txtsupplierid_EditValueChanged; - } + } private void Txtsupplierid_EditValueChanged(object sender, EventArgs e) { - using (var db=new MESDB()) + using (var db = new MESDB()) { supplierInfo supplier = db.supplierInfo.Find(txtsupplierid.EditValue); txtsuppliercode.Text = supplier.suppliercode; @@ -74,83 +80,92 @@ namespace MES.Form /// /// private void Init() - { - txtsupplierid.Properties.DataSource = GetDataTableUtils.SqlTable("供应商"); - repositoryItemtxtsupplierid.DataSource= GetDataTableUtils.SqlTable("物料"); - txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户"); - repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户"); + { + txtsupplierid.Properties.DataSource = GetDataTableUtils.SqlTable("供应商"); + repositoryItemtxtsupplierid.DataSource = GetDataTableUtils.SqlTable("物料"); + txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户"); + repositoryItemtxtcreatorId.DataSource = GetDataTableUtils.SqlTable("用户"); repositoryItemLookUpEditmaterialid.DataSource = GetDataTableUtils.SqlTable("物料"); repositoryItemLookUpEditmaterialunit.DataSource = GetDataTableUtils.SqlTable("计量单位"); repositoryItemLookUpEditwarehouse.DataSource = GetDataTableUtils.SqlTable("仓库"); } + /// - /// 搜索字段 - /// - /// + /// 搜索字段 + /// + /// private void InitSearchDicData() { - fieldDictionary.Add("id","id"); - fieldDictionary.Add("采购单号","buyercode"); - fieldDictionary.Add("采购日期","buyerdate"); - fieldDictionary.Add("供应商","supplierid"); - fieldDictionary.Add("供应商编码","suppliercode"); - fieldDictionary.Add("完货日期","deliverdate"); - fieldDictionary.Add("制单人","creatorId"); - fieldDictionary.Add("金额","totalprice"); - fieldDictionary.Add("备注","remark"); + fieldDictionary.Add("id", "id"); + fieldDictionary.Add("采购单号", "buyercode"); + fieldDictionary.Add("采购日期", "buyerdate"); + fieldDictionary.Add("供应商", "supplierid"); + fieldDictionary.Add("供应商编码", "suppliercode"); + fieldDictionary.Add("完货日期", "deliverdate"); + fieldDictionary.Add("制单人", "creatorId"); + fieldDictionary.Add("金额", "totalprice"); + fieldDictionary.Add("备注", "remark"); } - public override void InitgrdListDataSource() + public override void InitgrdListDataSource() { - using (var con=new MESDB())/// + using (var con = new MESDB()) /// { - grdList.DataSource=con.buyerInfo.ToList(); + grdList.DataSource = con.buyerInfo.ToList(); } + Init(); - } - /// - /// 字段为空校验 - /// - /// + } + + /// + /// 字段为空校验 + /// + /// public override bool CheckInput() { - if(string.IsNullOrEmpty(txtbuyerdate.ToString())) - { - "采购日期不能为空".ShowWarning(); - txtbuyerdate.Focus(); - return false; - } - if(string.IsNullOrEmpty(txtsupplierid.EditValue.ToString())) - { - "供应商不能为空".ShowWarning(); - txtsupplierid.Focus(); - return false; - } - if(string.IsNullOrEmpty(txtsuppliercode.EditValue.ToString())) - { - "供应商编码不能为空".ShowWarning(); - txtsuppliercode.Focus(); - return false; - } - if(string.IsNullOrEmpty(txtdeliverdate.EditValue.ToString())) - { - "完货日期不能为空".ShowWarning(); - txtdeliverdate.Focus(); - return false; - } - if(string.IsNullOrEmpty(txtcreatorId.EditValue.ToString())) - { - "制单人不能为空".ShowWarning(); - txtcreatorId.Focus(); - return false; - } - if(string.IsNullOrEmpty(txttotalprice.EditValue.ToString())) - { - "金额不能为空".ShowWarning(); - txttotalprice.Focus(); - return false; - } - return true; + if (string.IsNullOrEmpty(txtbuyerdate.ToString())) + { + "采购日期不能为空".ShowWarning(); + txtbuyerdate.Focus(); + return false; + } + + if (string.IsNullOrEmpty(txtsupplierid.EditValue.ToString())) + { + "供应商不能为空".ShowWarning(); + txtsupplierid.Focus(); + return false; + } + + if (string.IsNullOrEmpty(txtsuppliercode.EditValue.ToString())) + { + "供应商编码不能为空".ShowWarning(); + txtsuppliercode.Focus(); + return false; + } + + if (string.IsNullOrEmpty(txtdeliverdate.EditValue.ToString())) + { + "完货日期不能为空".ShowWarning(); + txtdeliverdate.Focus(); + return false; + } + + if (string.IsNullOrEmpty(txtcreatorId.EditValue.ToString())) + { + "制单人不能为空".ShowWarning(); + txtcreatorId.Focus(); + return false; + } + + if (string.IsNullOrEmpty(txttotalprice.EditValue.ToString())) + { + "金额不能为空".ShowWarning(); + txttotalprice.Focus(); + return false; + } + + return true; } public override void AddFunction() @@ -159,17 +174,120 @@ namespace MES.Form } /// - /// 保存 - /// - /// - public override bool SaveFunction() + /// 保存 + /// + /// + public override bool SaveFunction() + { + string code = "CG" + DateTime.Now.GetDateTimeCode(); + + DataTable dt = gridControl1.DataSource as DataTable; + try + { + buyerInfo info = (buyerInfo) this.ControlDataToModel(new buyerInfo()); + using (var db = new MESDB()) + { + using (var tran = db.Database.BeginTransaction()) + { + try + { + Dictionary> dic = + dt.GetDataTableData(); + if (info.id == 0) //新增 + { + info.buyercode = code; + db.buyerInfo.Add(info); + db.SaveChanges(); + txtid.Text = info.id.ToString(); + txtbuyercode.Text = code; + if (dt != null) + { + List detaiListAdd = + dic["Add"]; + int num = 0; + detaiListAdd.ForEach(a => + { + num++; + string codedetail = "SDD" + DateTime.Now.GetDateTimeCode() + num; + a.buyercode = info.buyercode; + a.buyerid = info.id; + a.buyerdetailcode = codedetail; + }); + db.buyerdetailInfo.AddRange(detaiListAdd); + db.SaveChanges(); + } + } + else //更新 + { + db.Entry(info).State = EntityState.Modified; + db.SaveChanges(); + if (dt != null) + { + List detaiListAdd = + dic["Add"]; + int num = 0; + detaiListAdd.ForEach(a => + { + a.buyercode = info.buyercode; + a.buyerid = info.id; + num++; + string codedetail = "SDD" + DateTime.Now.GetDateTimeCode() + num; + a.buyerdetailcode = codedetail; + }); + db.buyerdetailInfo.AddRange(detaiListAdd); + + List detaiListEdit = + dic["Edit"]; + + detaiListEdit.ForEach((a) => + { + a.buyercode = info.buyercode; + db.Entry(a).State = EntityState.Modified; + }); + + List detaiListDel = + dic["Del"]; + detaiListDel.ForEach((a) => { db.Entry(a).State = EntityState.Deleted; }); + db.SaveChanges(); + } + } + + tran.Commit(); + } + catch (Exception ex) + { + tran.Rollback(); + ex.Message.ShowError(); + return false; + } + finally + { + tran.Dispose(); + } + } + } + } + catch (Exception ex) + { + ex.Message.ShowError(); + return false; + } + + return true; + } + + /// + /// 删除 + /// + /// + public override bool DelFunction() { try { - buyerInfo info= (buyerInfo)this.ControlDataToModel(new buyerInfo()); + buyerInfo info = (buyerInfo) this.ControlDataToModel(new buyerInfo()); using (var db = new MESDB()) { - db.buyerInfo.AddOrUpdate(info); + db.Entry(info).State = EntityState.Deleted; db.SaveChanges(); } } @@ -178,38 +296,18 @@ namespace MES.Form ex.Message.ShowError(); return false; } + return true; } + /// - /// 删除 - /// - /// - public override bool DelFunction() - { - try - { - buyerInfo info = (buyerInfo)this.ControlDataToModel(new buyerInfo()); - using (var db = new MESDB()) - { - db.Entry(info).State=EntityState.Deleted; - db.SaveChanges(); - } - } - catch (Exception ex) - { - ex.Message.ShowError(); - return false; - } - return true; - } - /// - /// 搜索 - /// - /// + /// 搜索 + /// + /// public override void SearchFunction() { FrmSearch frm = new FrmSearch(fieldDictionary); - if (frm.ShowDialog()==DialogResult.OK) + if (frm.ShowDialog() == DialogResult.OK) { string sql = frm.sql; using (var db = new MESDB()) @@ -226,6 +324,19 @@ namespace MES.Form } } + public override void gridControlMouseDoubleClickFunction(object sender, EventArgs e) + { + buyerInfo info = grdListView.GetFocusedRow() as buyerInfo; + if (info != null) + { + using (var db = new MESDB()) + { + gridControl1.DataSource = db.buyerdetailInfo.Where(p => p.buyerid == info.id).ToList().ToDataTable(); + gridView1.BestFitColumns(); + } + } + } + private void toolStripMenuItemAdd_Click(object sender, EventArgs e) { gridView1.AddNewRow(); @@ -235,5 +346,37 @@ namespace MES.Form { gridView1.DeleteRow(gridView1.FocusedRowHandle); } + + private void gridView1_ValidateRow(object sender, DevExpress.XtraGrid.Views.Base.ValidateRowEventArgs e) + { + //gridControl1.RefreshDataSource(); + //DataTable dt=gridControl1.DataSource as DataTable; ; + //decimal total = 0; + //foreach (DataRow row in dt.Rows) + //{ + // total += row.ItemArray[10].ToDecimal(0); + //} + //txttotalprice.Text = total.ToString(); + } + + private void gridControl1_Validated(object sender, EventArgs e) + { + DataTable dt = gridControl1.DataSource as DataTable; ; + decimal total = 0; + foreach (DataRow row in dt.Rows) + { + total += row.ItemArray[10].ToDecimal(0); + } + txttotalprice.Text = total.ToString(); + } + + private void gridView1_ValidateRow_1(object sender, DevExpress.XtraGrid.Views.Base.ValidateRowEventArgs e) + { + if (gridView1.GetFocusedDataRow()["money"].ToString().IsNullOrEmpty()) + { + e.Valid = false; + e.ErrorText = "请输入请购明细单号"; + } + } } } \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/Frmbuyer.designer.cs b/WinformGeneralDeveloperFrame/Form/Frmbuyer.designer.cs index 0ed5c87..25f9ec9 100644 --- a/WinformGeneralDeveloperFrame/Form/Frmbuyer.designer.cs +++ b/WinformGeneralDeveloperFrame/Form/Frmbuyer.designer.cs @@ -269,7 +269,7 @@ namespace MES.Form this.xtraTabControl1.Location = new System.Drawing.Point(0, 34); this.xtraTabControl1.Name = "xtraTabControl1"; this.xtraTabControl1.SelectedTabPage = this.tabDataList; - this.xtraTabControl1.Size = new System.Drawing.Size(1300, 766); + this.xtraTabControl1.Size = new System.Drawing.Size(992, 673); this.xtraTabControl1.TabIndex = 1; this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { this.tabDataList, @@ -279,7 +279,7 @@ namespace MES.Form // this.tabDataList.Controls.Add(this.grdList); this.tabDataList.Name = "tabDataList"; - this.tabDataList.Size = new System.Drawing.Size(1294, 737); + this.tabDataList.Size = new System.Drawing.Size(986, 644); this.tabDataList.Text = "数据列表"; // // grdList @@ -288,7 +288,7 @@ namespace MES.Form this.grdList.Location = new System.Drawing.Point(0, 0); this.grdList.MainView = this.grdListView; this.grdList.Name = "grdList"; - this.grdList.Size = new System.Drawing.Size(1294, 737); + this.grdList.Size = new System.Drawing.Size(986, 644); this.grdList.TabIndex = 0; this.grdList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.grdListView}); @@ -314,7 +314,7 @@ namespace MES.Form // this.tabDataDetail.Controls.Add(this.panelControl2); this.tabDataDetail.Name = "tabDataDetail"; - this.tabDataDetail.Size = new System.Drawing.Size(1294, 737); + this.tabDataDetail.Size = new System.Drawing.Size(986, 644); this.tabDataDetail.Text = "数据编辑"; // // panelControl2 @@ -323,7 +323,7 @@ namespace MES.Form this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill; this.panelControl2.Location = new System.Drawing.Point(0, 0); this.panelControl2.Name = "panelControl2"; - this.panelControl2.Size = new System.Drawing.Size(1294, 737); + this.panelControl2.Size = new System.Drawing.Size(986, 644); this.panelControl2.TabIndex = 0; // // layoutControl1 @@ -342,7 +342,7 @@ namespace MES.Form this.layoutControl1.Location = new System.Drawing.Point(2, 2); this.layoutControl1.Name = "layoutControl1"; this.layoutControl1.Root = this.layoutControlGroup1; - this.layoutControl1.Size = new System.Drawing.Size(1290, 733); + this.layoutControl1.Size = new System.Drawing.Size(982, 640); this.layoutControl1.TabIndex = 6; this.layoutControl1.Text = "layoutControl1"; // @@ -351,7 +351,7 @@ namespace MES.Form this.xtraTabControl2.Location = new System.Drawing.Point(12, 132); this.xtraTabControl2.Name = "xtraTabControl2"; this.xtraTabControl2.SelectedTabPage = this.xtraTabPage1; - this.xtraTabControl2.Size = new System.Drawing.Size(1266, 589); + this.xtraTabControl2.Size = new System.Drawing.Size(958, 496); this.xtraTabControl2.TabIndex = 10; this.xtraTabControl2.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { this.xtraTabPage1}); @@ -360,7 +360,7 @@ namespace MES.Form // this.xtraTabPage1.Controls.Add(this.gridControl1); this.xtraTabPage1.Name = "xtraTabPage1"; - this.xtraTabPage1.Size = new System.Drawing.Size(1260, 560); + this.xtraTabPage1.Size = new System.Drawing.Size(952, 467); this.xtraTabPage1.Text = "采购明细"; // // gridControl1 @@ -378,10 +378,11 @@ namespace MES.Form this.repositoryItemSearchLookUpEditrequisitioncode, this.repositoryItemGridLookUpEditrequisitioncode, this.repositoryItemTextEditrequisitioncode}); - this.gridControl1.Size = new System.Drawing.Size(1260, 560); + this.gridControl1.Size = new System.Drawing.Size(952, 467); this.gridControl1.TabIndex = 1; this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.gridView1}); + this.gridControl1.Validated += new System.EventHandler(this.gridControl1_Validated); // // contextMenuStrip1 // @@ -389,19 +390,19 @@ namespace MES.Form this.toolStripMenuItemAdd, this.toolStripMenuItemDel}); this.contextMenuStrip1.Name = "contextMenuStrip1"; - this.contextMenuStrip1.Size = new System.Drawing.Size(113, 48); + this.contextMenuStrip1.Size = new System.Drawing.Size(181, 70); // // toolStripMenuItemAdd // this.toolStripMenuItemAdd.Name = "toolStripMenuItemAdd"; - this.toolStripMenuItemAdd.Size = new System.Drawing.Size(112, 22); + this.toolStripMenuItemAdd.Size = new System.Drawing.Size(180, 22); this.toolStripMenuItemAdd.Text = "新增行"; this.toolStripMenuItemAdd.Click += new System.EventHandler(this.toolStripMenuItemAdd_Click); // // toolStripMenuItemDel // this.toolStripMenuItemDel.Name = "toolStripMenuItemDel"; - this.toolStripMenuItemDel.Size = new System.Drawing.Size(112, 22); + this.toolStripMenuItemDel.Size = new System.Drawing.Size(180, 22); this.toolStripMenuItemDel.Text = "删除行"; this.toolStripMenuItemDel.Click += new System.EventHandler(this.toolStripMenuItemDel_Click); // @@ -432,6 +433,8 @@ namespace MES.Form this.gridView1.Name = "gridView1"; this.gridView1.OptionsBehavior.Editable = false; this.gridView1.OptionsView.ColumnAutoWidth = false; + this.gridView1.OptionsView.ShowFooter = true; + this.gridView1.ValidateRow += new DevExpress.XtraGrid.Views.Base.ValidateRowEventHandler(this.gridView1_ValidateRow_1); // // gridColumn10 // @@ -486,6 +489,7 @@ namespace MES.Form new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); this.repositoryItemLookUpEditmaterialid.DisplayMember = "Name"; this.repositoryItemLookUpEditmaterialid.Name = "repositoryItemLookUpEditmaterialid"; + this.repositoryItemLookUpEditmaterialid.NullText = ""; this.repositoryItemLookUpEditmaterialid.ValueMember = "ID"; // // gridColumn15 @@ -552,6 +556,8 @@ namespace MES.Form this.gridColumn20.Caption = "金额"; this.gridColumn20.FieldName = "money"; this.gridColumn20.Name = "gridColumn20"; + this.gridColumn20.Summary.AddRange(new DevExpress.XtraGrid.GridSummaryItem[] { + new DevExpress.XtraGrid.GridColumnSummaryItem(DevExpress.Data.SummaryItemType.Sum, "money", "SUM={0:0.##}")}); this.gridColumn20.Visible = true; this.gridColumn20.VisibleIndex = 8; this.gridColumn20.Width = 201; @@ -707,15 +713,15 @@ namespace MES.Form // this.txtid.Location = new System.Drawing.Point(75, 12); this.txtid.Name = "txtid"; - this.txtid.Size = new System.Drawing.Size(568, 20); + this.txtid.Size = new System.Drawing.Size(414, 20); this.txtid.StyleController = this.layoutControl1; this.txtid.TabIndex = 1; // // txtbuyercode // - this.txtbuyercode.Location = new System.Drawing.Point(710, 12); + this.txtbuyercode.Location = new System.Drawing.Point(556, 12); this.txtbuyercode.Name = "txtbuyercode"; - this.txtbuyercode.Size = new System.Drawing.Size(568, 20); + this.txtbuyercode.Size = new System.Drawing.Size(414, 20); this.txtbuyercode.StyleController = this.layoutControl1; this.txtbuyercode.TabIndex = 2; // @@ -731,7 +737,7 @@ namespace MES.Form new DevExpress.XtraEditors.Controls.EditorButton()}); this.txtbuyerdate.Properties.DisplayFormat.FormatString = "G"; this.txtbuyerdate.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; - this.txtbuyerdate.Size = new System.Drawing.Size(568, 20); + this.txtbuyerdate.Size = new System.Drawing.Size(414, 20); this.txtbuyerdate.StyleController = this.layoutControl1; this.txtbuyerdate.TabIndex = 3; // @@ -746,15 +752,15 @@ namespace MES.Form this.txtsupplierid.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; this.txtsupplierid.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; this.txtsupplierid.Properties.ValueMember = "ID"; - this.txtsupplierid.Size = new System.Drawing.Size(568, 20); + this.txtsupplierid.Size = new System.Drawing.Size(414, 20); this.txtsupplierid.StyleController = this.layoutControl1; this.txtsupplierid.TabIndex = 4; // // txtsuppliercode // - this.txtsuppliercode.Location = new System.Drawing.Point(710, 60); + this.txtsuppliercode.Location = new System.Drawing.Point(556, 60); this.txtsuppliercode.Name = "txtsuppliercode"; - this.txtsuppliercode.Size = new System.Drawing.Size(568, 20); + this.txtsuppliercode.Size = new System.Drawing.Size(414, 20); this.txtsuppliercode.StyleController = this.layoutControl1; this.txtsuppliercode.TabIndex = 5; // @@ -762,7 +768,7 @@ namespace MES.Form // this.txtdeliverdate.EditValue = null; this.txtdeliverdate.ImeMode = System.Windows.Forms.ImeMode.Off; - this.txtdeliverdate.Location = new System.Drawing.Point(710, 36); + this.txtdeliverdate.Location = new System.Drawing.Point(556, 36); this.txtdeliverdate.Name = "txtdeliverdate"; this.txtdeliverdate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); @@ -770,7 +776,7 @@ namespace MES.Form new DevExpress.XtraEditors.Controls.EditorButton()}); this.txtdeliverdate.Properties.DisplayFormat.FormatString = "G"; this.txtdeliverdate.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; - this.txtdeliverdate.Size = new System.Drawing.Size(568, 20); + this.txtdeliverdate.Size = new System.Drawing.Size(414, 20); this.txtdeliverdate.StyleController = this.layoutControl1; this.txtdeliverdate.TabIndex = 6; // @@ -785,15 +791,15 @@ namespace MES.Form this.txtcreatorId.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; this.txtcreatorId.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; this.txtcreatorId.Properties.ValueMember = "ID"; - this.txtcreatorId.Size = new System.Drawing.Size(568, 20); + this.txtcreatorId.Size = new System.Drawing.Size(414, 20); this.txtcreatorId.StyleController = this.layoutControl1; this.txtcreatorId.TabIndex = 7; // // txttotalprice // - this.txttotalprice.Location = new System.Drawing.Point(710, 84); + this.txttotalprice.Location = new System.Drawing.Point(556, 84); this.txttotalprice.Name = "txttotalprice"; - this.txttotalprice.Size = new System.Drawing.Size(568, 20); + this.txttotalprice.Size = new System.Drawing.Size(414, 20); this.txttotalprice.StyleController = this.layoutControl1; this.txttotalprice.TabIndex = 8; // @@ -801,7 +807,7 @@ namespace MES.Form // this.txtremark.Location = new System.Drawing.Point(75, 108); this.txtremark.Name = "txtremark"; - this.txtremark.Size = new System.Drawing.Size(1203, 20); + this.txtremark.Size = new System.Drawing.Size(895, 20); this.txtremark.StyleController = this.layoutControl1; this.txtremark.TabIndex = 9; // @@ -821,7 +827,7 @@ namespace MES.Form this.layoutControlItem5, this.layoutControlItem8}); this.layoutControlGroup1.Name = "layoutControlGroup1"; - this.layoutControlGroup1.Size = new System.Drawing.Size(1290, 733); + this.layoutControlGroup1.Size = new System.Drawing.Size(982, 640); this.layoutControlGroup1.TextVisible = false; // // layoutControlItem1 @@ -830,7 +836,7 @@ namespace MES.Form this.layoutControlItem1.CustomizationFormText = "id"; this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); this.layoutControlItem1.Name = "layoutControlItem1"; - this.layoutControlItem1.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem1.Size = new System.Drawing.Size(481, 24); this.layoutControlItem1.Text = "id"; this.layoutControlItem1.TextSize = new System.Drawing.Size(60, 14); // @@ -840,7 +846,7 @@ namespace MES.Form this.layoutControlItem3.CustomizationFormText = "采购日期"; this.layoutControlItem3.Location = new System.Drawing.Point(0, 24); this.layoutControlItem3.Name = "layoutControlItem3"; - this.layoutControlItem3.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem3.Size = new System.Drawing.Size(481, 24); this.layoutControlItem3.Text = "采购日期"; this.layoutControlItem3.TextSize = new System.Drawing.Size(60, 14); // @@ -850,7 +856,7 @@ namespace MES.Form this.layoutControlItem4.CustomizationFormText = "供应商"; this.layoutControlItem4.Location = new System.Drawing.Point(0, 48); this.layoutControlItem4.Name = "layoutControlItem4"; - this.layoutControlItem4.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem4.Size = new System.Drawing.Size(481, 24); this.layoutControlItem4.Text = "供应商"; this.layoutControlItem4.TextSize = new System.Drawing.Size(60, 14); // @@ -860,7 +866,7 @@ namespace MES.Form this.layoutControlItem7.CustomizationFormText = "制单人"; this.layoutControlItem7.Location = new System.Drawing.Point(0, 72); this.layoutControlItem7.Name = "layoutControlItem7"; - this.layoutControlItem7.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem7.Size = new System.Drawing.Size(481, 24); this.layoutControlItem7.Text = "制单人"; this.layoutControlItem7.TextSize = new System.Drawing.Size(60, 14); // @@ -870,7 +876,7 @@ namespace MES.Form this.layoutControlItem9.CustomizationFormText = "备注"; this.layoutControlItem9.Location = new System.Drawing.Point(0, 96); this.layoutControlItem9.Name = "layoutControlItem9"; - this.layoutControlItem9.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem9.Size = new System.Drawing.Size(962, 24); this.layoutControlItem9.Text = "备注"; this.layoutControlItem9.TextSize = new System.Drawing.Size(60, 14); // @@ -879,7 +885,7 @@ namespace MES.Form this.layoutControlItem10.Control = this.xtraTabControl2; this.layoutControlItem10.Location = new System.Drawing.Point(0, 120); this.layoutControlItem10.Name = "layoutControlItem10"; - this.layoutControlItem10.Size = new System.Drawing.Size(1270, 593); + this.layoutControlItem10.Size = new System.Drawing.Size(962, 500); this.layoutControlItem10.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem10.TextVisible = false; // @@ -887,9 +893,9 @@ namespace MES.Form // this.layoutControlItem2.Control = this.txtbuyercode; this.layoutControlItem2.CustomizationFormText = "采购单号"; - this.layoutControlItem2.Location = new System.Drawing.Point(635, 0); + this.layoutControlItem2.Location = new System.Drawing.Point(481, 0); this.layoutControlItem2.Name = "layoutControlItem2"; - this.layoutControlItem2.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem2.Size = new System.Drawing.Size(481, 24); this.layoutControlItem2.Text = "采购单号"; this.layoutControlItem2.TextSize = new System.Drawing.Size(60, 14); // @@ -897,9 +903,9 @@ namespace MES.Form // this.layoutControlItem6.Control = this.txtdeliverdate; this.layoutControlItem6.CustomizationFormText = "完货日期"; - this.layoutControlItem6.Location = new System.Drawing.Point(635, 24); + this.layoutControlItem6.Location = new System.Drawing.Point(481, 24); this.layoutControlItem6.Name = "layoutControlItem6"; - this.layoutControlItem6.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem6.Size = new System.Drawing.Size(481, 24); this.layoutControlItem6.Text = "完货日期"; this.layoutControlItem6.TextSize = new System.Drawing.Size(60, 14); // @@ -907,9 +913,9 @@ namespace MES.Form // this.layoutControlItem5.Control = this.txtsuppliercode; this.layoutControlItem5.CustomizationFormText = "供应商编码"; - this.layoutControlItem5.Location = new System.Drawing.Point(635, 48); + this.layoutControlItem5.Location = new System.Drawing.Point(481, 48); this.layoutControlItem5.Name = "layoutControlItem5"; - this.layoutControlItem5.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem5.Size = new System.Drawing.Size(481, 24); this.layoutControlItem5.Text = "供应商编码"; this.layoutControlItem5.TextSize = new System.Drawing.Size(60, 14); // @@ -917,9 +923,9 @@ namespace MES.Form // this.layoutControlItem8.Control = this.txttotalprice; this.layoutControlItem8.CustomizationFormText = "金额"; - this.layoutControlItem8.Location = new System.Drawing.Point(635, 72); + this.layoutControlItem8.Location = new System.Drawing.Point(481, 72); this.layoutControlItem8.Name = "layoutControlItem8"; - this.layoutControlItem8.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem8.Size = new System.Drawing.Size(481, 24); this.layoutControlItem8.Text = "金额"; this.layoutControlItem8.TextSize = new System.Drawing.Size(60, 14); // @@ -927,7 +933,7 @@ namespace MES.Form // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1300, 800); + this.ClientSize = new System.Drawing.Size(992, 707); this.Controls.Add(this.xtraTabControl1); this.Name = "Frmbuyer"; this.Text = "采购单"; diff --git a/WinformGeneralDeveloperFrame/Form/Frmbuyerreturn.cs b/WinformGeneralDeveloperFrame/Form/Frmbuyerreturn.cs new file mode 100644 index 0000000..818d1e3 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/Frmbuyerreturn.cs @@ -0,0 +1,313 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using WinformGeneralDeveloperFrame; +using WinformGeneralDeveloperFrame.Commons; +using DevExpress.XtraLayout; +using MES.Entity; +using System.Data.Entity.Migrations; +using System.Data.Entity; +namespace MES.Form +{ + public partial class Frmbuyerreturn : FrmBaseForm + { + private Dictionary fieldDictionary = new Dictionary(); + public Frmbuyerreturn() + { + InitializeComponent(); + } + private void Frmbuyerreturn_Load(object sender, EventArgs e) + { + + InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new buyerreturnInfo(),gridControl1,new []{ "txtreturnbuyercode" , "txttotalprice" }); + InitSearchDicData(); + repositoryItemTextEditbuyerdetailcode.KeyDown += RepositoryItemTextEditbuyerdetailcode_KeyDown; + } + + private void RepositoryItemTextEditbuyerdetailcode_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Tab) + { + using (var db = new MESDB()) + { + string code = gridView1.EditingValue.ToString(); + if (!string.IsNullOrEmpty(code)) + { + buyerdetailInfo buyerdetailInfo = db.buyerdetailInfo + .Where(p => p.buyerdetailcode.Equals(code)).FirstOrDefault(); + if (buyerdetailInfo == null) + { + "单号不存在".ShowWarning(); + } + else + { + gridView1.GetFocusedDataRow()["buyerdetailcode"] = buyerdetailInfo.buyerdetailcode; + gridView1.GetFocusedDataRow()["buyercode"] = buyerdetailInfo.buyercode; + gridView1.GetFocusedDataRow()["materialid"] = buyerdetailInfo.materialid; + gridView1.GetFocusedDataRow()["materialcode"] = buyerdetailInfo.materialcode; + gridView1.GetFocusedDataRow()["materialspec"] = buyerdetailInfo.materialspec; + gridView1.GetFocusedDataRow()["unit"] = buyerdetailInfo.materialunit; + gridView1.GetFocusedDataRow()["returnnumber"] = buyerdetailInfo.buyernumber; + gridView1.GetFocusedDataRow()["unitprice"] = buyerdetailInfo.unitprice; + gridView1.GetFocusedDataRow()["money"] = buyerdetailInfo.money; + gridView1.GetFocusedDataRow()["warehouse"] = buyerdetailInfo.warehouse; + } + } + } + } + } + + /// + /// 数据源初始化 + /// + /// + private void Init() + { + txtsupplierid.Properties.DataSource = GetDataTableUtils.SqlTable("供应商"); + repositoryItemtxtsupplierid.DataSource= GetDataTableUtils.SqlTable("供应商"); + txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户"); + repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户"); + repositoryItemLookUpEditwarehouse.DataSource = GetDataTableUtils.SqlTable("仓库"); + repositoryItemLookUpEditunit.DataSource = GetDataTableUtils.SqlTable("计量单位"); + repositoryItemLookUpEditmaterialid.DataSource = GetDataTableUtils.SqlTable("物料"); + } + /// + /// 搜索字段 + /// + /// + private void InitSearchDicData() + { + fieldDictionary.Add("供应商编号","suppliercode"); + fieldDictionary.Add("供应商名称","supplierid"); + } + + public override void InitgrdListDataSource() + { + using (var con=new MESDB())/// + { + grdList.DataSource=con.buyerreturnInfo.ToList(); + } + Init(); + } + public override void gridControlMouseDoubleClickFunction(object sender, EventArgs e) + { + buyerreturnInfo info = grdListView.GetFocusedRow() as buyerreturnInfo; + if (info != null) + { + using (var db = new MESDB()) + { + gridControl1.DataSource = db.buyerreturndetailInfo.Where(p => p.buyerreturnid == info.id).ToList().ToDataTable(); + gridView1.BestFitColumns(); + } + } + } + /// + /// 字段为空校验 + /// + /// + public override bool CheckInput() + { + if(string.IsNullOrEmpty(txtreturndate.Text.ToString())) + { + "退货日期不能为空".ShowWarning(); + txtreturndate.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtsuppliercode.EditValue.ToString())) + { + "供应商编号不能为空".ShowWarning(); + txtsuppliercode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtsupplierid.EditValue.ToString())) + { + "供应商名称不能为空".ShowWarning(); + txtsupplierid.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtcreatorId.EditValue.ToString())) + { + "制单人不能为空".ShowWarning(); + txtcreatorId.Focus(); + return false; + } + return true; + } + /// + /// 保存 + /// + /// + public override bool SaveFunction() + { + string code = "PR" + DateTime.Now.GetDateTimeCode(); + + DataTable dt = gridControl1.DataSource as DataTable; + try + { + buyerreturnInfo info = (buyerreturnInfo)this.ControlDataToModel(new buyerreturnInfo()); + using (var db = new MESDB()) + { + using (var tran = db.Database.BeginTransaction()) + { + try + { + Dictionary> dic = + dt.GetDataTableData(); + if (info.id == 0) //新增 + { + info.returnbuyercode = code; + db.buyerreturnInfo.Add(info); + db.SaveChanges(); + txtid.Text = info.id.ToString(); + txtreturnbuyercode.Text = code; + if (dt != null) + { + List detaiListAdd = + dic["Add"]; + int num = 0; + detaiListAdd.ForEach(a => + { + num++; + string codedetail = "PRD" + DateTime.Now.GetDateTimeCode() + num; + a.buyerreturnid = info.id; + a.returnbuyercode = code; + a.returnbuyerdetailcode = codedetail; + }); + db.buyerreturndetailInfo.AddRange(detaiListAdd); + db.SaveChanges(); + } + } + else //更新 + { + db.Entry(info).State = EntityState.Modified; + db.SaveChanges(); + if (dt != null) + { + List detaiListAdd = + dic["Add"]; + int num = 0; + detaiListAdd.ForEach(a => + { + a.returnbuyercode = info.returnbuyercode; + a.buyerreturnid = info.id; + num++; + string codedetail = "PRD" + DateTime.Now.GetDateTimeCode() + num; + a.returnbuyerdetailcode = codedetail; + }); + db.buyerreturndetailInfo.AddRange(detaiListAdd); + + List detaiListEdit = + dic["Edit"]; + + detaiListEdit.ForEach((a) => + { + a.returnbuyercode = info.returnbuyercode; + db.Entry(a).State = EntityState.Modified; + }); + + List detaiListDel = + dic["Del"]; + detaiListDel.ForEach((a) => { db.Entry(a).State = EntityState.Deleted; }); + db.SaveChanges(); + } + } + + tran.Commit(); + } + catch (Exception ex) + { + tran.Rollback(); + ex.Message.ShowError(); + return false; + } + finally + { + tran.Dispose(); + } + } + } + } + catch (Exception ex) + { + ex.Message.ShowError(); + return false; + } + + return true; + } + /// + /// 删除 + /// + /// + public override bool DelFunction() + { + try + { + buyerreturnInfo info = (buyerreturnInfo)this.ControlDataToModel(new buyerreturnInfo()); + using (var db = new MESDB()) + { + db.Entry(info).State=EntityState.Deleted; + db.SaveChanges(); + } + } + catch (Exception ex) + { + ex.Message.ShowError(); + return false; + } + return true; + } + + public override void AddFunction() + { + gridControl1.DataSource = new List().ToDataTable(); + } + /// + /// 搜索 + /// + /// + public override void SearchFunction() + { + FrmSearch frm = new FrmSearch(fieldDictionary); + if (frm.ShowDialog()==DialogResult.OK) + { + string sql = frm.sql; + using (var db = new MESDB()) + { + if (string.IsNullOrEmpty(sql)) + { + grdList.DataSource = db.buyerreturnInfo.SqlQuery("select * from buyerreturn").ToList(); + } + else + { + grdList.DataSource = db.buyerreturnInfo.SqlQuery($"select * from buyerreturn where {sql}").ToList(); + } + } + } + } + + private void toolStripMenuItemAdd_Click(object sender, EventArgs e) + { + gridView1.AddNewRow(); + } + + private void toolStripMenuItemDel_Click(object sender, EventArgs e) + { + gridView1.DeleteRow(gridView1.FocusedRowHandle); + } + + private void txtsupplierid_EditValueChanged(object sender, EventArgs e) + { + using (var db = new MESDB()) + { + supplierInfo supplier = db.supplierInfo.Find(txtsupplierid.EditValue); + txtsuppliercode.Text = supplier.suppliercode; + } + } + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/Frmbuyerreturn.designer.cs b/WinformGeneralDeveloperFrame/Form/Frmbuyerreturn.designer.cs new file mode 100644 index 0000000..b74ad8b --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/Frmbuyerreturn.designer.cs @@ -0,0 +1,884 @@ + +using DevExpress.XtraEditors; +using DevExpress.XtraLayout; +using DevExpress.XtraTab; + +namespace MES.Form +{ + partial class Frmbuyerreturn + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemtxtsupplierid = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemtxtcreatorId = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn7 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); + this.tabDataList = new DevExpress.XtraTab.XtraTabPage(); + this.grdList = new DevExpress.XtraGrid.GridControl(); + this.grdListView = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.tabDataDetail = new DevExpress.XtraTab.XtraTabPage(); + this.panelControl2 = new DevExpress.XtraEditors.PanelControl(); + this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + this.xtraTabControl2 = new DevExpress.XtraTab.XtraTabControl(); + this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage(); + this.gridControl1 = new DevExpress.XtraGrid.GridControl(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.toolStripMenuItemAdd = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItemDel = new System.Windows.Forms.ToolStripMenuItem(); + this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn10 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemTextEditbuyerdetailcode = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit(); + this.gridColumn11 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn12 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn13 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemLookUpEditmaterialid = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn14 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn15 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn16 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemLookUpEditunit = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn17 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn18 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn19 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemLookUpEditwarehouse = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn20 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn21 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn22 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.txtid = new DevExpress.XtraEditors.TextEdit(); + this.txtreturndate = new DevExpress.XtraEditors.DateEdit(); + this.txtsuppliercode = new DevExpress.XtraEditors.TextEdit(); + this.txtsupplierid = new DevExpress.XtraEditors.LookUpEdit(); + this.txtcreatorId = new DevExpress.XtraEditors.LookUpEdit(); + this.txtreturnbuyercode = new DevExpress.XtraEditors.TextEdit(); + this.txttotalprice = new DevExpress.XtraEditors.TextEdit(); + this.txtremark = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtsupplierid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); + this.xtraTabControl1.SuspendLayout(); + this.tabDataList.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.grdList)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.grdListView)).BeginInit(); + this.tabDataDetail.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit(); + this.panelControl2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); + this.layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl2)).BeginInit(); + this.xtraTabControl2.SuspendLayout(); + this.xtraTabPage1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit(); + this.contextMenuStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEditbuyerdetailcode)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditmaterialid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditunit)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditwarehouse)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturndate.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturndate.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtsuppliercode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtsupplierid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturnbuyercode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txttotalprice.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + this.SuspendLayout(); + // + // gridColumn1 + // + this.gridColumn1.Caption = "id"; + this.gridColumn1.FieldName = "id"; + this.gridColumn1.Name = "gridColumn1"; + // + // gridColumn2 + // + this.gridColumn2.Caption = "退货日期"; + this.gridColumn2.DisplayFormat.FormatString = "G"; + this.gridColumn2.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.gridColumn2.FieldName = "returndate"; + this.gridColumn2.Name = "gridColumn2"; + this.gridColumn2.Visible = true; + this.gridColumn2.VisibleIndex = 0; + this.gridColumn2.Width = 201; + // + // gridColumn3 + // + this.gridColumn3.Caption = "供应商编号"; + this.gridColumn3.FieldName = "suppliercode"; + this.gridColumn3.Name = "gridColumn3"; + this.gridColumn3.Visible = true; + this.gridColumn3.VisibleIndex = 1; + this.gridColumn3.Width = 201; + // + // gridColumn4 + // + this.gridColumn4.Caption = "供应商名称"; + this.gridColumn4.ColumnEdit = this.repositoryItemtxtsupplierid; + this.gridColumn4.FieldName = "supplierid"; + this.gridColumn4.Name = "gridColumn4"; + this.gridColumn4.Visible = true; + this.gridColumn4.VisibleIndex = 2; + this.gridColumn4.Width = 201; + // + // repositoryItemtxtsupplierid + // + this.repositoryItemtxtsupplierid.AutoHeight = false; + this.repositoryItemtxtsupplierid.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtsupplierid.DisplayMember = "Name"; + this.repositoryItemtxtsupplierid.Name = "repositoryItemtxtsupplierid"; + this.repositoryItemtxtsupplierid.ValueMember = "ID"; + // + // gridColumn5 + // + this.gridColumn5.Caption = "制单人"; + this.gridColumn5.ColumnEdit = this.repositoryItemtxtcreatorId; + this.gridColumn5.FieldName = "creatorId"; + this.gridColumn5.Name = "gridColumn5"; + this.gridColumn5.Visible = true; + this.gridColumn5.VisibleIndex = 3; + this.gridColumn5.Width = 201; + // + // repositoryItemtxtcreatorId + // + this.repositoryItemtxtcreatorId.AutoHeight = false; + this.repositoryItemtxtcreatorId.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtcreatorId.DisplayMember = "Name"; + this.repositoryItemtxtcreatorId.Name = "repositoryItemtxtcreatorId"; + this.repositoryItemtxtcreatorId.ValueMember = "ID"; + // + // gridColumn6 + // + this.gridColumn6.Caption = "采购退货单号"; + this.gridColumn6.FieldName = "returnbuyercode"; + this.gridColumn6.Name = "gridColumn6"; + this.gridColumn6.Visible = true; + this.gridColumn6.VisibleIndex = 4; + this.gridColumn6.Width = 201; + // + // gridColumn7 + // + this.gridColumn7.Caption = "金额"; + this.gridColumn7.FieldName = "totalprice"; + this.gridColumn7.Name = "gridColumn7"; + this.gridColumn7.Visible = true; + this.gridColumn7.VisibleIndex = 5; + this.gridColumn7.Width = 201; + // + // gridColumn8 + // + this.gridColumn8.Caption = "备注"; + this.gridColumn8.FieldName = "remark"; + this.gridColumn8.Name = "gridColumn8"; + this.gridColumn8.Visible = true; + this.gridColumn8.VisibleIndex = 6; + this.gridColumn8.Width = 201; + // + // xtraTabControl1 + // + this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.xtraTabControl1.Location = new System.Drawing.Point(0, 34); + this.xtraTabControl1.Name = "xtraTabControl1"; + this.xtraTabControl1.SelectedTabPage = this.tabDataList; + this.xtraTabControl1.Size = new System.Drawing.Size(1300, 766); + this.xtraTabControl1.TabIndex = 1; + this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { + this.tabDataList, + this.tabDataDetail}); + // + // tabDataList + // + this.tabDataList.Controls.Add(this.grdList); + this.tabDataList.Name = "tabDataList"; + this.tabDataList.Size = new System.Drawing.Size(1294, 737); + this.tabDataList.Text = "数据列表"; + // + // grdList + // + this.grdList.Dock = System.Windows.Forms.DockStyle.Fill; + this.grdList.Location = new System.Drawing.Point(0, 0); + this.grdList.MainView = this.grdListView; + this.grdList.Name = "grdList"; + this.grdList.Size = new System.Drawing.Size(1294, 737); + this.grdList.TabIndex = 0; + this.grdList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.grdListView}); + // + // grdListView + // + this.grdListView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gridColumn1, + this.gridColumn2, + this.gridColumn3, + this.gridColumn4, + this.gridColumn5, + this.gridColumn6, + this.gridColumn7, + this.gridColumn8}); + this.grdListView.GridControl = this.grdList; + this.grdListView.Name = "grdListView"; + this.grdListView.OptionsBehavior.Editable = false; + this.grdListView.OptionsView.ColumnAutoWidth = false; + // + // tabDataDetail + // + this.tabDataDetail.Controls.Add(this.panelControl2); + this.tabDataDetail.Name = "tabDataDetail"; + this.tabDataDetail.Size = new System.Drawing.Size(1294, 737); + this.tabDataDetail.Text = "数据编辑"; + // + // panelControl2 + // + this.panelControl2.Controls.Add(this.layoutControl1); + this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panelControl2.Location = new System.Drawing.Point(0, 0); + this.panelControl2.Name = "panelControl2"; + this.panelControl2.Size = new System.Drawing.Size(1294, 737); + this.panelControl2.TabIndex = 0; + // + // layoutControl1 + // + this.layoutControl1.Controls.Add(this.xtraTabControl2); + this.layoutControl1.Controls.Add(this.txtid); + this.layoutControl1.Controls.Add(this.txtreturndate); + this.layoutControl1.Controls.Add(this.txtsuppliercode); + this.layoutControl1.Controls.Add(this.txtsupplierid); + this.layoutControl1.Controls.Add(this.txtcreatorId); + this.layoutControl1.Controls.Add(this.txtreturnbuyercode); + this.layoutControl1.Controls.Add(this.txttotalprice); + this.layoutControl1.Controls.Add(this.txtremark); + this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.layoutControl1.Location = new System.Drawing.Point(2, 2); + this.layoutControl1.Name = "layoutControl1"; + this.layoutControl1.Root = this.layoutControlGroup1; + this.layoutControl1.Size = new System.Drawing.Size(1290, 733); + this.layoutControl1.TabIndex = 6; + this.layoutControl1.Text = "layoutControl1"; + // + // xtraTabControl2 + // + this.xtraTabControl2.Location = new System.Drawing.Point(12, 132); + this.xtraTabControl2.Name = "xtraTabControl2"; + this.xtraTabControl2.SelectedTabPage = this.xtraTabPage1; + this.xtraTabControl2.Size = new System.Drawing.Size(1266, 589); + this.xtraTabControl2.TabIndex = 9; + this.xtraTabControl2.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { + this.xtraTabPage1}); + // + // xtraTabPage1 + // + this.xtraTabPage1.Controls.Add(this.gridControl1); + this.xtraTabPage1.Name = "xtraTabPage1"; + this.xtraTabPage1.Size = new System.Drawing.Size(1260, 560); + this.xtraTabPage1.Text = "明细"; + // + // gridControl1 + // + this.gridControl1.ContextMenuStrip = this.contextMenuStrip1; + this.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.gridControl1.Location = new System.Drawing.Point(0, 0); + this.gridControl1.MainView = this.gridView1; + this.gridControl1.Name = "gridControl1"; + this.gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { + this.repositoryItemLookUpEditmaterialid, + this.repositoryItemLookUpEditunit, + this.repositoryItemLookUpEditwarehouse, + this.repositoryItemTextEditbuyerdetailcode}); + this.gridControl1.Size = new System.Drawing.Size(1260, 560); + this.gridControl1.TabIndex = 1; + this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView1}); + // + // contextMenuStrip1 + // + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItemAdd, + this.toolStripMenuItemDel}); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(113, 48); + // + // toolStripMenuItemAdd + // + this.toolStripMenuItemAdd.Name = "toolStripMenuItemAdd"; + this.toolStripMenuItemAdd.Size = new System.Drawing.Size(112, 22); + this.toolStripMenuItemAdd.Text = "新增行"; + this.toolStripMenuItemAdd.Click += new System.EventHandler(this.toolStripMenuItemAdd_Click); + // + // toolStripMenuItemDel + // + this.toolStripMenuItemDel.Name = "toolStripMenuItemDel"; + this.toolStripMenuItemDel.Size = new System.Drawing.Size(112, 22); + this.toolStripMenuItemDel.Text = "删除行"; + this.toolStripMenuItemDel.Click += new System.EventHandler(this.toolStripMenuItemDel_Click); + // + // gridView1 + // + this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gridColumn9, + this.gridColumn10, + this.gridColumn11, + this.gridColumn12, + this.gridColumn13, + this.gridColumn14, + this.gridColumn15, + this.gridColumn16, + this.gridColumn17, + this.gridColumn18, + this.gridColumn19, + this.gridColumn20, + this.gridColumn21, + this.gridColumn22}); + this.gridView1.GridControl = this.gridControl1; + this.gridView1.Name = "gridView1"; + this.gridView1.OptionsBehavior.Editable = false; + this.gridView1.OptionsView.ColumnAutoWidth = false; + // + // gridColumn9 + // + this.gridColumn9.Caption = "id"; + this.gridColumn9.FieldName = "id"; + this.gridColumn9.Name = "gridColumn9"; + this.gridColumn9.Width = 201; + // + // gridColumn10 + // + this.gridColumn10.Caption = "采购明细单号"; + this.gridColumn10.ColumnEdit = this.repositoryItemTextEditbuyerdetailcode; + this.gridColumn10.FieldName = "buyerdetailcode"; + this.gridColumn10.Name = "gridColumn10"; + this.gridColumn10.Visible = true; + this.gridColumn10.VisibleIndex = 0; + this.gridColumn10.Width = 201; + // + // repositoryItemTextEditbuyerdetailcode + // + this.repositoryItemTextEditbuyerdetailcode.AutoHeight = false; + this.repositoryItemTextEditbuyerdetailcode.Name = "repositoryItemTextEditbuyerdetailcode"; + // + // gridColumn11 + // + this.gridColumn11.Caption = "采购单号"; + this.gridColumn11.FieldName = "buyercode"; + this.gridColumn11.Name = "gridColumn11"; + this.gridColumn11.OptionsColumn.AllowEdit = false; + this.gridColumn11.Visible = true; + this.gridColumn11.VisibleIndex = 1; + this.gridColumn11.Width = 201; + // + // gridColumn12 + // + this.gridColumn12.Caption = "物料编码"; + this.gridColumn12.FieldName = "materialcode"; + this.gridColumn12.Name = "gridColumn12"; + this.gridColumn12.OptionsColumn.AllowEdit = false; + this.gridColumn12.Visible = true; + this.gridColumn12.VisibleIndex = 2; + this.gridColumn12.Width = 201; + // + // gridColumn13 + // + this.gridColumn13.Caption = "物料名称"; + this.gridColumn13.ColumnEdit = this.repositoryItemLookUpEditmaterialid; + this.gridColumn13.FieldName = "materialid"; + this.gridColumn13.Name = "gridColumn13"; + this.gridColumn13.OptionsColumn.AllowEdit = false; + this.gridColumn13.Visible = true; + this.gridColumn13.VisibleIndex = 3; + this.gridColumn13.Width = 201; + // + // repositoryItemLookUpEditmaterialid + // + this.repositoryItemLookUpEditmaterialid.AutoHeight = false; + this.repositoryItemLookUpEditmaterialid.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemLookUpEditmaterialid.DisplayMember = "Name"; + this.repositoryItemLookUpEditmaterialid.Name = "repositoryItemLookUpEditmaterialid"; + this.repositoryItemLookUpEditmaterialid.NullText = ""; + this.repositoryItemLookUpEditmaterialid.ValueMember = "ID"; + // + // gridColumn14 + // + this.gridColumn14.Caption = "规格型号"; + this.gridColumn14.FieldName = "materialspec"; + this.gridColumn14.Name = "gridColumn14"; + this.gridColumn14.OptionsColumn.AllowEdit = false; + this.gridColumn14.Visible = true; + this.gridColumn14.VisibleIndex = 4; + this.gridColumn14.Width = 201; + // + // gridColumn15 + // + this.gridColumn15.Caption = "退货数量"; + this.gridColumn15.FieldName = "returnnumber"; + this.gridColumn15.Name = "gridColumn15"; + this.gridColumn15.Visible = true; + this.gridColumn15.VisibleIndex = 5; + this.gridColumn15.Width = 201; + // + // gridColumn16 + // + this.gridColumn16.Caption = "计量单位"; + this.gridColumn16.ColumnEdit = this.repositoryItemLookUpEditunit; + this.gridColumn16.FieldName = "unit"; + this.gridColumn16.Name = "gridColumn16"; + this.gridColumn16.OptionsColumn.AllowEdit = false; + this.gridColumn16.Visible = true; + this.gridColumn16.VisibleIndex = 6; + this.gridColumn16.Width = 201; + // + // repositoryItemLookUpEditunit + // + this.repositoryItemLookUpEditunit.AutoHeight = false; + this.repositoryItemLookUpEditunit.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemLookUpEditunit.DisplayMember = "Name"; + this.repositoryItemLookUpEditunit.Name = "repositoryItemLookUpEditunit"; + this.repositoryItemLookUpEditunit.NullText = ""; + this.repositoryItemLookUpEditunit.ValueMember = "ID"; + // + // gridColumn17 + // + this.gridColumn17.Caption = "采购单价"; + this.gridColumn17.FieldName = "unitprice"; + this.gridColumn17.Name = "gridColumn17"; + this.gridColumn17.OptionsColumn.AllowEdit = false; + this.gridColumn17.Visible = true; + this.gridColumn17.VisibleIndex = 7; + this.gridColumn17.Width = 201; + // + // gridColumn18 + // + this.gridColumn18.Caption = "金额"; + this.gridColumn18.FieldName = "money"; + this.gridColumn18.Name = "gridColumn18"; + this.gridColumn18.OptionsColumn.AllowEdit = false; + this.gridColumn18.Visible = true; + this.gridColumn18.VisibleIndex = 8; + this.gridColumn18.Width = 201; + // + // gridColumn19 + // + this.gridColumn19.Caption = "仓库"; + this.gridColumn19.ColumnEdit = this.repositoryItemLookUpEditwarehouse; + this.gridColumn19.FieldName = "warehouse"; + this.gridColumn19.Name = "gridColumn19"; + this.gridColumn19.OptionsColumn.AllowEdit = false; + this.gridColumn19.Visible = true; + this.gridColumn19.VisibleIndex = 9; + this.gridColumn19.Width = 201; + // + // repositoryItemLookUpEditwarehouse + // + this.repositoryItemLookUpEditwarehouse.AutoHeight = false; + this.repositoryItemLookUpEditwarehouse.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemLookUpEditwarehouse.DisplayMember = "Name"; + this.repositoryItemLookUpEditwarehouse.Name = "repositoryItemLookUpEditwarehouse"; + this.repositoryItemLookUpEditwarehouse.ValueMember = "ID"; + // + // gridColumn20 + // + this.gridColumn20.Caption = "退货单号"; + this.gridColumn20.FieldName = "returnbuyercode"; + this.gridColumn20.Name = "gridColumn20"; + this.gridColumn20.OptionsColumn.AllowEdit = false; + this.gridColumn20.Visible = true; + this.gridColumn20.VisibleIndex = 10; + this.gridColumn20.Width = 201; + // + // gridColumn21 + // + this.gridColumn21.Caption = "退货明细单号"; + this.gridColumn21.FieldName = "returnbuyerdetailcode"; + this.gridColumn21.Name = "gridColumn21"; + this.gridColumn21.OptionsColumn.AllowEdit = false; + this.gridColumn21.Visible = true; + this.gridColumn21.VisibleIndex = 11; + this.gridColumn21.Width = 201; + // + // gridColumn22 + // + this.gridColumn22.Caption = "备注"; + this.gridColumn22.FieldName = "remark"; + this.gridColumn22.Name = "gridColumn22"; + this.gridColumn22.Visible = true; + this.gridColumn22.VisibleIndex = 12; + this.gridColumn22.Width = 201; + // + // txtid + // + this.txtid.Location = new System.Drawing.Point(87, 12); + this.txtid.Name = "txtid"; + this.txtid.Size = new System.Drawing.Size(556, 20); + this.txtid.StyleController = this.layoutControl1; + this.txtid.TabIndex = 1; + // + // txtreturndate + // + this.txtreturndate.EditValue = null; + this.txtreturndate.ImeMode = System.Windows.Forms.ImeMode.Off; + this.txtreturndate.Location = new System.Drawing.Point(722, 60); + this.txtreturndate.Name = "txtreturndate"; + this.txtreturndate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtreturndate.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton()}); + this.txtreturndate.Properties.DisplayFormat.FormatString = "G"; + this.txtreturndate.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.txtreturndate.Size = new System.Drawing.Size(556, 20); + this.txtreturndate.StyleController = this.layoutControl1; + this.txtreturndate.TabIndex = 2; + // + // txtsuppliercode + // + this.txtsuppliercode.Location = new System.Drawing.Point(722, 36); + this.txtsuppliercode.Name = "txtsuppliercode"; + this.txtsuppliercode.Size = new System.Drawing.Size(556, 20); + this.txtsuppliercode.StyleController = this.layoutControl1; + this.txtsuppliercode.TabIndex = 3; + // + // txtsupplierid + // + this.txtsupplierid.EditValue = ""; + this.txtsupplierid.Location = new System.Drawing.Point(87, 36); + this.txtsupplierid.Name = "txtsupplierid"; + this.txtsupplierid.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtsupplierid.Properties.DisplayMember = "Name"; + this.txtsupplierid.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtsupplierid.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtsupplierid.Properties.ValueMember = "ID"; + this.txtsupplierid.Size = new System.Drawing.Size(556, 20); + this.txtsupplierid.StyleController = this.layoutControl1; + this.txtsupplierid.TabIndex = 4; + this.txtsupplierid.EditValueChanged += new System.EventHandler(this.txtsupplierid_EditValueChanged); + // + // txtcreatorId + // + this.txtcreatorId.EditValue = ""; + this.txtcreatorId.Location = new System.Drawing.Point(87, 60); + this.txtcreatorId.Name = "txtcreatorId"; + this.txtcreatorId.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtcreatorId.Properties.DisplayMember = "Name"; + this.txtcreatorId.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtcreatorId.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtcreatorId.Properties.ValueMember = "ID"; + this.txtcreatorId.Size = new System.Drawing.Size(556, 20); + this.txtcreatorId.StyleController = this.layoutControl1; + this.txtcreatorId.TabIndex = 5; + // + // txtreturnbuyercode + // + this.txtreturnbuyercode.Location = new System.Drawing.Point(722, 12); + this.txtreturnbuyercode.Name = "txtreturnbuyercode"; + this.txtreturnbuyercode.Size = new System.Drawing.Size(556, 20); + this.txtreturnbuyercode.StyleController = this.layoutControl1; + this.txtreturnbuyercode.TabIndex = 6; + // + // txttotalprice + // + this.txttotalprice.Location = new System.Drawing.Point(87, 84); + this.txttotalprice.Name = "txttotalprice"; + this.txttotalprice.Size = new System.Drawing.Size(1191, 20); + this.txttotalprice.StyleController = this.layoutControl1; + this.txttotalprice.TabIndex = 7; + // + // txtremark + // + this.txtremark.Location = new System.Drawing.Point(87, 108); + this.txtremark.Name = "txtremark"; + this.txtremark.Size = new System.Drawing.Size(1191, 20); + this.txtremark.StyleController = this.layoutControl1; + this.txtremark.TabIndex = 8; + // + // layoutControlGroup1 + // + this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1"; + this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem5, + this.layoutControlItem7, + this.layoutControlItem8, + this.layoutControlItem6, + this.layoutControlItem2, + this.layoutControlItem9, + this.layoutControlItem4, + this.layoutControlItem3}); + this.layoutControlGroup1.Name = "layoutControlGroup1"; + this.layoutControlGroup1.Size = new System.Drawing.Size(1290, 733); + this.layoutControlGroup1.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.txtid; + this.layoutControlItem1.CustomizationFormText = "id"; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem1.Text = "id"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(72, 14); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.txtsuppliercode; + this.layoutControlItem3.CustomizationFormText = "供应商编号"; + this.layoutControlItem3.Location = new System.Drawing.Point(635, 24); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem3.Text = "供应商编号"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(72, 14); + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.txtcreatorId; + this.layoutControlItem5.CustomizationFormText = "制单人"; + this.layoutControlItem5.Location = new System.Drawing.Point(0, 48); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem5.Text = "制单人"; + this.layoutControlItem5.TextSize = new System.Drawing.Size(72, 14); + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.txttotalprice; + this.layoutControlItem7.CustomizationFormText = "金额"; + this.layoutControlItem7.Location = new System.Drawing.Point(0, 72); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem7.Text = "金额"; + this.layoutControlItem7.TextSize = new System.Drawing.Size(72, 14); + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.txtremark; + this.layoutControlItem8.CustomizationFormText = "备注"; + this.layoutControlItem8.Location = new System.Drawing.Point(0, 96); + this.layoutControlItem8.Name = "layoutControlItem8"; + this.layoutControlItem8.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem8.Text = "备注"; + this.layoutControlItem8.TextSize = new System.Drawing.Size(72, 14); + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.txtreturnbuyercode; + this.layoutControlItem6.CustomizationFormText = "采购退货单号"; + this.layoutControlItem6.Location = new System.Drawing.Point(635, 0); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem6.Text = "采购退货单号"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(72, 14); + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.txtsupplierid; + this.layoutControlItem4.CustomizationFormText = "供应商名称"; + this.layoutControlItem4.Location = new System.Drawing.Point(0, 24); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem4.Text = "供应商名称"; + this.layoutControlItem4.TextSize = new System.Drawing.Size(72, 14); + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.txtreturndate; + this.layoutControlItem2.CustomizationFormText = "退货日期"; + this.layoutControlItem2.Location = new System.Drawing.Point(635, 48); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem2.Text = "退货日期"; + this.layoutControlItem2.TextSize = new System.Drawing.Size(72, 14); + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.xtraTabControl2; + this.layoutControlItem9.Location = new System.Drawing.Point(0, 120); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(1270, 593); + this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem9.TextVisible = false; + // + // Frmbuyerreturn + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1300, 800); + this.Controls.Add(this.xtraTabControl1); + this.Name = "Frmbuyerreturn"; + this.Text = "采购退货单"; + this.Load += new System.EventHandler(this.Frmbuyerreturn_Load); + this.Controls.SetChildIndex(this.xtraTabControl1, 0); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtsupplierid)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); + this.xtraTabControl1.ResumeLayout(false); + this.tabDataList.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.grdList)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.grdListView)).EndInit(); + this.tabDataDetail.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit(); + this.panelControl2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); + this.layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl2)).EndInit(); + this.xtraTabControl2.ResumeLayout(false); + this.xtraTabPage1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit(); + this.contextMenuStrip1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEditbuyerdetailcode)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditmaterialid)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditunit)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditwarehouse)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturndate.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturndate.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtsuppliercode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtsupplierid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturnbuyercode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txttotalprice.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private XtraTabControl xtraTabControl1; + private XtraTabPage tabDataList; + private XtraTabPage tabDataDetail; + private DevExpress.XtraGrid.GridControl grdList; + private DevExpress.XtraGrid.Views.Grid.GridView grdListView; + private PanelControl panelControl2; + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + + private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn2; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn3; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn4; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn5; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn6; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn7; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn8; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtid; + /////////////////////////////// + private DevExpress.XtraEditors.DateEdit txtreturndate; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtsuppliercode; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtsupplierid; + + private DevExpress.XtraEditors.LookUpEdit txtsupplierid; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtcreatorId; + + private DevExpress.XtraEditors.LookUpEdit txtcreatorId; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtreturnbuyercode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txttotalprice; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtremark; + + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private XtraTabControl xtraTabControl2; + private XtraTabPage xtraTabPage1; + private LayoutControlItem layoutControlItem9; + private DevExpress.XtraGrid.GridControl gridControl1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn9; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn10; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn11; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn12; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn13; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn14; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn15; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn16; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn17; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn18; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn19; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn20; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn21; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn22; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemLookUpEditmaterialid; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemLookUpEditunit; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemLookUpEditwarehouse; + private DevExpress.XtraEditors.Repository.RepositoryItemTextEdit repositoryItemTextEditbuyerdetailcode; + private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemAdd; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemDel; + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/Frmbuyerreturn.resx b/WinformGeneralDeveloperFrame/Form/Frmbuyerreturn.resx new file mode 100644 index 0000000..ad53752 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/Frmbuyerreturn.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/Frmbuyerreturndetail.cs b/WinformGeneralDeveloperFrame/Form/Frmbuyerreturndetail.cs new file mode 100644 index 0000000..a16f044 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/Frmbuyerreturndetail.cs @@ -0,0 +1,214 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using WinformGeneralDeveloperFrame; +using WinformGeneralDeveloperFrame.Commons; +using DevExpress.XtraLayout; +using MES.Entity; +using System.Data.Entity.Migrations; +using System.Data.Entity; +namespace MES.Form +{ + public partial class Frmbuyerreturndetail : FrmBaseForm + { + private Dictionary fieldDictionary = new Dictionary(); + public Frmbuyerreturndetail() + { + InitializeComponent(); + } + private void Frmbuyerreturndetail_Load(object sender, EventArgs e) + { + InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new buyerreturndetailInfo()); + InitSearchDicData(); + } + /// + /// 数据源初始化 + /// + /// + private void Init() + { + } + /// + /// 搜索字段 + /// + /// + private void InitSearchDicData() + { + fieldDictionary.Add("id","id"); + fieldDictionary.Add("采购明细单号","buyerdetailcode"); + fieldDictionary.Add("采购单号","buyercode"); + fieldDictionary.Add("物料编码","materialcode"); + fieldDictionary.Add("物料名称","materialid"); + fieldDictionary.Add("规格型号","materialspec"); + fieldDictionary.Add("退货数量","returnnumber"); + fieldDictionary.Add("计量单位","unit"); + fieldDictionary.Add("采购单价","unitprice"); + fieldDictionary.Add("金额","money"); + fieldDictionary.Add("仓库","warehouse"); + fieldDictionary.Add("退货单号","returnbuyercode"); + fieldDictionary.Add("退货明细单号","returnbuyerdetailcode"); + fieldDictionary.Add("备注","remark"); + } + + public override void InitgrdListDataSource() + { + using (var con=new MESDB())/// + { + grdList.DataSource=con.buyerreturndetailInfo.ToList(); + } + Init(); + } + /// + /// 字段为空校验 + /// + /// + public override bool CheckInput() + { + if(string.IsNullOrEmpty(txtbuyerdetailcode.EditValue.ToString())) + { + "采购明细单号不能为空".ShowWarning(); + txtbuyerdetailcode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtbuyercode.EditValue.ToString())) + { + "采购单号不能为空".ShowWarning(); + txtbuyercode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtmaterialcode.EditValue.ToString())) + { + "物料编码不能为空".ShowWarning(); + txtmaterialcode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtmaterialid.EditValue.ToString())) + { + "物料名称不能为空".ShowWarning(); + txtmaterialid.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtmaterialspec.EditValue.ToString())) + { + "规格型号不能为空".ShowWarning(); + txtmaterialspec.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtreturnnumber.EditValue.ToString())) + { + "退货数量不能为空".ShowWarning(); + txtreturnnumber.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtunit.EditValue.ToString())) + { + "计量单位不能为空".ShowWarning(); + txtunit.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtunitprice.EditValue.ToString())) + { + "采购单价不能为空".ShowWarning(); + txtunitprice.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtmoney.EditValue.ToString())) + { + "金额不能为空".ShowWarning(); + txtmoney.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtwarehouse.EditValue.ToString())) + { + "仓库不能为空".ShowWarning(); + txtwarehouse.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtreturnbuyercode.EditValue.ToString())) + { + "退货单号不能为空".ShowWarning(); + txtreturnbuyercode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtreturnbuyerdetailcode.EditValue.ToString())) + { + "退货明细单号不能为空".ShowWarning(); + txtreturnbuyerdetailcode.Focus(); + return false; + } + return true; + } + /// + /// 保存 + /// + /// + public override bool SaveFunction() + { + try + { + buyerreturndetailInfo info= (buyerreturndetailInfo)this.ControlDataToModel(new buyerreturndetailInfo()); + using (var db = new MESDB()) + { + db.buyerreturndetailInfo.AddOrUpdate(info); + db.SaveChanges(); + } + } + catch (Exception ex) + { + ex.Message.ShowError(); + return false; + } + return true; + } + /// + /// 删除 + /// + /// + public override bool DelFunction() + { + try + { + buyerreturndetailInfo info = (buyerreturndetailInfo)this.ControlDataToModel(new buyerreturndetailInfo()); + using (var db = new MESDB()) + { + db.Entry(info).State=EntityState.Deleted; + db.SaveChanges(); + } + } + catch (Exception ex) + { + ex.Message.ShowError(); + return false; + } + return true; + } + /// + /// 搜索 + /// + /// + public override void SearchFunction() + { + FrmSearch frm = new FrmSearch(fieldDictionary); + if (frm.ShowDialog()==DialogResult.OK) + { + string sql = frm.sql; + using (var db = new MESDB()) + { + if (string.IsNullOrEmpty(sql)) + { + grdList.DataSource = db.buyerreturndetailInfo.SqlQuery("select * from buyerreturndetail").ToList(); + } + else + { + grdList.DataSource = db.buyerreturndetailInfo.SqlQuery($"select * from buyerreturndetail where {sql}").ToList(); + } + } + } + } + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/Frmbuyerreturndetail.designer.cs b/WinformGeneralDeveloperFrame/Form/Frmbuyerreturndetail.designer.cs new file mode 100644 index 0000000..3c8d0a7 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/Frmbuyerreturndetail.designer.cs @@ -0,0 +1,742 @@ + +using DevExpress.XtraEditors; +using DevExpress.XtraLayout; +using DevExpress.XtraTab; + +namespace MES.Form +{ + partial class Frmbuyerreturndetail + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn7 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn10 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn11 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn12 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn13 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn14 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); + this.tabDataList = new DevExpress.XtraTab.XtraTabPage(); + this.grdList = new DevExpress.XtraGrid.GridControl(); + this.grdListView = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.tabDataDetail = new DevExpress.XtraTab.XtraTabPage(); + this.panelControl2 = new DevExpress.XtraEditors.PanelControl(); + this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtid = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtbuyerdetailcode = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtbuyercode = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtmaterialcode = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtmaterialid = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtmaterialspec = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtreturnnumber = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtunit = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtunitprice = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtmoney = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtwarehouse = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtreturnbuyercode = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtreturnbuyerdetailcode = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtremark = new DevExpress.XtraEditors.TextEdit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); + this.xtraTabControl1.SuspendLayout(); + this.tabDataList.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.grdList)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.grdListView)).BeginInit(); + this.tabDataDetail.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit(); + this.panelControl2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); + this.layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtbuyerdetailcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtbuyercode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialspec.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturnnumber.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtunitprice.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtmoney.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturnbuyercode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturnbuyerdetailcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).BeginInit(); + this.SuspendLayout(); + // + // gridColumn1 + // + this.gridColumn1.Caption = "id"; + this.gridColumn1.FieldName = "id"; + this.gridColumn1.Name = "gridColumn1"; + this.gridColumn1.Visible = true; + this.gridColumn1.VisibleIndex = 0; + this.gridColumn1.Width = 201; + // + // gridColumn2 + // + this.gridColumn2.Caption = "采购明细单号"; + this.gridColumn2.FieldName = "buyerdetailcode"; + this.gridColumn2.Name = "gridColumn2"; + this.gridColumn2.Visible = true; + this.gridColumn2.VisibleIndex = 1; + this.gridColumn2.Width = 201; + // + // gridColumn3 + // + this.gridColumn3.Caption = "采购单号"; + this.gridColumn3.FieldName = "buyercode"; + this.gridColumn3.Name = "gridColumn3"; + this.gridColumn3.Visible = true; + this.gridColumn3.VisibleIndex = 2; + this.gridColumn3.Width = 201; + // + // gridColumn4 + // + this.gridColumn4.Caption = "物料编码"; + this.gridColumn4.FieldName = "materialcode"; + this.gridColumn4.Name = "gridColumn4"; + this.gridColumn4.Visible = true; + this.gridColumn4.VisibleIndex = 3; + this.gridColumn4.Width = 201; + // + // gridColumn5 + // + this.gridColumn5.Caption = "物料名称"; + this.gridColumn5.FieldName = "materialid"; + this.gridColumn5.Name = "gridColumn5"; + this.gridColumn5.Visible = true; + this.gridColumn5.VisibleIndex = 4; + this.gridColumn5.Width = 201; + // + // gridColumn6 + // + this.gridColumn6.Caption = "规格型号"; + this.gridColumn6.FieldName = "materialspec"; + this.gridColumn6.Name = "gridColumn6"; + this.gridColumn6.Visible = true; + this.gridColumn6.VisibleIndex = 5; + this.gridColumn6.Width = 201; + // + // gridColumn7 + // + this.gridColumn7.Caption = "退货数量"; + this.gridColumn7.FieldName = "returnnumber"; + this.gridColumn7.Name = "gridColumn7"; + this.gridColumn7.Visible = true; + this.gridColumn7.VisibleIndex = 6; + this.gridColumn7.Width = 201; + // + // gridColumn8 + // + this.gridColumn8.Caption = "计量单位"; + this.gridColumn8.FieldName = "unit"; + this.gridColumn8.Name = "gridColumn8"; + this.gridColumn8.Visible = true; + this.gridColumn8.VisibleIndex = 7; + this.gridColumn8.Width = 201; + // + // gridColumn9 + // + this.gridColumn9.Caption = "采购单价"; + this.gridColumn9.FieldName = "unitprice"; + this.gridColumn9.Name = "gridColumn9"; + this.gridColumn9.Visible = true; + this.gridColumn9.VisibleIndex = 8; + this.gridColumn9.Width = 201; + // + // gridColumn10 + // + this.gridColumn10.Caption = "金额"; + this.gridColumn10.FieldName = "money"; + this.gridColumn10.Name = "gridColumn10"; + this.gridColumn10.Visible = true; + this.gridColumn10.VisibleIndex = 9; + this.gridColumn10.Width = 201; + // + // gridColumn11 + // + this.gridColumn11.Caption = "仓库"; + this.gridColumn11.FieldName = "warehouse"; + this.gridColumn11.Name = "gridColumn11"; + this.gridColumn11.Visible = true; + this.gridColumn11.VisibleIndex = 10; + this.gridColumn11.Width = 201; + // + // gridColumn12 + // + this.gridColumn12.Caption = "退货单号"; + this.gridColumn12.FieldName = "returnbuyercode"; + this.gridColumn12.Name = "gridColumn12"; + this.gridColumn12.Visible = true; + this.gridColumn12.VisibleIndex = 11; + this.gridColumn12.Width = 201; + // + // gridColumn13 + // + this.gridColumn13.Caption = "退货明细单号"; + this.gridColumn13.FieldName = "returnbuyerdetailcode"; + this.gridColumn13.Name = "gridColumn13"; + this.gridColumn13.Visible = true; + this.gridColumn13.VisibleIndex = 12; + this.gridColumn13.Width = 201; + // + // gridColumn14 + // + this.gridColumn14.Caption = "备注"; + this.gridColumn14.FieldName = "remark"; + this.gridColumn14.Name = "gridColumn14"; + this.gridColumn14.Visible = true; + this.gridColumn14.VisibleIndex = 13; + this.gridColumn14.Width = 201; + // + // xtraTabControl1 + // + this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.xtraTabControl1.Location = new System.Drawing.Point(0, 34); + this.xtraTabControl1.Name = "xtraTabControl1"; + this.xtraTabControl1.SelectedTabPage = this.tabDataList; + this.xtraTabControl1.Size = new System.Drawing.Size(1300, 766); + this.xtraTabControl1.TabIndex = 1; + this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { + this.tabDataList, + this.tabDataDetail}); + // + // tabDataList + // + this.tabDataList.Controls.Add(this.grdList); + this.tabDataList.Name = "tabDataList"; + this.tabDataList.Size = new System.Drawing.Size(1294, 737); + this.tabDataList.Text = "数据列表"; + // + // grdList + // + this.grdList.Dock = System.Windows.Forms.DockStyle.Fill; + this.grdList.Location = new System.Drawing.Point(0, 0); + this.grdList.MainView = this.grdListView; + this.grdList.Name = "grdList"; + this.grdList.Size = new System.Drawing.Size(1294, 737); + this.grdList.TabIndex = 0; + this.grdList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.grdListView}); + // + // grdListView + // + this.grdListView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gridColumn1, + this.gridColumn2, + this.gridColumn3, + this.gridColumn4, + this.gridColumn5, + this.gridColumn6, + this.gridColumn7, + this.gridColumn8, + this.gridColumn9, + this.gridColumn10, + this.gridColumn11, + this.gridColumn12, + this.gridColumn13, + this.gridColumn14}); + this.grdListView.GridControl = this.grdList; + this.grdListView.Name = "grdListView"; + this.grdListView.OptionsBehavior.Editable = false; + this.grdListView.OptionsView.ColumnAutoWidth = false; + // + // tabDataDetail + // + this.tabDataDetail.Controls.Add(this.panelControl2); + this.tabDataDetail.Name = "tabDataDetail"; + this.tabDataDetail.Size = new System.Drawing.Size(1294, 737); + this.tabDataDetail.Text = "数据编辑"; + // + // panelControl2 + // + this.panelControl2.Controls.Add(this.layoutControl1); + this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panelControl2.Location = new System.Drawing.Point(0, 0); + this.panelControl2.Name = "panelControl2"; + this.panelControl2.Size = new System.Drawing.Size(1294, 737); + this.panelControl2.TabIndex = 0; + // + // layoutControl1 + // + this.layoutControl1.Controls.Add(this.txtid); + this.layoutControl1.Controls.Add(this.txtbuyerdetailcode); + this.layoutControl1.Controls.Add(this.txtbuyercode); + this.layoutControl1.Controls.Add(this.txtmaterialcode); + this.layoutControl1.Controls.Add(this.txtmaterialid); + this.layoutControl1.Controls.Add(this.txtmaterialspec); + this.layoutControl1.Controls.Add(this.txtreturnnumber); + this.layoutControl1.Controls.Add(this.txtunit); + this.layoutControl1.Controls.Add(this.txtunitprice); + this.layoutControl1.Controls.Add(this.txtmoney); + this.layoutControl1.Controls.Add(this.txtwarehouse); + this.layoutControl1.Controls.Add(this.txtreturnbuyercode); + this.layoutControl1.Controls.Add(this.txtreturnbuyerdetailcode); + this.layoutControl1.Controls.Add(this.txtremark); + this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.layoutControl1.Location = new System.Drawing.Point(2, 2); + this.layoutControl1.Name = "layoutControl1"; + this.layoutControl1.Root = this.layoutControlGroup1; + this.layoutControl1.Size = new System.Drawing.Size(1290, 733); + this.layoutControl1.TabIndex = 6; + this.layoutControl1.Text = "layoutControl1"; + // + // layoutControlGroup1 + // + this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1"; + this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem2, + this.layoutControlItem3, + this.layoutControlItem4, + this.layoutControlItem5, + this.layoutControlItem6, + this.layoutControlItem7, + this.layoutControlItem8, + this.layoutControlItem9, + this.layoutControlItem10, + this.layoutControlItem11, + this.layoutControlItem12, + this.layoutControlItem13, + this.layoutControlItem14}); + this.layoutControlGroup1.Name = "layoutControlGroup1"; + this.layoutControlGroup1.Size = new System.Drawing.Size(1290, 733); + this.layoutControlGroup1.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.txtid; + this.layoutControlItem1.CustomizationFormText = "id"; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem1.Text = "id"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(72, 14); + // + // txtid + // + this.txtid.Location = new System.Drawing.Point(87, 12); + this.txtid.Name = "txtid"; + this.txtid.Size = new System.Drawing.Size(1191, 20); + this.txtid.StyleController = this.layoutControl1; + this.txtid.TabIndex = 1; + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.txtbuyerdetailcode; + this.layoutControlItem2.CustomizationFormText = "采购明细单号"; + this.layoutControlItem2.Location = new System.Drawing.Point(0, 24); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem2.Text = "采购明细单号"; + this.layoutControlItem2.TextSize = new System.Drawing.Size(72, 14); + // + // txtbuyerdetailcode + // + this.txtbuyerdetailcode.Location = new System.Drawing.Point(87, 36); + this.txtbuyerdetailcode.Name = "txtbuyerdetailcode"; + this.txtbuyerdetailcode.Size = new System.Drawing.Size(1191, 20); + this.txtbuyerdetailcode.StyleController = this.layoutControl1; + this.txtbuyerdetailcode.TabIndex = 2; + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.txtbuyercode; + this.layoutControlItem3.CustomizationFormText = "采购单号"; + this.layoutControlItem3.Location = new System.Drawing.Point(0, 48); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem3.Text = "采购单号"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(72, 14); + // + // txtbuyercode + // + this.txtbuyercode.Location = new System.Drawing.Point(87, 60); + this.txtbuyercode.Name = "txtbuyercode"; + this.txtbuyercode.Size = new System.Drawing.Size(1191, 20); + this.txtbuyercode.StyleController = this.layoutControl1; + this.txtbuyercode.TabIndex = 3; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.txtmaterialcode; + this.layoutControlItem4.CustomizationFormText = "物料编码"; + this.layoutControlItem4.Location = new System.Drawing.Point(0, 72); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem4.Text = "物料编码"; + this.layoutControlItem4.TextSize = new System.Drawing.Size(72, 14); + // + // txtmaterialcode + // + this.txtmaterialcode.Location = new System.Drawing.Point(87, 84); + this.txtmaterialcode.Name = "txtmaterialcode"; + this.txtmaterialcode.Size = new System.Drawing.Size(1191, 20); + this.txtmaterialcode.StyleController = this.layoutControl1; + this.txtmaterialcode.TabIndex = 4; + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.txtmaterialid; + this.layoutControlItem5.CustomizationFormText = "物料名称"; + this.layoutControlItem5.Location = new System.Drawing.Point(0, 96); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem5.Text = "物料名称"; + this.layoutControlItem5.TextSize = new System.Drawing.Size(72, 14); + // + // txtmaterialid + // + this.txtmaterialid.Location = new System.Drawing.Point(87, 108); + this.txtmaterialid.Name = "txtmaterialid"; + this.txtmaterialid.Size = new System.Drawing.Size(1191, 20); + this.txtmaterialid.StyleController = this.layoutControl1; + this.txtmaterialid.TabIndex = 5; + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.txtmaterialspec; + this.layoutControlItem6.CustomizationFormText = "规格型号"; + this.layoutControlItem6.Location = new System.Drawing.Point(0, 120); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem6.Text = "规格型号"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(72, 14); + // + // txtmaterialspec + // + this.txtmaterialspec.Location = new System.Drawing.Point(87, 132); + this.txtmaterialspec.Name = "txtmaterialspec"; + this.txtmaterialspec.Size = new System.Drawing.Size(1191, 20); + this.txtmaterialspec.StyleController = this.layoutControl1; + this.txtmaterialspec.TabIndex = 6; + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.txtreturnnumber; + this.layoutControlItem7.CustomizationFormText = "退货数量"; + this.layoutControlItem7.Location = new System.Drawing.Point(0, 144); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem7.Text = "退货数量"; + this.layoutControlItem7.TextSize = new System.Drawing.Size(72, 14); + // + // txtreturnnumber + // + this.txtreturnnumber.Location = new System.Drawing.Point(87, 156); + this.txtreturnnumber.Name = "txtreturnnumber"; + this.txtreturnnumber.Size = new System.Drawing.Size(1191, 20); + this.txtreturnnumber.StyleController = this.layoutControl1; + this.txtreturnnumber.TabIndex = 7; + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.txtunit; + this.layoutControlItem8.CustomizationFormText = "计量单位"; + this.layoutControlItem8.Location = new System.Drawing.Point(0, 168); + this.layoutControlItem8.Name = "layoutControlItem8"; + this.layoutControlItem8.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem8.Text = "计量单位"; + this.layoutControlItem8.TextSize = new System.Drawing.Size(72, 14); + // + // txtunit + // + this.txtunit.Location = new System.Drawing.Point(87, 180); + this.txtunit.Name = "txtunit"; + this.txtunit.Size = new System.Drawing.Size(1191, 20); + this.txtunit.StyleController = this.layoutControl1; + this.txtunit.TabIndex = 8; + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.txtunitprice; + this.layoutControlItem9.CustomizationFormText = "采购单价"; + this.layoutControlItem9.Location = new System.Drawing.Point(0, 192); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem9.Text = "采购单价"; + this.layoutControlItem9.TextSize = new System.Drawing.Size(72, 14); + // + // txtunitprice + // + this.txtunitprice.Location = new System.Drawing.Point(87, 204); + this.txtunitprice.Name = "txtunitprice"; + this.txtunitprice.Size = new System.Drawing.Size(1191, 20); + this.txtunitprice.StyleController = this.layoutControl1; + this.txtunitprice.TabIndex = 9; + // + // layoutControlItem10 + // + this.layoutControlItem10.Control = this.txtmoney; + this.layoutControlItem10.CustomizationFormText = "金额"; + this.layoutControlItem10.Location = new System.Drawing.Point(0, 216); + this.layoutControlItem10.Name = "layoutControlItem10"; + this.layoutControlItem10.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem10.Text = "金额"; + this.layoutControlItem10.TextSize = new System.Drawing.Size(72, 14); + // + // txtmoney + // + this.txtmoney.Location = new System.Drawing.Point(87, 228); + this.txtmoney.Name = "txtmoney"; + this.txtmoney.Size = new System.Drawing.Size(1191, 20); + this.txtmoney.StyleController = this.layoutControl1; + this.txtmoney.TabIndex = 10; + // + // layoutControlItem11 + // + this.layoutControlItem11.Control = this.txtwarehouse; + this.layoutControlItem11.CustomizationFormText = "仓库"; + this.layoutControlItem11.Location = new System.Drawing.Point(0, 240); + this.layoutControlItem11.Name = "layoutControlItem11"; + this.layoutControlItem11.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem11.Text = "仓库"; + this.layoutControlItem11.TextSize = new System.Drawing.Size(72, 14); + // + // txtwarehouse + // + this.txtwarehouse.Location = new System.Drawing.Point(87, 252); + this.txtwarehouse.Name = "txtwarehouse"; + this.txtwarehouse.Size = new System.Drawing.Size(1191, 20); + this.txtwarehouse.StyleController = this.layoutControl1; + this.txtwarehouse.TabIndex = 11; + // + // layoutControlItem12 + // + this.layoutControlItem12.Control = this.txtreturnbuyercode; + this.layoutControlItem12.CustomizationFormText = "退货单号"; + this.layoutControlItem12.Location = new System.Drawing.Point(0, 264); + this.layoutControlItem12.Name = "layoutControlItem12"; + this.layoutControlItem12.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem12.Text = "退货单号"; + this.layoutControlItem12.TextSize = new System.Drawing.Size(72, 14); + // + // txtreturnbuyercode + // + this.txtreturnbuyercode.Location = new System.Drawing.Point(87, 276); + this.txtreturnbuyercode.Name = "txtreturnbuyercode"; + this.txtreturnbuyercode.Size = new System.Drawing.Size(1191, 20); + this.txtreturnbuyercode.StyleController = this.layoutControl1; + this.txtreturnbuyercode.TabIndex = 12; + // + // layoutControlItem13 + // + this.layoutControlItem13.Control = this.txtreturnbuyerdetailcode; + this.layoutControlItem13.CustomizationFormText = "退货明细单号"; + this.layoutControlItem13.Location = new System.Drawing.Point(0, 288); + this.layoutControlItem13.Name = "layoutControlItem13"; + this.layoutControlItem13.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem13.Text = "退货明细单号"; + this.layoutControlItem13.TextSize = new System.Drawing.Size(72, 14); + // + // txtreturnbuyerdetailcode + // + this.txtreturnbuyerdetailcode.Location = new System.Drawing.Point(87, 300); + this.txtreturnbuyerdetailcode.Name = "txtreturnbuyerdetailcode"; + this.txtreturnbuyerdetailcode.Size = new System.Drawing.Size(1191, 20); + this.txtreturnbuyerdetailcode.StyleController = this.layoutControl1; + this.txtreturnbuyerdetailcode.TabIndex = 13; + // + // layoutControlItem14 + // + this.layoutControlItem14.Control = this.txtremark; + this.layoutControlItem14.CustomizationFormText = "备注"; + this.layoutControlItem14.Location = new System.Drawing.Point(0, 312); + this.layoutControlItem14.Name = "layoutControlItem14"; + this.layoutControlItem14.Size = new System.Drawing.Size(1270, 401); + this.layoutControlItem14.Text = "备注"; + this.layoutControlItem14.TextSize = new System.Drawing.Size(72, 14); + // + // txtremark + // + this.txtremark.Location = new System.Drawing.Point(87, 324); + this.txtremark.Name = "txtremark"; + this.txtremark.Size = new System.Drawing.Size(1191, 20); + this.txtremark.StyleController = this.layoutControl1; + this.txtremark.TabIndex = 14; + // + // Frmbuyerreturndetail + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1300, 800); + this.Controls.Add(this.xtraTabControl1); + this.Name = "Frmbuyerreturndetail"; + this.Text = "Frmbuyerreturndetail"; + this.Load += new System.EventHandler(this.Frmbuyerreturndetail_Load); + this.Controls.SetChildIndex(this.xtraTabControl1, 0); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); + this.xtraTabControl1.ResumeLayout(false); + this.tabDataList.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.grdList)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.grdListView)).EndInit(); + this.tabDataDetail.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit(); + this.panelControl2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); + this.layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtbuyerdetailcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtbuyercode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialspec.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturnnumber.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtunitprice.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtmoney.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturnbuyercode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturnbuyerdetailcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private XtraTabControl xtraTabControl1; + private XtraTabPage tabDataList; + private XtraTabPage tabDataDetail; + private DevExpress.XtraGrid.GridControl grdList; + private DevExpress.XtraGrid.Views.Grid.GridView grdListView; + private PanelControl panelControl2; + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + + private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn2; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn3; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn4; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn5; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn6; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn7; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn8; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn9; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn10; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn11; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn12; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn13; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn14; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtbuyerdetailcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtbuyercode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmaterialcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmaterialid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmaterialspec; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtreturnnumber; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtunit; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtunitprice; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmoney; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtwarehouse; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtreturnbuyercode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtreturnbuyerdetailcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtremark; + + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14; + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/Frmbuyerreturndetail.resx b/WinformGeneralDeveloperFrame/Form/Frmbuyerreturndetail.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/Frmbuyerreturndetail.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/Frmquotation.cs b/WinformGeneralDeveloperFrame/Form/Frmquotation.cs index 598a390..0076392 100644 --- a/WinformGeneralDeveloperFrame/Form/Frmquotation.cs +++ b/WinformGeneralDeveloperFrame/Form/Frmquotation.cs @@ -374,6 +374,10 @@ namespace MES.Form } private void gridView1_RowUpdated(object sender, DevExpress.XtraGrid.Views.Base.RowObjectEventArgs e) + { + } + + private void gridControl1_Validated(object sender, EventArgs e) { txttotalprice.Text = gridColumn17.SummaryItem.SummaryValue.ToString(); } diff --git a/WinformGeneralDeveloperFrame/Form/Frmquotation.designer.cs b/WinformGeneralDeveloperFrame/Form/Frmquotation.designer.cs index 7e26c33..8bb3a05 100644 --- a/WinformGeneralDeveloperFrame/Form/Frmquotation.designer.cs +++ b/WinformGeneralDeveloperFrame/Form/Frmquotation.designer.cs @@ -78,6 +78,7 @@ namespace MES.Form this.gridColumn20 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn21 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn22 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn24 = new DevExpress.XtraGrid.Columns.GridColumn(); this.txtid = new DevExpress.XtraEditors.TextEdit(); this.txtcustomerid = new DevExpress.XtraEditors.LookUpEdit(); this.txtquotationdate = new DevExpress.XtraEditors.DateEdit(); @@ -101,7 +102,6 @@ namespace MES.Form this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); - this.gridColumn24 = new DevExpress.XtraGrid.Columns.GridColumn(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcustomerid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcustomertype)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcustomeruser)).BeginInit(); @@ -394,6 +394,7 @@ namespace MES.Form this.gridControl1.TabIndex = 11; this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.gridView1}); + this.gridControl1.Validated += new System.EventHandler(this.gridControl1_Validated); // // contextMenuStrip1 // @@ -584,6 +585,15 @@ namespace MES.Form this.gridColumn22.VisibleIndex = 10; this.gridColumn22.Width = 201; // + // gridColumn24 + // + this.gridColumn24.Caption = "明细单号"; + this.gridColumn24.FieldName = "quotationdetailcode"; + this.gridColumn24.Name = "gridColumn24"; + this.gridColumn24.OptionsColumn.AllowEdit = false; + this.gridColumn24.Visible = true; + this.gridColumn24.VisibleIndex = 0; + // // txtid // this.txtid.Location = new System.Drawing.Point(63, 12); @@ -841,15 +851,6 @@ namespace MES.Form this.layoutControlItem12.Text = "总价"; this.layoutControlItem12.TextSize = new System.Drawing.Size(48, 14); // - // gridColumn24 - // - this.gridColumn24.Caption = "明细单号"; - this.gridColumn24.FieldName = "quotationdetailcode"; - this.gridColumn24.Name = "gridColumn24"; - this.gridColumn24.OptionsColumn.AllowEdit = false; - this.gridColumn24.Visible = true; - this.gridColumn24.VisibleIndex = 0; - // // Frmquotation // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); diff --git a/WinformGeneralDeveloperFrame/Form/Frmrequisition.cs b/WinformGeneralDeveloperFrame/Form/Frmrequisition.cs index 8c82feb..d4195af 100644 --- a/WinformGeneralDeveloperFrame/Form/Frmrequisition.cs +++ b/WinformGeneralDeveloperFrame/Form/Frmrequisition.cs @@ -316,6 +316,10 @@ namespace MES.Form ; } gridView1.BestFitColumns(); + } + + private void gridControl1_Validated(object sender, EventArgs e) + { txttotalprice.Text = gridColumn18.SummaryItem.SummaryValue.ToString(); } } diff --git a/WinformGeneralDeveloperFrame/Form/Frmrequisition.designer.cs b/WinformGeneralDeveloperFrame/Form/Frmrequisition.designer.cs index de270b4..58b5204 100644 --- a/WinformGeneralDeveloperFrame/Form/Frmrequisition.designer.cs +++ b/WinformGeneralDeveloperFrame/Form/Frmrequisition.designer.cs @@ -366,6 +366,7 @@ namespace MES.Form this.gridControl1.TabIndex = 1; this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.gridView1}); + this.gridControl1.Validated += new System.EventHandler(this.gridControl1_Validated); // // contextMenuStrip1 // diff --git a/WinformGeneralDeveloperFrame/Form/Frmworkorder.cs b/WinformGeneralDeveloperFrame/Form/Frmworkorder.cs new file mode 100644 index 0000000..532c2af --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/Frmworkorder.cs @@ -0,0 +1,254 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using WinformGeneralDeveloperFrame; +using WinformGeneralDeveloperFrame.Commons; +using DevExpress.XtraLayout; +using MES.Entity; +using System.Data.Entity.Migrations; +using System.Data.Entity; +namespace MES.Form +{ + public partial class Frmworkorder : FrmBaseForm + { + private Dictionary fieldDictionary = new Dictionary(); + public Frmworkorder() + { + InitializeComponent(); + } + private void Frmworkorder_Load(object sender, EventArgs e) + { + InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new workorderInfo()); + InitSearchDicData(); + } + /// + /// 数据源初始化 + /// + /// + private void Init() + { + txtworkordertype.Properties.DataSource = GetDataTableUtils.SqlTable("部门"); + repositoryItemtxtworkordertype.DataSource= GetDataTableUtils.SqlTable("部门"); + txtproductdept.Properties.DataSource = GetDataTableUtils.SqlTable("部门"); + repositoryItemtxtproductdept.DataSource= GetDataTableUtils.SqlTable("部门"); + txtproductid.Properties.DataSource = GetDataTableUtils.SqlTable("产品"); + repositoryItemtxtproductid.DataSource= GetDataTableUtils.SqlTable("产品"); + txtunit.Properties.DataSource = GetDataTableUtils.SqlTable("计量单位"); + repositoryItemtxtunit.DataSource= GetDataTableUtils.SqlTable("计量单位"); + txtwarehouse.Properties.DataSource = GetDataTableUtils.SqlTable("仓库"); + repositoryItemtxtwarehouse.DataSource= GetDataTableUtils.SqlTable("仓库"); + txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户"); + repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户"); + } + /// + /// 搜索字段 + /// + /// + private void InitSearchDicData() + { + fieldDictionary.Add("id","id"); + fieldDictionary.Add("工单号","wordordercode"); + fieldDictionary.Add("销售单号","salecode"); + fieldDictionary.Add("销售明细单号","saledetailcode"); + fieldDictionary.Add("工单类型","workordertype"); + fieldDictionary.Add("生产日期","productdate"); + fieldDictionary.Add("生产单位","productdept"); + fieldDictionary.Add("产品编号","productcode"); + fieldDictionary.Add("产品名称","productid"); + fieldDictionary.Add("规格型号","spec"); + fieldDictionary.Add("生产数量","productnumber"); + fieldDictionary.Add("计量单位","unit"); + fieldDictionary.Add("完工日期","finishdate"); + fieldDictionary.Add("交货日期","deliverdate"); + fieldDictionary.Add("仓库","warehouse"); + fieldDictionary.Add("制单人","creatorId"); + fieldDictionary.Add("制单日期","createTime"); + fieldDictionary.Add("备注","remark"); + } + + public override void InitgrdListDataSource() + { + using (var con=new MESDB())/// + { + grdList.DataSource=con.workorderInfo.ToList(); + } + Init(); + } + /// + /// 字段为空校验 + /// + /// + public override bool CheckInput() + { + if(string.IsNullOrEmpty(txtwordordercode.EditValue.ToString())) + { + "工单号不能为空".ShowWarning(); + txtwordordercode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtsalecode.EditValue.ToString())) + { + "销售单号不能为空".ShowWarning(); + txtsalecode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtsaledetailcode.EditValue.ToString())) + { + "销售明细单号不能为空".ShowWarning(); + txtsaledetailcode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtworkordertype.EditValue.ToString())) + { + "工单类型不能为空".ShowWarning(); + txtworkordertype.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtproductdate.EditValue.ToString())) + { + "生产日期不能为空".ShowWarning(); + txtproductdate.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtproductdept.EditValue.ToString())) + { + "生产单位不能为空".ShowWarning(); + txtproductdept.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtproductcode.EditValue.ToString())) + { + "产品编号不能为空".ShowWarning(); + txtproductcode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtproductid.EditValue.ToString())) + { + "产品名称不能为空".ShowWarning(); + txtproductid.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtspec.EditValue.ToString())) + { + "规格型号不能为空".ShowWarning(); + txtspec.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtproductnumber.EditValue.ToString())) + { + "生产数量不能为空".ShowWarning(); + txtproductnumber.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtunit.EditValue.ToString())) + { + "计量单位不能为空".ShowWarning(); + txtunit.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtfinishdate.EditValue.ToString())) + { + "完工日期不能为空".ShowWarning(); + txtfinishdate.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtdeliverdate.EditValue.ToString())) + { + "交货日期不能为空".ShowWarning(); + txtdeliverdate.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtwarehouse.EditValue.ToString())) + { + "仓库不能为空".ShowWarning(); + txtwarehouse.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtcreatorId.EditValue.ToString())) + { + "制单人不能为空".ShowWarning(); + txtcreatorId.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtcreateTime.EditValue.ToString())) + { + "制单日期不能为空".ShowWarning(); + txtcreateTime.Focus(); + return false; + } + return true; + } + /// + /// 保存 + /// + /// + public override bool SaveFunction() + { + try + { + workorderInfo info= (workorderInfo)this.ControlDataToModel(new workorderInfo()); + using (var db = new MESDB()) + { + db.workorderInfo.AddOrUpdate(info); + db.SaveChanges(); + } + } + catch (Exception ex) + { + ex.Message.ShowError(); + return false; + } + return true; + } + /// + /// 删除 + /// + /// + public override bool DelFunction() + { + try + { + workorderInfo info = (workorderInfo)this.ControlDataToModel(new workorderInfo()); + using (var db = new MESDB()) + { + db.Entry(info).State=EntityState.Deleted; + db.SaveChanges(); + } + } + catch (Exception ex) + { + ex.Message.ShowError(); + return false; + } + return true; + } + /// + /// 搜索 + /// + /// + public override void SearchFunction() + { + FrmSearch frm = new FrmSearch(fieldDictionary); + if (frm.ShowDialog()==DialogResult.OK) + { + string sql = frm.sql; + using (var db = new MESDB()) + { + if (string.IsNullOrEmpty(sql)) + { + grdList.DataSource = db.workorderInfo.SqlQuery("select * from workorder").ToList(); + } + else + { + grdList.DataSource = db.workorderInfo.SqlQuery($"select * from workorder where {sql}").ToList(); + } + } + } + } + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/Frmworkorder.designer.cs b/WinformGeneralDeveloperFrame/Form/Frmworkorder.designer.cs new file mode 100644 index 0000000..2fb3ad3 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/Frmworkorder.designer.cs @@ -0,0 +1,1077 @@ + +using DevExpress.XtraEditors; +using DevExpress.XtraLayout; +using DevExpress.XtraTab; + +namespace MES.Form +{ + partial class Frmworkorder + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemtxtworkordertype = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn7 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemtxtproductdept = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemtxtproductid = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn10 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn11 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn12 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemtxtunit = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn13 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn14 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn15 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemtxtwarehouse = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn16 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemtxtcreatorId = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn17 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn18 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); + this.tabDataList = new DevExpress.XtraTab.XtraTabPage(); + this.grdList = new DevExpress.XtraGrid.GridControl(); + this.grdListView = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.tabDataDetail = new DevExpress.XtraTab.XtraTabPage(); + this.panelControl2 = new DevExpress.XtraEditors.PanelControl(); + this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtid = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtwordordercode = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtsalecode = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtsaledetailcode = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtworkordertype = new DevExpress.XtraEditors.LookUpEdit(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtproductdate = new DevExpress.XtraEditors.DateEdit(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtproductdept = new DevExpress.XtraEditors.LookUpEdit(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtproductcode = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtproductid = new DevExpress.XtraEditors.LookUpEdit(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtspec = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtproductnumber = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtunit = new DevExpress.XtraEditors.LookUpEdit(); + this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtfinishdate = new DevExpress.XtraEditors.DateEdit(); + this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtdeliverdate = new DevExpress.XtraEditors.DateEdit(); + this.layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtwarehouse = new DevExpress.XtraEditors.LookUpEdit(); + this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtcreatorId = new DevExpress.XtraEditors.LookUpEdit(); + this.layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtcreateTime = new DevExpress.XtraEditors.DateEdit(); + this.layoutControlItem18 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtremark = new DevExpress.XtraEditors.TextEdit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtworkordertype)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtproductdept)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtproductid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtunit)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtwarehouse)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); + this.xtraTabControl1.SuspendLayout(); + this.tabDataList.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.grdList)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.grdListView)).BeginInit(); + this.tabDataDetail.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit(); + this.panelControl2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); + this.layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtwordordercode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtsalecode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtsaledetailcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtworkordertype.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductdate.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductdate.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductdept.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtspec.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductnumber.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtfinishdate.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtfinishdate.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtdeliverdate.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtdeliverdate.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).BeginInit(); + this.SuspendLayout(); + // + // gridColumn1 + // + this.gridColumn1.Caption = "id"; + this.gridColumn1.FieldName = "id"; + this.gridColumn1.Name = "gridColumn1"; + // + // gridColumn2 + // + this.gridColumn2.Caption = "工单号"; + this.gridColumn2.FieldName = "wordordercode"; + this.gridColumn2.Name = "gridColumn2"; + this.gridColumn2.Visible = true; + this.gridColumn2.VisibleIndex = 0; + this.gridColumn2.Width = 201; + // + // gridColumn3 + // + this.gridColumn3.Caption = "销售单号"; + this.gridColumn3.FieldName = "salecode"; + this.gridColumn3.Name = "gridColumn3"; + this.gridColumn3.Visible = true; + this.gridColumn3.VisibleIndex = 1; + this.gridColumn3.Width = 201; + // + // gridColumn4 + // + this.gridColumn4.Caption = "销售明细单号"; + this.gridColumn4.FieldName = "saledetailcode"; + this.gridColumn4.Name = "gridColumn4"; + this.gridColumn4.Visible = true; + this.gridColumn4.VisibleIndex = 2; + this.gridColumn4.Width = 201; + // + // gridColumn5 + // + this.gridColumn5.Caption = "工单类型"; + this.gridColumn5.ColumnEdit = this.repositoryItemtxtworkordertype; + this.gridColumn5.FieldName = "workordertype"; + this.gridColumn5.Name = "gridColumn5"; + this.gridColumn5.Visible = true; + this.gridColumn5.VisibleIndex = 3; + this.gridColumn5.Width = 201; + // + // repositoryItemtxtworkordertype + // + this.repositoryItemtxtworkordertype.AutoHeight = false; + this.repositoryItemtxtworkordertype.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtworkordertype.DisplayMember = "Name"; + this.repositoryItemtxtworkordertype.Name = "repositoryItemtxtworkordertype"; + this.repositoryItemtxtworkordertype.ValueMember = "ID"; + // + // gridColumn6 + // + this.gridColumn6.Caption = "生产日期"; + this.gridColumn6.DisplayFormat.FormatString = "G"; + this.gridColumn6.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.gridColumn6.FieldName = "productdate"; + this.gridColumn6.Name = "gridColumn6"; + this.gridColumn6.Visible = true; + this.gridColumn6.VisibleIndex = 4; + this.gridColumn6.Width = 201; + // + // gridColumn7 + // + this.gridColumn7.Caption = "生产单位"; + this.gridColumn7.ColumnEdit = this.repositoryItemtxtproductdept; + this.gridColumn7.FieldName = "productdept"; + this.gridColumn7.Name = "gridColumn7"; + this.gridColumn7.Visible = true; + this.gridColumn7.VisibleIndex = 5; + this.gridColumn7.Width = 201; + // + // repositoryItemtxtproductdept + // + this.repositoryItemtxtproductdept.AutoHeight = false; + this.repositoryItemtxtproductdept.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtproductdept.DisplayMember = "Name"; + this.repositoryItemtxtproductdept.Name = "repositoryItemtxtproductdept"; + this.repositoryItemtxtproductdept.ValueMember = "ID"; + // + // gridColumn8 + // + this.gridColumn8.Caption = "产品编号"; + this.gridColumn8.FieldName = "productcode"; + this.gridColumn8.Name = "gridColumn8"; + this.gridColumn8.Visible = true; + this.gridColumn8.VisibleIndex = 6; + this.gridColumn8.Width = 201; + // + // gridColumn9 + // + this.gridColumn9.Caption = "产品名称"; + this.gridColumn9.ColumnEdit = this.repositoryItemtxtproductid; + this.gridColumn9.FieldName = "productid"; + this.gridColumn9.Name = "gridColumn9"; + this.gridColumn9.Visible = true; + this.gridColumn9.VisibleIndex = 7; + this.gridColumn9.Width = 201; + // + // repositoryItemtxtproductid + // + this.repositoryItemtxtproductid.AutoHeight = false; + this.repositoryItemtxtproductid.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtproductid.DisplayMember = "Name"; + this.repositoryItemtxtproductid.Name = "repositoryItemtxtproductid"; + this.repositoryItemtxtproductid.ValueMember = "ID"; + // + // gridColumn10 + // + this.gridColumn10.Caption = "规格型号"; + this.gridColumn10.FieldName = "spec"; + this.gridColumn10.Name = "gridColumn10"; + this.gridColumn10.Visible = true; + this.gridColumn10.VisibleIndex = 8; + this.gridColumn10.Width = 201; + // + // gridColumn11 + // + this.gridColumn11.Caption = "生产数量"; + this.gridColumn11.FieldName = "productnumber"; + this.gridColumn11.Name = "gridColumn11"; + this.gridColumn11.Visible = true; + this.gridColumn11.VisibleIndex = 9; + this.gridColumn11.Width = 201; + // + // gridColumn12 + // + this.gridColumn12.Caption = "计量单位"; + this.gridColumn12.ColumnEdit = this.repositoryItemtxtunit; + this.gridColumn12.FieldName = "unit"; + this.gridColumn12.Name = "gridColumn12"; + this.gridColumn12.Visible = true; + this.gridColumn12.VisibleIndex = 10; + this.gridColumn12.Width = 201; + // + // repositoryItemtxtunit + // + this.repositoryItemtxtunit.AutoHeight = false; + this.repositoryItemtxtunit.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtunit.DisplayMember = "Name"; + this.repositoryItemtxtunit.Name = "repositoryItemtxtunit"; + this.repositoryItemtxtunit.ValueMember = "ID"; + // + // gridColumn13 + // + this.gridColumn13.Caption = "完工日期"; + this.gridColumn13.DisplayFormat.FormatString = "G"; + this.gridColumn13.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.gridColumn13.FieldName = "finishdate"; + this.gridColumn13.Name = "gridColumn13"; + this.gridColumn13.Visible = true; + this.gridColumn13.VisibleIndex = 11; + this.gridColumn13.Width = 201; + // + // gridColumn14 + // + this.gridColumn14.Caption = "交货日期"; + this.gridColumn14.DisplayFormat.FormatString = "G"; + this.gridColumn14.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.gridColumn14.FieldName = "deliverdate"; + this.gridColumn14.Name = "gridColumn14"; + this.gridColumn14.Visible = true; + this.gridColumn14.VisibleIndex = 12; + this.gridColumn14.Width = 201; + // + // gridColumn15 + // + this.gridColumn15.Caption = "仓库"; + this.gridColumn15.ColumnEdit = this.repositoryItemtxtwarehouse; + this.gridColumn15.FieldName = "warehouse"; + this.gridColumn15.Name = "gridColumn15"; + this.gridColumn15.Visible = true; + this.gridColumn15.VisibleIndex = 13; + this.gridColumn15.Width = 201; + // + // repositoryItemtxtwarehouse + // + this.repositoryItemtxtwarehouse.AutoHeight = false; + this.repositoryItemtxtwarehouse.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtwarehouse.DisplayMember = "Name"; + this.repositoryItemtxtwarehouse.Name = "repositoryItemtxtwarehouse"; + this.repositoryItemtxtwarehouse.ValueMember = "ID"; + // + // gridColumn16 + // + this.gridColumn16.Caption = "制单人"; + this.gridColumn16.ColumnEdit = this.repositoryItemtxtcreatorId; + this.gridColumn16.FieldName = "creatorId"; + this.gridColumn16.Name = "gridColumn16"; + this.gridColumn16.Visible = true; + this.gridColumn16.VisibleIndex = 14; + this.gridColumn16.Width = 201; + // + // repositoryItemtxtcreatorId + // + this.repositoryItemtxtcreatorId.AutoHeight = false; + this.repositoryItemtxtcreatorId.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtcreatorId.DisplayMember = "Name"; + this.repositoryItemtxtcreatorId.Name = "repositoryItemtxtcreatorId"; + this.repositoryItemtxtcreatorId.ValueMember = "ID"; + // + // gridColumn17 + // + this.gridColumn17.Caption = "制单日期"; + this.gridColumn17.DisplayFormat.FormatString = "G"; + this.gridColumn17.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.gridColumn17.FieldName = "createTime"; + this.gridColumn17.Name = "gridColumn17"; + this.gridColumn17.Visible = true; + this.gridColumn17.VisibleIndex = 15; + this.gridColumn17.Width = 201; + // + // gridColumn18 + // + this.gridColumn18.Caption = "备注"; + this.gridColumn18.FieldName = "remark"; + this.gridColumn18.Name = "gridColumn18"; + this.gridColumn18.Visible = true; + this.gridColumn18.VisibleIndex = 16; + this.gridColumn18.Width = 201; + // + // xtraTabControl1 + // + this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.xtraTabControl1.Location = new System.Drawing.Point(0, 34); + this.xtraTabControl1.Name = "xtraTabControl1"; + this.xtraTabControl1.SelectedTabPage = this.tabDataList; + this.xtraTabControl1.Size = new System.Drawing.Size(1300, 766); + this.xtraTabControl1.TabIndex = 1; + this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { + this.tabDataList, + this.tabDataDetail}); + // + // tabDataList + // + this.tabDataList.Controls.Add(this.grdList); + this.tabDataList.Name = "tabDataList"; + this.tabDataList.Size = new System.Drawing.Size(1294, 737); + this.tabDataList.Text = "数据列表"; + // + // grdList + // + this.grdList.Dock = System.Windows.Forms.DockStyle.Fill; + this.grdList.Location = new System.Drawing.Point(0, 0); + this.grdList.MainView = this.grdListView; + this.grdList.Name = "grdList"; + this.grdList.Size = new System.Drawing.Size(1294, 737); + this.grdList.TabIndex = 0; + this.grdList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.grdListView}); + // + // grdListView + // + this.grdListView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gridColumn1, + this.gridColumn2, + this.gridColumn3, + this.gridColumn4, + this.gridColumn5, + this.gridColumn6, + this.gridColumn7, + this.gridColumn8, + this.gridColumn9, + this.gridColumn10, + this.gridColumn11, + this.gridColumn12, + this.gridColumn13, + this.gridColumn14, + this.gridColumn15, + this.gridColumn16, + this.gridColumn17, + this.gridColumn18}); + this.grdListView.GridControl = this.grdList; + this.grdListView.Name = "grdListView"; + this.grdListView.OptionsBehavior.Editable = false; + this.grdListView.OptionsView.ColumnAutoWidth = false; + // + // tabDataDetail + // + this.tabDataDetail.Controls.Add(this.panelControl2); + this.tabDataDetail.Name = "tabDataDetail"; + this.tabDataDetail.Size = new System.Drawing.Size(1294, 737); + this.tabDataDetail.Text = "数据编辑"; + // + // panelControl2 + // + this.panelControl2.Controls.Add(this.layoutControl1); + this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panelControl2.Location = new System.Drawing.Point(0, 0); + this.panelControl2.Name = "panelControl2"; + this.panelControl2.Size = new System.Drawing.Size(1294, 737); + this.panelControl2.TabIndex = 0; + // + // layoutControl1 + // + this.layoutControl1.Controls.Add(this.txtid); + this.layoutControl1.Controls.Add(this.txtwordordercode); + this.layoutControl1.Controls.Add(this.txtsalecode); + this.layoutControl1.Controls.Add(this.txtsaledetailcode); + this.layoutControl1.Controls.Add(this.txtworkordertype); + this.layoutControl1.Controls.Add(this.txtproductdate); + this.layoutControl1.Controls.Add(this.txtproductdept); + this.layoutControl1.Controls.Add(this.txtproductcode); + this.layoutControl1.Controls.Add(this.txtproductid); + this.layoutControl1.Controls.Add(this.txtspec); + this.layoutControl1.Controls.Add(this.txtproductnumber); + this.layoutControl1.Controls.Add(this.txtunit); + this.layoutControl1.Controls.Add(this.txtfinishdate); + this.layoutControl1.Controls.Add(this.txtdeliverdate); + this.layoutControl1.Controls.Add(this.txtwarehouse); + this.layoutControl1.Controls.Add(this.txtcreatorId); + this.layoutControl1.Controls.Add(this.txtcreateTime); + this.layoutControl1.Controls.Add(this.txtremark); + this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.layoutControl1.Location = new System.Drawing.Point(2, 2); + this.layoutControl1.Name = "layoutControl1"; + this.layoutControl1.Root = this.layoutControlGroup1; + this.layoutControl1.Size = new System.Drawing.Size(1290, 733); + this.layoutControl1.TabIndex = 6; + this.layoutControl1.Text = "layoutControl1"; + // + // layoutControlGroup1 + // + this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1"; + this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem2, + this.layoutControlItem3, + this.layoutControlItem4, + this.layoutControlItem5, + this.layoutControlItem6, + this.layoutControlItem7, + this.layoutControlItem8, + this.layoutControlItem9, + this.layoutControlItem10, + this.layoutControlItem11, + this.layoutControlItem12, + this.layoutControlItem13, + this.layoutControlItem14, + this.layoutControlItem15, + this.layoutControlItem16, + this.layoutControlItem17, + this.layoutControlItem18}); + this.layoutControlGroup1.Name = "layoutControlGroup1"; + this.layoutControlGroup1.Size = new System.Drawing.Size(1290, 733); + this.layoutControlGroup1.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.txtid; + this.layoutControlItem1.CustomizationFormText = "id"; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem1.Text = "id"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(72, 14); + // + // txtid + // + this.txtid.Location = new System.Drawing.Point(87, 12); + this.txtid.Name = "txtid"; + this.txtid.Size = new System.Drawing.Size(1191, 20); + this.txtid.StyleController = this.layoutControl1; + this.txtid.TabIndex = 1; + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.txtwordordercode; + this.layoutControlItem2.CustomizationFormText = "工单号"; + this.layoutControlItem2.Location = new System.Drawing.Point(0, 24); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem2.Text = "工单号"; + this.layoutControlItem2.TextSize = new System.Drawing.Size(72, 14); + // + // txtwordordercode + // + this.txtwordordercode.Location = new System.Drawing.Point(87, 36); + this.txtwordordercode.Name = "txtwordordercode"; + this.txtwordordercode.Size = new System.Drawing.Size(1191, 20); + this.txtwordordercode.StyleController = this.layoutControl1; + this.txtwordordercode.TabIndex = 2; + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.txtsalecode; + this.layoutControlItem3.CustomizationFormText = "销售单号"; + this.layoutControlItem3.Location = new System.Drawing.Point(0, 48); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem3.Text = "销售单号"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(72, 14); + // + // txtsalecode + // + this.txtsalecode.Location = new System.Drawing.Point(87, 60); + this.txtsalecode.Name = "txtsalecode"; + this.txtsalecode.Size = new System.Drawing.Size(1191, 20); + this.txtsalecode.StyleController = this.layoutControl1; + this.txtsalecode.TabIndex = 3; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.txtsaledetailcode; + this.layoutControlItem4.CustomizationFormText = "销售明细单号"; + this.layoutControlItem4.Location = new System.Drawing.Point(0, 72); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem4.Text = "销售明细单号"; + this.layoutControlItem4.TextSize = new System.Drawing.Size(72, 14); + // + // txtsaledetailcode + // + this.txtsaledetailcode.Location = new System.Drawing.Point(87, 84); + this.txtsaledetailcode.Name = "txtsaledetailcode"; + this.txtsaledetailcode.Size = new System.Drawing.Size(1191, 20); + this.txtsaledetailcode.StyleController = this.layoutControl1; + this.txtsaledetailcode.TabIndex = 4; + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.txtworkordertype; + this.layoutControlItem5.CustomizationFormText = "工单类型"; + this.layoutControlItem5.Location = new System.Drawing.Point(0, 96); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem5.Text = "工单类型"; + this.layoutControlItem5.TextSize = new System.Drawing.Size(72, 14); + // + // txtworkordertype + // + this.txtworkordertype.EditValue = ""; + this.txtworkordertype.Location = new System.Drawing.Point(87, 108); + this.txtworkordertype.Name = "txtworkordertype"; + this.txtworkordertype.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtworkordertype.Properties.DisplayMember = "Name"; + this.txtworkordertype.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtworkordertype.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtworkordertype.Properties.ValueMember = "ID"; + this.txtworkordertype.Size = new System.Drawing.Size(1191, 20); + this.txtworkordertype.StyleController = this.layoutControl1; + this.txtworkordertype.TabIndex = 5; + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.txtproductdate; + this.layoutControlItem6.CustomizationFormText = "生产日期"; + this.layoutControlItem6.Location = new System.Drawing.Point(0, 120); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem6.Text = "生产日期"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(72, 14); + // + // txtproductdate + // + this.txtproductdate.EditValue = null; + this.txtproductdate.ImeMode = System.Windows.Forms.ImeMode.Off; + this.txtproductdate.Location = new System.Drawing.Point(87, 132); + this.txtproductdate.Name = "txtproductdate"; + this.txtproductdate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtproductdate.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton()}); + this.txtproductdate.Properties.DisplayFormat.FormatString = "G"; + this.txtproductdate.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.txtproductdate.Size = new System.Drawing.Size(1191, 20); + this.txtproductdate.StyleController = this.layoutControl1; + this.txtproductdate.TabIndex = 6; + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.txtproductdept; + this.layoutControlItem7.CustomizationFormText = "生产单位"; + this.layoutControlItem7.Location = new System.Drawing.Point(0, 144); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem7.Text = "生产单位"; + this.layoutControlItem7.TextSize = new System.Drawing.Size(72, 14); + // + // txtproductdept + // + this.txtproductdept.EditValue = ""; + this.txtproductdept.Location = new System.Drawing.Point(87, 156); + this.txtproductdept.Name = "txtproductdept"; + this.txtproductdept.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtproductdept.Properties.DisplayMember = "Name"; + this.txtproductdept.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtproductdept.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtproductdept.Properties.ValueMember = "ID"; + this.txtproductdept.Size = new System.Drawing.Size(1191, 20); + this.txtproductdept.StyleController = this.layoutControl1; + this.txtproductdept.TabIndex = 7; + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.txtproductcode; + this.layoutControlItem8.CustomizationFormText = "产品编号"; + this.layoutControlItem8.Location = new System.Drawing.Point(0, 168); + this.layoutControlItem8.Name = "layoutControlItem8"; + this.layoutControlItem8.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem8.Text = "产品编号"; + this.layoutControlItem8.TextSize = new System.Drawing.Size(72, 14); + // + // txtproductcode + // + this.txtproductcode.Location = new System.Drawing.Point(87, 180); + this.txtproductcode.Name = "txtproductcode"; + this.txtproductcode.Size = new System.Drawing.Size(1191, 20); + this.txtproductcode.StyleController = this.layoutControl1; + this.txtproductcode.TabIndex = 8; + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.txtproductid; + this.layoutControlItem9.CustomizationFormText = "产品名称"; + this.layoutControlItem9.Location = new System.Drawing.Point(0, 192); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem9.Text = "产品名称"; + this.layoutControlItem9.TextSize = new System.Drawing.Size(72, 14); + // + // txtproductid + // + this.txtproductid.EditValue = ""; + this.txtproductid.Location = new System.Drawing.Point(87, 204); + this.txtproductid.Name = "txtproductid"; + this.txtproductid.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtproductid.Properties.DisplayMember = "Name"; + this.txtproductid.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtproductid.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtproductid.Properties.ValueMember = "ID"; + this.txtproductid.Size = new System.Drawing.Size(1191, 20); + this.txtproductid.StyleController = this.layoutControl1; + this.txtproductid.TabIndex = 9; + // + // layoutControlItem10 + // + this.layoutControlItem10.Control = this.txtspec; + this.layoutControlItem10.CustomizationFormText = "规格型号"; + this.layoutControlItem10.Location = new System.Drawing.Point(0, 216); + this.layoutControlItem10.Name = "layoutControlItem10"; + this.layoutControlItem10.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem10.Text = "规格型号"; + this.layoutControlItem10.TextSize = new System.Drawing.Size(72, 14); + // + // txtspec + // + this.txtspec.Location = new System.Drawing.Point(87, 228); + this.txtspec.Name = "txtspec"; + this.txtspec.Size = new System.Drawing.Size(1191, 20); + this.txtspec.StyleController = this.layoutControl1; + this.txtspec.TabIndex = 10; + // + // layoutControlItem11 + // + this.layoutControlItem11.Control = this.txtproductnumber; + this.layoutControlItem11.CustomizationFormText = "生产数量"; + this.layoutControlItem11.Location = new System.Drawing.Point(0, 240); + this.layoutControlItem11.Name = "layoutControlItem11"; + this.layoutControlItem11.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem11.Text = "生产数量"; + this.layoutControlItem11.TextSize = new System.Drawing.Size(72, 14); + // + // txtproductnumber + // + this.txtproductnumber.Location = new System.Drawing.Point(87, 252); + this.txtproductnumber.Name = "txtproductnumber"; + this.txtproductnumber.Size = new System.Drawing.Size(1191, 20); + this.txtproductnumber.StyleController = this.layoutControl1; + this.txtproductnumber.TabIndex = 11; + // + // layoutControlItem12 + // + this.layoutControlItem12.Control = this.txtunit; + this.layoutControlItem12.CustomizationFormText = "计量单位"; + this.layoutControlItem12.Location = new System.Drawing.Point(0, 264); + this.layoutControlItem12.Name = "layoutControlItem12"; + this.layoutControlItem12.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem12.Text = "计量单位"; + this.layoutControlItem12.TextSize = new System.Drawing.Size(72, 14); + // + // txtunit + // + this.txtunit.EditValue = ""; + this.txtunit.Location = new System.Drawing.Point(87, 276); + this.txtunit.Name = "txtunit"; + this.txtunit.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtunit.Properties.DisplayMember = "Name"; + this.txtunit.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtunit.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtunit.Properties.ValueMember = "ID"; + this.txtunit.Size = new System.Drawing.Size(1191, 20); + this.txtunit.StyleController = this.layoutControl1; + this.txtunit.TabIndex = 12; + // + // layoutControlItem13 + // + this.layoutControlItem13.Control = this.txtfinishdate; + this.layoutControlItem13.CustomizationFormText = "完工日期"; + this.layoutControlItem13.Location = new System.Drawing.Point(0, 288); + this.layoutControlItem13.Name = "layoutControlItem13"; + this.layoutControlItem13.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem13.Text = "完工日期"; + this.layoutControlItem13.TextSize = new System.Drawing.Size(72, 14); + // + // txtfinishdate + // + this.txtfinishdate.EditValue = null; + this.txtfinishdate.ImeMode = System.Windows.Forms.ImeMode.Off; + this.txtfinishdate.Location = new System.Drawing.Point(87, 300); + this.txtfinishdate.Name = "txtfinishdate"; + this.txtfinishdate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtfinishdate.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton()}); + this.txtfinishdate.Properties.DisplayFormat.FormatString = "G"; + this.txtfinishdate.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.txtfinishdate.Size = new System.Drawing.Size(1191, 20); + this.txtfinishdate.StyleController = this.layoutControl1; + this.txtfinishdate.TabIndex = 13; + // + // layoutControlItem14 + // + this.layoutControlItem14.Control = this.txtdeliverdate; + this.layoutControlItem14.CustomizationFormText = "交货日期"; + this.layoutControlItem14.Location = new System.Drawing.Point(0, 312); + this.layoutControlItem14.Name = "layoutControlItem14"; + this.layoutControlItem14.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem14.Text = "交货日期"; + this.layoutControlItem14.TextSize = new System.Drawing.Size(72, 14); + // + // txtdeliverdate + // + this.txtdeliverdate.EditValue = null; + this.txtdeliverdate.ImeMode = System.Windows.Forms.ImeMode.Off; + this.txtdeliverdate.Location = new System.Drawing.Point(87, 324); + this.txtdeliverdate.Name = "txtdeliverdate"; + this.txtdeliverdate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtdeliverdate.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton()}); + this.txtdeliverdate.Properties.DisplayFormat.FormatString = "G"; + this.txtdeliverdate.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.txtdeliverdate.Size = new System.Drawing.Size(1191, 20); + this.txtdeliverdate.StyleController = this.layoutControl1; + this.txtdeliverdate.TabIndex = 14; + // + // layoutControlItem15 + // + this.layoutControlItem15.Control = this.txtwarehouse; + this.layoutControlItem15.CustomizationFormText = "仓库"; + this.layoutControlItem15.Location = new System.Drawing.Point(0, 336); + this.layoutControlItem15.Name = "layoutControlItem15"; + this.layoutControlItem15.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem15.Text = "仓库"; + this.layoutControlItem15.TextSize = new System.Drawing.Size(72, 14); + // + // txtwarehouse + // + this.txtwarehouse.EditValue = ""; + this.txtwarehouse.Location = new System.Drawing.Point(87, 348); + this.txtwarehouse.Name = "txtwarehouse"; + this.txtwarehouse.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtwarehouse.Properties.DisplayMember = "Name"; + this.txtwarehouse.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtwarehouse.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtwarehouse.Properties.ValueMember = "ID"; + this.txtwarehouse.Size = new System.Drawing.Size(1191, 20); + this.txtwarehouse.StyleController = this.layoutControl1; + this.txtwarehouse.TabIndex = 15; + // + // layoutControlItem16 + // + this.layoutControlItem16.Control = this.txtcreatorId; + this.layoutControlItem16.CustomizationFormText = "制单人"; + this.layoutControlItem16.Location = new System.Drawing.Point(0, 360); + this.layoutControlItem16.Name = "layoutControlItem16"; + this.layoutControlItem16.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem16.Text = "制单人"; + this.layoutControlItem16.TextSize = new System.Drawing.Size(72, 14); + // + // txtcreatorId + // + this.txtcreatorId.EditValue = ""; + this.txtcreatorId.Location = new System.Drawing.Point(87, 372); + this.txtcreatorId.Name = "txtcreatorId"; + this.txtcreatorId.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtcreatorId.Properties.DisplayMember = "Name"; + this.txtcreatorId.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtcreatorId.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtcreatorId.Properties.ValueMember = "ID"; + this.txtcreatorId.Size = new System.Drawing.Size(1191, 20); + this.txtcreatorId.StyleController = this.layoutControl1; + this.txtcreatorId.TabIndex = 16; + // + // layoutControlItem17 + // + this.layoutControlItem17.Control = this.txtcreateTime; + this.layoutControlItem17.CustomizationFormText = "制单日期"; + this.layoutControlItem17.Location = new System.Drawing.Point(0, 384); + this.layoutControlItem17.Name = "layoutControlItem17"; + this.layoutControlItem17.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem17.Text = "制单日期"; + this.layoutControlItem17.TextSize = new System.Drawing.Size(72, 14); + // + // txtcreateTime + // + this.txtcreateTime.EditValue = null; + this.txtcreateTime.ImeMode = System.Windows.Forms.ImeMode.Off; + this.txtcreateTime.Location = new System.Drawing.Point(87, 396); + this.txtcreateTime.Name = "txtcreateTime"; + this.txtcreateTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtcreateTime.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton()}); + this.txtcreateTime.Properties.DisplayFormat.FormatString = "G"; + this.txtcreateTime.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.txtcreateTime.Size = new System.Drawing.Size(1191, 20); + this.txtcreateTime.StyleController = this.layoutControl1; + this.txtcreateTime.TabIndex = 17; + // + // layoutControlItem18 + // + this.layoutControlItem18.Control = this.txtremark; + this.layoutControlItem18.CustomizationFormText = "备注"; + this.layoutControlItem18.Location = new System.Drawing.Point(0, 408); + this.layoutControlItem18.Name = "layoutControlItem18"; + this.layoutControlItem18.Size = new System.Drawing.Size(1270, 305); + this.layoutControlItem18.Text = "备注"; + this.layoutControlItem18.TextSize = new System.Drawing.Size(72, 14); + // + // txtremark + // + this.txtremark.Location = new System.Drawing.Point(87, 420); + this.txtremark.Name = "txtremark"; + this.txtremark.Size = new System.Drawing.Size(1191, 20); + this.txtremark.StyleController = this.layoutControl1; + this.txtremark.TabIndex = 18; + // + // Frmworkorder + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1300, 800); + this.Controls.Add(this.xtraTabControl1); + this.Name = "Frmworkorder"; + this.Text = "Frmworkorder"; + this.Load += new System.EventHandler(this.Frmworkorder_Load); + this.Controls.SetChildIndex(this.xtraTabControl1, 0); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtworkordertype)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtproductdept)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtproductid)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtunit)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtwarehouse)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); + this.xtraTabControl1.ResumeLayout(false); + this.tabDataList.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.grdList)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.grdListView)).EndInit(); + this.tabDataDetail.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit(); + this.panelControl2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); + this.layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtwordordercode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtsalecode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtsaledetailcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtworkordertype.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductdate.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductdate.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductdept.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtspec.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductnumber.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtfinishdate.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtfinishdate.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtdeliverdate.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtdeliverdate.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private XtraTabControl xtraTabControl1; + private XtraTabPage tabDataList; + private XtraTabPage tabDataDetail; + private DevExpress.XtraGrid.GridControl grdList; + private DevExpress.XtraGrid.Views.Grid.GridView grdListView; + private PanelControl panelControl2; + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + + private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn2; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn3; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn4; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn5; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn6; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn7; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn8; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn9; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn10; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn11; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn12; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn13; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn14; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn15; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn16; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn17; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn18; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtwordordercode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtsalecode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtsaledetailcode; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtworkordertype; + + private DevExpress.XtraEditors.LookUpEdit txtworkordertype; + /////////////////////////////// + private DevExpress.XtraEditors.DateEdit txtproductdate; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtproductdept; + + private DevExpress.XtraEditors.LookUpEdit txtproductdept; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtproductcode; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtproductid; + + private DevExpress.XtraEditors.LookUpEdit txtproductid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtspec; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtproductnumber; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtunit; + + private DevExpress.XtraEditors.LookUpEdit txtunit; + /////////////////////////////// + private DevExpress.XtraEditors.DateEdit txtfinishdate; + /////////////////////////////// + private DevExpress.XtraEditors.DateEdit txtdeliverdate; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtwarehouse; + + private DevExpress.XtraEditors.LookUpEdit txtwarehouse; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtcreatorId; + + private DevExpress.XtraEditors.LookUpEdit txtcreatorId; + /////////////////////////////// + private DevExpress.XtraEditors.DateEdit txtcreateTime; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtremark; + + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem17; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem18; + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/Frmworkorder.resx b/WinformGeneralDeveloperFrame/Form/Frmworkorder.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/Frmworkorder.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/WinformGeneralDeveloperFrame.csproj b/WinformGeneralDeveloperFrame/WinformGeneralDeveloperFrame.csproj index 8ad0563..207d026 100644 --- a/WinformGeneralDeveloperFrame/WinformGeneralDeveloperFrame.csproj +++ b/WinformGeneralDeveloperFrame/WinformGeneralDeveloperFrame.csproj @@ -139,6 +139,8 @@ + + @@ -165,12 +167,25 @@ + Form Frmbuyer.cs + + Form + + + Frmbuyerreturn.cs + + + Form + + + Frmbuyerreturndetail.cs + Form @@ -291,6 +306,12 @@ FrmsysUser.cs + + Form + + + Frmworkorder.cs + Form @@ -390,6 +411,12 @@ Frmbuyer.cs + + Frmbuyerreturn.cs + + + Frmbuyerreturndetail.cs + Frmcustomer.cs @@ -450,6 +477,9 @@ FrmsysUser.cs + + Frmworkorder.cs + FrmBaseEdit.cs