diff --git a/.vs/WinformGeneralDeveloperFrame/v16/.suo b/.vs/WinformGeneralDeveloperFrame/v16/.suo index 5bccf41..e2f97a3 100644 Binary files a/.vs/WinformGeneralDeveloperFrame/v16/.suo and b/.vs/WinformGeneralDeveloperFrame/v16/.suo differ diff --git a/WinformGeneralDeveloperFrame/DB/MESDB.cs b/WinformGeneralDeveloperFrame/DB/MESDB.cs index 29d4c4a..7495dff 100644 --- a/WinformGeneralDeveloperFrame/DB/MESDB.cs +++ b/WinformGeneralDeveloperFrame/DB/MESDB.cs @@ -44,5 +44,13 @@ namespace MES public virtual DbSet deliversaleInfo { get; set; } public virtual DbSet deliversaledetailInfo { get; set; } + + public virtual DbSet returnsaleInfo { get; set; } + + public virtual DbSet returnsaledetailInfo { get; set; } + + public virtual DbSet productBOMInfo { get; set; } + + public virtual DbSet productBOMdetailInfo { get; set; } } } \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/productBOMInfo.cs b/WinformGeneralDeveloperFrame/Entity/productBOMInfo.cs new file mode 100644 index 0000000..f07a1f0 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Entity/productBOMInfo.cs @@ -0,0 +1,54 @@ +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("productBOM")] + public partial class productBOMInfo + { + ///id + [ModelBindControl("txtid")] + public int id{set;get;} + ///客户 + [ModelBindControl("txtcustomerid")] + public int customerid{set;get;} + ///客户编码 + [ModelBindControl("txtcustomercode")] + public string customercode{set;get;} + ///产品编号 + [ModelBindControl("txtproductcode")] + public string productcode{set;get;} + ///产品 + [ModelBindControl("txtproductid")] + public int productid{set;get;} + ///规格型号 + [ModelBindControl("txtspec")] + public string spec{set;get;} + ///计量单位 + [ModelBindControl("txtunit")] + public int unit{set;get;} + ///仓库 + [ModelBindControl("txtwarehouse")] + public int warehouse{set;get;} + ///版本号 + [ModelBindControl("txtversion")] + public int version{set;get;} + ///BOM编号 + [ModelBindControl("txtproductBOMcode")] + public string productBOMcode{set;get;} + ///备注 + [ModelBindControl("txtremark")] + public string remark{set;get;} + + /// + /// 单位成本 + /// + [ModelBindControl("txtunitcost")] + public decimal unitcost { set; get; } + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/productBOMdetailInfo.cs b/WinformGeneralDeveloperFrame/Entity/productBOMdetailInfo.cs new file mode 100644 index 0000000..decf99c --- /dev/null +++ b/WinformGeneralDeveloperFrame/Entity/productBOMdetailInfo.cs @@ -0,0 +1,64 @@ +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("productBOMdetail")] + public partial class productBOMdetailInfo + { + ///id + [ModelBindControl("txtid")] + public int id{set;get;} + ///父项 + [ModelBindControl("txtpid")] + public int pid{set;get;} + ///BOM主表 + [ModelBindControl("txtproductBOMid")] + public int productBOMid{set;get;} + ///BOM编号 + [ModelBindControl("txtproductBOMcode")] + public string productBOMcode{set;get;} + ///产品编号 + [ModelBindControl("txtproductcode")] + public string productcode{set;get;} + ///物料id + [ModelBindControl("txtmaterialid")] + public int materialid{set;get;} + ///物料名称 + [ModelBindControl("txtmaterialname")] + public string materialname{set;get;} + ///物料编号 + [ModelBindControl("txtmaterialcode")] + public string materialcode{set;get;} + ///规格型号 + [ModelBindControl("txtmaterialspec")] + public string materialspec{set;get;} + ///物料类型 + [ModelBindControl("txtmaterialtype")] + public int materialtype{set;get;} + ///单位用量 + [ModelBindControl("txtunitusenumber")] + public decimal unitusenumber{set;get;} + ///计量单位 + [ModelBindControl("txtunit")] + public int unit{set;get;} + ///仓库 + [ModelBindControl("txtwarehouse")] + public int warehouse{set;get;} + ///单价 + [ModelBindControl("txtunitprice")] + public decimal unitprice{set;get;} + ///金额 + [ModelBindControl("txtmoney")] + public decimal money{set;get;} + ///备注 + [ModelBindControl("txtremark")] + public string remark{set;get;} + + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/productInfo.cs b/WinformGeneralDeveloperFrame/Entity/productInfo.cs index a77408b..86e19de 100644 --- a/WinformGeneralDeveloperFrame/Entity/productInfo.cs +++ b/WinformGeneralDeveloperFrame/Entity/productInfo.cs @@ -25,13 +25,13 @@ namespace MES.Entity public decimal defaultprice{set;get;} ///计量单位 [ModelBindControl("txtunit")] - public string unit{set;get;} + public int unit {set;get;} ///仓库 [ModelBindControl("txtwarehouse")] public int warehouse{set;get;} ///产品类别 [ModelBindControl("txtproducttype")] - public string producttype{set;get;} + public int producttype {set;get;} ///产品编号 [ModelBindControl("txtproductcode")] public string productcode{set;get;} diff --git a/WinformGeneralDeveloperFrame/Entity/quotationInfo.cs b/WinformGeneralDeveloperFrame/Entity/quotationInfo.cs index 04178e0..6be658d 100644 --- a/WinformGeneralDeveloperFrame/Entity/quotationInfo.cs +++ b/WinformGeneralDeveloperFrame/Entity/quotationInfo.cs @@ -41,6 +41,8 @@ namespace MES.Entity ///remark [ModelBindControl("txtremark")] public string remark{set;get;} - + ///总价 + [ModelBindControl("txttotalprice")] + public decimal totalprice { set; get; } } } \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/returnsaleInfo.cs b/WinformGeneralDeveloperFrame/Entity/returnsaleInfo.cs new file mode 100644 index 0000000..9bf3707 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Entity/returnsaleInfo.cs @@ -0,0 +1,46 @@ +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("returnsale")] + public partial class returnsaleInfo + { + ///id + [ModelBindControl("txtid")] + public int id{set;get;} + ///退货日期 + [ModelBindControl("txtreturndate")] + public DateTime? returndate{set;get;}=DateTime.Now; + ///客户编号 + [ModelBindControl("txtcustomercode")] + public string customercode{set;get;} + ///客户 + [ModelBindControl("txtcustomerid")] + public int customerid{set;get;} + ///客户类型 + [ModelBindControl("txtcustomertype")] + public int customertype{set;get;} + ///联系人 + [ModelBindControl("txtcontactuser")] + public int contactuser{set;get;} + ///联系电话 + [ModelBindControl("txtcontactphone")] + public string contactphone{set;get;} + ///制单人 + [ModelBindControl("txtcreatorId")] + public int creatorId{set;get;} + ///退货单号 + [ModelBindControl("txtreturnsalecode")] + public string returnsalecode{set;get;} + ///备注 + [ModelBindControl("txtremark")] + public string remark{set;get;} + + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/returnsaledetailInfo.cs b/WinformGeneralDeveloperFrame/Entity/returnsaledetailInfo.cs new file mode 100644 index 0000000..bc0f03c --- /dev/null +++ b/WinformGeneralDeveloperFrame/Entity/returnsaledetailInfo.cs @@ -0,0 +1,52 @@ +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("returnsaledetail")] + public partial class returnsaledetailInfo + { + ///id + [ModelBindControl("txtid")] + public int id{set;get;} + ///退货单主表 + [ModelBindControl("txtreturnsaleid")] + public int returnsaleid{set;get;} + ///退货单号 + [ModelBindControl("txtreturnsalecode")] + public string returnsalecode{set;get;} + ///出货单号 + [ModelBindControl("txtdeliversalecode")] + public string deliversalecode{set;get;} + ///销售单号 + [ModelBindControl("txtsalecode")] + public string salecode{set;get;} + ///产品编号 + [ModelBindControl("txtproductcode")] + public string productcode{set;get;} + ///产品名称 + [ModelBindControl("txtproductname")] + public string productname{set;get;} + ///规格型号 + [ModelBindControl("txtproductspec")] + public string productspec{set;get;} + ///仓库 + [ModelBindControl("txtwarehouse")] + public int warehouse{set;get;} + ///退货数量 + [ModelBindControl("txtreturnnumber")] + public decimal returnnumber{set;get;} + ///计量单位 + [ModelBindControl("txtunit")] + public int unit{set;get;} + ///备注 + [ModelBindControl("txtremark")] + public string remark{set;get;} + + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/Frmdeliversale.cs b/WinformGeneralDeveloperFrame/Form/Frmdeliversale.cs index d934c00..33c7758 100644 --- a/WinformGeneralDeveloperFrame/Form/Frmdeliversale.cs +++ b/WinformGeneralDeveloperFrame/Form/Frmdeliversale.cs @@ -88,7 +88,7 @@ namespace MES.Form txtcustomercode.Focus(); return false; } - if(string.IsNullOrEmpty(txtdeliverdate.EditValue.ToString())) + if(string.IsNullOrEmpty(txtdeliverdate.Text.ToString())) { "出货日期不能为空".ShowWarning(); txtdeliverdate.Focus(); diff --git a/WinformGeneralDeveloperFrame/Form/FrmproductBOM.cs b/WinformGeneralDeveloperFrame/Form/FrmproductBOM.cs new file mode 100644 index 0000000..979318d --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmproductBOM.cs @@ -0,0 +1,400 @@ +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; +using CCWin.SkinClass; +using DevExpress.XtraEditors; +using DevExpress.XtraEditors.Repository; +using DevExpress.XtraTreeList; + +namespace MES.Form +{ + public partial class FrmproductBOM : FrmBaseForm + { + private Dictionary fieldDictionary = new Dictionary(); + public FrmproductBOM() + { + InitializeComponent(); + } + private void FrmproductBOM_Load(object sender, EventArgs e) + { + + InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new productBOMInfo(), treeList1, new []{ "txtproductBOMcode" }); + InitSearchDicData(); + repositoryItemLookUpEditmaterialname.EditValueChanged += RepositoryItemLookUpEditmaterialname_EditValueChanged; + } + + private void RepositoryItemLookUpEditmaterialname_EditValueChanged(object sender, EventArgs e) + { + using (var db=new MESDB()) + { + LookUpEdit lookUpEdit=sender as LookUpEdit; + int materialid= lookUpEdit.EditValue.ToString().ToInt16(); + materialInfo material = db.materialInfo.Find(materialid); + if (material != null) + { + treeList1.FocusedNode["materialcode"] = material.code; + treeList1.FocusedNode["materialspec"] = material.spec; + treeList1.FocusedNode["materialtype"] = material.materialtype; + treeList1.FocusedNode["unit"] = material.unit; + treeList1.FocusedNode["unitprice"] = material.referprice; + treeList1.FocusedNode["warehouse"] = material.warehouse; + } + } + } + + /// + /// 数据源初始化 + /// + /// + private void Init() + { + txtcustomerid.Properties.DataSource = GetDataTableUtils.SqlTable("客户"); + repositoryItemtxtcustomerid.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("仓库"); + + repositoryItemLookUpEditmaterialtype.DataSource = GetDataTableUtils.SqlTable("物料类别"); + repositoryItemLookUpEditmaterialname.DataSource = GetDataTableUtils.SqlTable("物料"); + + } + /// + /// 搜索字段 + /// + /// + private void InitSearchDicData() + { + fieldDictionary.Add("客户编码","customercode"); + fieldDictionary.Add("产品编号","productcode"); + fieldDictionary.Add("BOM编号","productBOMcode"); + } + public override void AddFunction() + { + treeList1.DataSource = new List().ToDataTable(); + } + public override void InitgrdListDataSource() + { + using (var con=new MESDB())/// + { + grdList.DataSource=con.productBOMInfo.ToList(); + } + Init(); + } + /// + /// 字段为空校验 + /// + /// + public override bool CheckInput() + { + if(string.IsNullOrEmpty(txtcustomerid.EditValue.ToString())) + { + "客户不能为空".ShowWarning(); + txtcustomerid.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtcustomercode.EditValue.ToString())) + { + "客户编码不能为空".ShowWarning(); + txtcustomercode.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(txtunit.EditValue.ToString())) + { + "计量单位不能为空".ShowWarning(); + txtunit.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtwarehouse.EditValue.ToString())) + { + "仓库不能为空".ShowWarning(); + txtwarehouse.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtversion.EditValue.ToString())) + { + "版本号不能为空".ShowWarning(); + txtversion.Focus(); + return false; + } + return true; + } + /// + /// 保存 + /// + /// + public override bool SaveFunction() + { + string code = "BOM" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + + DateTime.Now.Minute + DateTime.Now.Second + DateTime.Now.Millisecond.ToString("D3"); + DataTable dt = treeList1.DataSource as DataTable; + try + { + productBOMInfo info = (productBOMInfo)this.ControlDataToModel(new productBOMInfo()); + using (var db = new MESDB()) + { + using (var tran = db.Database.BeginTransaction()) + { + try + { + Dictionary> dic = + dt.GetDataTableData(); + if (info.id == 0)//新增 + { + info.productBOMcode = code; + db.productBOMInfo.Add(info); + db.SaveChanges(); + txtid.Text = info.id.ToString(); + txtproductBOMcode.Text = code; + if (dt != null) + { + List detaiListAdd = + dic["Add"]; + detaiListAdd.ForEach(a => + { + a.productBOMid = info.id; + a.productBOMcode = info.productBOMcode; + a.productcode = info.productcode; + }); + db.productBOMdetailInfo.AddRange(detaiListAdd); + db.SaveChanges(); + } + } + else //更新 + { + db.Entry(info).State = EntityState.Modified; + db.SaveChanges(); + if (dt != null) + { + List detaiListAdd = + dic["Add"]; + detaiListAdd.ForEach(a => + { + a.productBOMid = info.id; + a.productBOMcode = info.productBOMcode; + a.productcode = info.productcode; + }); + db.productBOMdetailInfo.AddRange(detaiListAdd); + + List detaiListEdit = + dic["Edit"]; + detaiListEdit.ForEach((a) => + { + a.productBOMcode = info.productBOMcode; + a.productcode = info.productcode; + 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 + { + productBOMInfo info = (productBOMInfo)this.ControlDataToModel(new productBOMInfo()); + 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.productBOMInfo.SqlQuery("select * from productBOM").ToList(); + } + else + { + grdList.DataSource = db.productBOMInfo.SqlQuery($"select * from productBOM where {sql}").ToList(); + } + } + } + } + + public override void gridControlMouseDoubleClickFunction(object sender, EventArgs e) + { + productBOMInfo info = grdListView.GetFocusedRow() as productBOMInfo; + if (info != null) + { + using (var db = new MESDB()) + { + treeList1.DataSource = db.productBOMdetailInfo.Where(p => p.productBOMid == info.id).ToList().ToDataTable(); + treeList1.BestFitColumns(); + } + } + } + + /// + /// 新增 + /// + /// + /// + private void toolStripMenuItemAdd_Click(object sender, EventArgs e) + { + productBOMdetailInfo productBoMdetail = new productBOMdetailInfo() + { + productcode = txtproductcode.Text, + productBOMcode = txtproductBOMcode.Text + }; + treeList1.Nodes.Add(productBoMdetail); + } + /// + /// 新增子级 + /// + /// + /// + private void toolStripMenuItemAddSon_Click(object sender, EventArgs e) + { + if (treeList1.FocusedNode != null) + { + productBOMdetailInfo productBoMdetail = new productBOMdetailInfo() + { + pid = treeList1.FocusedNode["materialid"].ToString().ToInt16(), + productcode = txtproductcode.Text, + productBOMcode = txtproductBOMcode.Text + }; + treeList1.FocusedNode.Nodes.Add(productBoMdetail); + } + } + /// + /// 删除 + /// + /// + /// + private void toolStripMenuItemDel_Click(object sender, EventArgs e) + { + if (treeList1.FocusedNode != null) + { + treeList1.DeleteNode(treeList1.FocusedNode); + } + } + + private void treeList1_ValidateNode(object sender, ValidateNodeEventArgs e) + { + treeList1.FocusedNode["money"] = decimal.Multiply( + treeList1.FocusedNode["unitprice"].ToDecimal(0), + treeList1.FocusedNode["unitusenumber"].ToDecimal(0)); + + treeList1.BestFitColumns(); + } + + private void txtcustomerid_EditValueChanged(object sender, EventArgs e) + { + using (var db = new MESDB()) + { + + if (txtcustomerid.EditValue != null) + { + int id = txtcustomerid.EditValue.ToString().ToInt16(); + customerInfo customer = db.customerInfo.Where(p => p.id == id) + .First(); + if (customer != null) + { + txtcustomercode.Text = customer.customercode; + } + } + } + } + private void txtproductid_EditValueChanged(object sender, EventArgs e) + { + using (var db = new MESDB()) + { + + if (txtproductid.EditValue != null) + { + int id = txtproductid.EditValue.ToString().ToInt16(); + productInfo product = db.productInfo.Find(id); + if (product != null) + { + txtproductcode.Text = product.productcode; + txtspec.Text = product.spec; + txtunit.EditValue = product.unit; + txtwarehouse.EditValue = product.warehouse; + } + } + } + } + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmproductBOM.designer.cs b/WinformGeneralDeveloperFrame/Form/FrmproductBOM.designer.cs new file mode 100644 index 0000000..a7e4f6d --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmproductBOM.designer.cs @@ -0,0 +1,1031 @@ + +using DevExpress.XtraEditors; +using DevExpress.XtraLayout; +using DevExpress.XtraTab; + +namespace MES.Form +{ + partial class FrmproductBOM + { + /// + /// 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.repositoryItemtxtcustomerid = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemtxtproductid = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn7 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemtxtunit = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemtxtwarehouse = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn10 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn11 = 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.treeList1 = new DevExpress.XtraTreeList.TreeList(); + this.treeListColumn1 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + this.treeListColumn2 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + this.treeListColumn3 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + this.treeListColumn4 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + this.treeListColumn5 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + this.treeListColumn7 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + this.repositoryItemLookUpEditmaterialname = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.treeListColumn8 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + this.treeListColumn9 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + this.treeListColumn10 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + this.repositoryItemLookUpEditmaterialtype = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.treeListColumn11 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + this.treeListColumn12 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + this.treeListColumn13 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + this.treeListColumn14 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + this.treeListColumn15 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + this.treeListColumn16 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.toolStripMenuItemAdd = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItemAddSon = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItemDel = new System.Windows.Forms.ToolStripMenuItem(); + this.txtid = new DevExpress.XtraEditors.TextEdit(); + this.txtcustomerid = new DevExpress.XtraEditors.LookUpEdit(); + this.txtcustomercode = new DevExpress.XtraEditors.TextEdit(); + this.txtproductcode = new DevExpress.XtraEditors.TextEdit(); + this.txtproductid = new DevExpress.XtraEditors.LookUpEdit(); + this.txtspec = new DevExpress.XtraEditors.TextEdit(); + this.txtunit = new DevExpress.XtraEditors.LookUpEdit(); + this.txtwarehouse = new DevExpress.XtraEditors.LookUpEdit(); + this.txtversion = new DevExpress.XtraEditors.TextEdit(); + this.txtproductBOMcode = new DevExpress.XtraEditors.TextEdit(); + this.txtremark = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtunitcost = new DevExpress.XtraEditors.TextEdit(); + this.txtunitcost111 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcustomerid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtproductid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtunit)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtwarehouse)).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.treeList1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditmaterialname)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditmaterialtype)).BeginInit(); + this.contextMenuStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcustomerid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcustomercode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtspec.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtversion.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductBOMcode.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.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtunitcost.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtunitcost111)).BeginInit(); + this.SuspendLayout(); + // + // gridColumn1 + // + this.gridColumn1.Caption = "id"; + this.gridColumn1.FieldName = "id"; + this.gridColumn1.Name = "gridColumn1"; + // + // gridColumn2 + // + this.gridColumn2.Caption = "客户"; + this.gridColumn2.ColumnEdit = this.repositoryItemtxtcustomerid; + this.gridColumn2.FieldName = "customerid"; + this.gridColumn2.Name = "gridColumn2"; + this.gridColumn2.Visible = true; + this.gridColumn2.VisibleIndex = 0; + this.gridColumn2.Width = 201; + // + // repositoryItemtxtcustomerid + // + this.repositoryItemtxtcustomerid.AutoHeight = false; + this.repositoryItemtxtcustomerid.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtcustomerid.DisplayMember = "Name"; + this.repositoryItemtxtcustomerid.Name = "repositoryItemtxtcustomerid"; + this.repositoryItemtxtcustomerid.NullText = ""; + this.repositoryItemtxtcustomerid.ValueMember = "ID"; + // + // gridColumn3 + // + this.gridColumn3.Caption = "客户编码"; + this.gridColumn3.FieldName = "customercode"; + this.gridColumn3.Name = "gridColumn3"; + this.gridColumn3.Visible = true; + this.gridColumn3.VisibleIndex = 1; + this.gridColumn3.Width = 201; + // + // gridColumn4 + // + this.gridColumn4.Caption = "产品编号"; + this.gridColumn4.FieldName = "productcode"; + this.gridColumn4.Name = "gridColumn4"; + this.gridColumn4.Visible = true; + this.gridColumn4.VisibleIndex = 2; + this.gridColumn4.Width = 201; + // + // gridColumn5 + // + this.gridColumn5.Caption = "产品"; + this.gridColumn5.ColumnEdit = this.repositoryItemtxtproductid; + this.gridColumn5.FieldName = "productid"; + this.gridColumn5.Name = "gridColumn5"; + this.gridColumn5.Visible = true; + this.gridColumn5.VisibleIndex = 3; + this.gridColumn5.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.NullText = ""; + this.repositoryItemtxtproductid.ValueMember = "ID"; + // + // gridColumn6 + // + this.gridColumn6.Caption = "规格型号"; + this.gridColumn6.FieldName = "spec"; + this.gridColumn6.Name = "gridColumn6"; + this.gridColumn6.Visible = true; + this.gridColumn6.VisibleIndex = 4; + this.gridColumn6.Width = 201; + // + // gridColumn7 + // + this.gridColumn7.Caption = "计量单位"; + this.gridColumn7.ColumnEdit = this.repositoryItemtxtunit; + this.gridColumn7.FieldName = "unit"; + this.gridColumn7.Name = "gridColumn7"; + this.gridColumn7.Visible = true; + this.gridColumn7.VisibleIndex = 5; + this.gridColumn7.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.NullText = ""; + this.repositoryItemtxtunit.ValueMember = "ID"; + // + // gridColumn8 + // + this.gridColumn8.Caption = "仓库"; + this.gridColumn8.ColumnEdit = this.repositoryItemtxtwarehouse; + this.gridColumn8.FieldName = "warehouse"; + this.gridColumn8.Name = "gridColumn8"; + this.gridColumn8.Visible = true; + this.gridColumn8.VisibleIndex = 6; + this.gridColumn8.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.NullText = ""; + this.repositoryItemtxtwarehouse.ValueMember = "ID"; + // + // gridColumn9 + // + this.gridColumn9.Caption = "版本号"; + this.gridColumn9.FieldName = "version"; + this.gridColumn9.Name = "gridColumn9"; + this.gridColumn9.Visible = true; + this.gridColumn9.VisibleIndex = 7; + this.gridColumn9.Width = 201; + // + // gridColumn10 + // + this.gridColumn10.Caption = "BOM编号"; + this.gridColumn10.FieldName = "productBOMcode"; + this.gridColumn10.Name = "gridColumn10"; + this.gridColumn10.Visible = true; + this.gridColumn10.VisibleIndex = 8; + this.gridColumn10.Width = 201; + // + // gridColumn11 + // + this.gridColumn11.Caption = "备注"; + this.gridColumn11.FieldName = "remark"; + this.gridColumn11.Name = "gridColumn11"; + this.gridColumn11.Visible = true; + this.gridColumn11.VisibleIndex = 9; + this.gridColumn11.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(1027, 710); + 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(1021, 681); + 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(1021, 681); + 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.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(1021, 681); + 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(1021, 681); + this.panelControl2.TabIndex = 0; + // + // layoutControl1 + // + this.layoutControl1.Controls.Add(this.txtunitcost); + this.layoutControl1.Controls.Add(this.xtraTabControl2); + this.layoutControl1.Controls.Add(this.txtid); + this.layoutControl1.Controls.Add(this.txtcustomerid); + this.layoutControl1.Controls.Add(this.txtcustomercode); + this.layoutControl1.Controls.Add(this.txtproductcode); + this.layoutControl1.Controls.Add(this.txtproductid); + this.layoutControl1.Controls.Add(this.txtspec); + this.layoutControl1.Controls.Add(this.txtunit); + this.layoutControl1.Controls.Add(this.txtwarehouse); + this.layoutControl1.Controls.Add(this.txtversion); + this.layoutControl1.Controls.Add(this.txtproductBOMcode); + 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(1017, 677); + this.layoutControl1.TabIndex = 6; + this.layoutControl1.Text = "layoutControl1"; + // + // xtraTabControl2 + // + this.xtraTabControl2.Location = new System.Drawing.Point(12, 156); + this.xtraTabControl2.Name = "xtraTabControl2"; + this.xtraTabControl2.SelectedTabPage = this.xtraTabPage1; + this.xtraTabControl2.Size = new System.Drawing.Size(993, 509); + this.xtraTabControl2.TabIndex = 12; + this.xtraTabControl2.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { + this.xtraTabPage1}); + // + // xtraTabPage1 + // + this.xtraTabPage1.Controls.Add(this.treeList1); + this.xtraTabPage1.Name = "xtraTabPage1"; + this.xtraTabPage1.Size = new System.Drawing.Size(987, 480); + this.xtraTabPage1.Text = "物料清单"; + // + // treeList1 + // + this.treeList1.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { + this.treeListColumn1, + this.treeListColumn2, + this.treeListColumn3, + this.treeListColumn4, + this.treeListColumn5, + this.treeListColumn7, + this.treeListColumn8, + this.treeListColumn9, + this.treeListColumn10, + this.treeListColumn11, + this.treeListColumn12, + this.treeListColumn13, + this.treeListColumn14, + this.treeListColumn15, + this.treeListColumn16}); + this.treeList1.ContextMenuStrip = this.contextMenuStrip1; + this.treeList1.Dock = System.Windows.Forms.DockStyle.Fill; + this.treeList1.KeyFieldName = "id"; + this.treeList1.Location = new System.Drawing.Point(0, 0); + this.treeList1.Name = "treeList1"; + this.treeList1.ParentFieldName = "pid"; + this.treeList1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { + this.repositoryItemLookUpEditmaterialtype, + this.repositoryItemLookUpEditmaterialname}); + this.treeList1.Size = new System.Drawing.Size(987, 480); + this.treeList1.TabIndex = 0; + this.treeList1.ValidateNode += new DevExpress.XtraTreeList.ValidateNodeEventHandler(this.treeList1_ValidateNode); + // + // treeListColumn1 + // + this.treeListColumn1.Caption = "treeListColumn1"; + this.treeListColumn1.FieldName = "id"; + this.treeListColumn1.Name = "treeListColumn1"; + // + // treeListColumn2 + // + this.treeListColumn2.Caption = "treeListColumn2"; + this.treeListColumn2.FieldName = "pid"; + this.treeListColumn2.Name = "treeListColumn2"; + // + // treeListColumn3 + // + this.treeListColumn3.Caption = "treeListColumn3"; + this.treeListColumn3.FieldName = "productBOMid"; + this.treeListColumn3.Name = "treeListColumn3"; + // + // treeListColumn4 + // + this.treeListColumn4.Caption = "BOM编号"; + this.treeListColumn4.FieldName = "productBOMcode"; + this.treeListColumn4.Name = "treeListColumn4"; + this.treeListColumn4.OptionsColumn.AllowEdit = false; + // + // treeListColumn5 + // + this.treeListColumn5.Caption = "产品编号"; + this.treeListColumn5.FieldName = "productcode"; + this.treeListColumn5.Name = "treeListColumn5"; + this.treeListColumn5.OptionsColumn.AllowEdit = false; + // + // treeListColumn7 + // + this.treeListColumn7.Caption = "物料名称"; + this.treeListColumn7.ColumnEdit = this.repositoryItemLookUpEditmaterialname; + this.treeListColumn7.FieldName = "materialid"; + this.treeListColumn7.Name = "treeListColumn7"; + this.treeListColumn7.Visible = true; + this.treeListColumn7.VisibleIndex = 0; + // + // repositoryItemLookUpEditmaterialname + // + this.repositoryItemLookUpEditmaterialname.AutoHeight = false; + this.repositoryItemLookUpEditmaterialname.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemLookUpEditmaterialname.DisplayMember = "Name"; + this.repositoryItemLookUpEditmaterialname.Name = "repositoryItemLookUpEditmaterialname"; + this.repositoryItemLookUpEditmaterialname.NullText = ""; + this.repositoryItemLookUpEditmaterialname.ValueMember = "ID"; + // + // treeListColumn8 + // + this.treeListColumn8.Caption = "物料编码"; + this.treeListColumn8.FieldName = "materialcode"; + this.treeListColumn8.Name = "treeListColumn8"; + this.treeListColumn8.OptionsColumn.AllowEdit = false; + this.treeListColumn8.Visible = true; + this.treeListColumn8.VisibleIndex = 1; + // + // treeListColumn9 + // + this.treeListColumn9.Caption = "规格型号"; + this.treeListColumn9.FieldName = "materialspec"; + this.treeListColumn9.Name = "treeListColumn9"; + this.treeListColumn9.OptionsColumn.AllowEdit = false; + this.treeListColumn9.Visible = true; + this.treeListColumn9.VisibleIndex = 2; + // + // treeListColumn10 + // + this.treeListColumn10.Caption = "物料类型"; + this.treeListColumn10.ColumnEdit = this.repositoryItemLookUpEditmaterialtype; + this.treeListColumn10.FieldName = "materialtype"; + this.treeListColumn10.Name = "treeListColumn10"; + this.treeListColumn10.OptionsColumn.AllowEdit = false; + this.treeListColumn10.Visible = true; + this.treeListColumn10.VisibleIndex = 3; + // + // repositoryItemLookUpEditmaterialtype + // + this.repositoryItemLookUpEditmaterialtype.AutoHeight = false; + this.repositoryItemLookUpEditmaterialtype.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemLookUpEditmaterialtype.DisplayMember = "Name"; + this.repositoryItemLookUpEditmaterialtype.Name = "repositoryItemLookUpEditmaterialtype"; + this.repositoryItemLookUpEditmaterialtype.NullText = ""; + this.repositoryItemLookUpEditmaterialtype.ValueMember = "ID"; + // + // treeListColumn11 + // + this.treeListColumn11.Caption = "单位用量"; + this.treeListColumn11.FieldName = "unitusenumber"; + this.treeListColumn11.Name = "treeListColumn11"; + this.treeListColumn11.Visible = true; + this.treeListColumn11.VisibleIndex = 4; + // + // treeListColumn12 + // + this.treeListColumn12.Caption = "计量单位"; + this.treeListColumn12.ColumnEdit = this.repositoryItemtxtunit; + this.treeListColumn12.FieldName = "unit"; + this.treeListColumn12.Name = "treeListColumn12"; + this.treeListColumn12.OptionsColumn.AllowEdit = false; + this.treeListColumn12.Visible = true; + this.treeListColumn12.VisibleIndex = 5; + // + // treeListColumn13 + // + this.treeListColumn13.Caption = "仓库"; + this.treeListColumn13.ColumnEdit = this.repositoryItemtxtwarehouse; + this.treeListColumn13.FieldName = "warehouse"; + this.treeListColumn13.Name = "treeListColumn13"; + this.treeListColumn13.OptionsColumn.AllowEdit = false; + this.treeListColumn13.Visible = true; + this.treeListColumn13.VisibleIndex = 6; + // + // treeListColumn14 + // + this.treeListColumn14.Caption = "单价"; + this.treeListColumn14.FieldName = "unitprice"; + this.treeListColumn14.Name = "treeListColumn14"; + this.treeListColumn14.Visible = true; + this.treeListColumn14.VisibleIndex = 7; + // + // treeListColumn15 + // + this.treeListColumn15.Caption = "金额"; + this.treeListColumn15.FieldName = "money"; + this.treeListColumn15.Name = "treeListColumn15"; + this.treeListColumn15.OptionsColumn.AllowEdit = false; + this.treeListColumn15.Visible = true; + this.treeListColumn15.VisibleIndex = 8; + // + // treeListColumn16 + // + this.treeListColumn16.Caption = "备注"; + this.treeListColumn16.FieldName = "remark"; + this.treeListColumn16.Name = "treeListColumn16"; + this.treeListColumn16.Visible = true; + this.treeListColumn16.VisibleIndex = 9; + // + // contextMenuStrip1 + // + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItemAdd, + this.toolStripMenuItemAddSon, + this.toolStripMenuItemDel}); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(125, 70); + // + // toolStripMenuItemAdd + // + this.toolStripMenuItemAdd.Name = "toolStripMenuItemAdd"; + this.toolStripMenuItemAdd.Size = new System.Drawing.Size(124, 22); + this.toolStripMenuItemAdd.Text = "新增"; + this.toolStripMenuItemAdd.Click += new System.EventHandler(this.toolStripMenuItemAdd_Click); + // + // toolStripMenuItemAddSon + // + this.toolStripMenuItemAddSon.Name = "toolStripMenuItemAddSon"; + this.toolStripMenuItemAddSon.Size = new System.Drawing.Size(124, 22); + this.toolStripMenuItemAddSon.Text = "新增子级"; + this.toolStripMenuItemAddSon.Click += new System.EventHandler(this.toolStripMenuItemAddSon_Click); + // + // toolStripMenuItemDel + // + this.toolStripMenuItemDel.Name = "toolStripMenuItemDel"; + this.toolStripMenuItemDel.Size = new System.Drawing.Size(124, 22); + this.toolStripMenuItemDel.Text = "删除"; + this.toolStripMenuItemDel.Click += new System.EventHandler(this.toolStripMenuItemDel_Click); + // + // txtid + // + this.txtid.Location = new System.Drawing.Point(64, 12); + this.txtid.Name = "txtid"; + this.txtid.Size = new System.Drawing.Size(442, 20); + this.txtid.StyleController = this.layoutControl1; + this.txtid.TabIndex = 1; + // + // txtcustomerid + // + this.txtcustomerid.EditValue = ""; + this.txtcustomerid.Location = new System.Drawing.Point(64, 36); + this.txtcustomerid.Name = "txtcustomerid"; + this.txtcustomerid.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtcustomerid.Properties.DisplayMember = "Name"; + this.txtcustomerid.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtcustomerid.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtcustomerid.Properties.ValueMember = "ID"; + this.txtcustomerid.Size = new System.Drawing.Size(442, 20); + this.txtcustomerid.StyleController = this.layoutControl1; + this.txtcustomerid.TabIndex = 2; + this.txtcustomerid.EditValueChanged += new System.EventHandler(this.txtcustomerid_EditValueChanged); + // + // txtcustomercode + // + this.txtcustomercode.Location = new System.Drawing.Point(562, 36); + this.txtcustomercode.Name = "txtcustomercode"; + this.txtcustomercode.Size = new System.Drawing.Size(443, 20); + this.txtcustomercode.StyleController = this.layoutControl1; + this.txtcustomercode.TabIndex = 3; + // + // txtproductcode + // + this.txtproductcode.Location = new System.Drawing.Point(562, 60); + this.txtproductcode.Name = "txtproductcode"; + this.txtproductcode.Size = new System.Drawing.Size(443, 20); + this.txtproductcode.StyleController = this.layoutControl1; + this.txtproductcode.TabIndex = 4; + // + // txtproductid + // + this.txtproductid.EditValue = ""; + this.txtproductid.Location = new System.Drawing.Point(64, 60); + 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(442, 20); + this.txtproductid.StyleController = this.layoutControl1; + this.txtproductid.TabIndex = 5; + this.txtproductid.EditValueChanged += new System.EventHandler(this.txtproductid_EditValueChanged); + // + // txtspec + // + this.txtspec.Location = new System.Drawing.Point(64, 84); + this.txtspec.Name = "txtspec"; + this.txtspec.Size = new System.Drawing.Size(442, 20); + this.txtspec.StyleController = this.layoutControl1; + this.txtspec.TabIndex = 6; + // + // txtunit + // + this.txtunit.EditValue = ""; + this.txtunit.Location = new System.Drawing.Point(562, 84); + 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(443, 20); + this.txtunit.StyleController = this.layoutControl1; + this.txtunit.TabIndex = 7; + // + // txtwarehouse + // + this.txtwarehouse.EditValue = ""; + this.txtwarehouse.Location = new System.Drawing.Point(64, 108); + 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(442, 20); + this.txtwarehouse.StyleController = this.layoutControl1; + this.txtwarehouse.TabIndex = 8; + // + // txtversion + // + this.txtversion.Location = new System.Drawing.Point(562, 108); + this.txtversion.Name = "txtversion"; + this.txtversion.Size = new System.Drawing.Size(443, 20); + this.txtversion.StyleController = this.layoutControl1; + this.txtversion.TabIndex = 9; + // + // txtproductBOMcode + // + this.txtproductBOMcode.Location = new System.Drawing.Point(562, 12); + this.txtproductBOMcode.Name = "txtproductBOMcode"; + this.txtproductBOMcode.Size = new System.Drawing.Size(443, 20); + this.txtproductBOMcode.StyleController = this.layoutControl1; + this.txtproductBOMcode.TabIndex = 10; + // + // txtremark + // + this.txtremark.Location = new System.Drawing.Point(562, 132); + this.txtremark.Name = "txtremark"; + this.txtremark.Size = new System.Drawing.Size(443, 20); + this.txtremark.StyleController = this.layoutControl1; + this.txtremark.TabIndex = 11; + // + // 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.layoutControlItem6, + this.layoutControlItem8, + this.layoutControlItem11, + this.layoutControlItem3, + this.layoutControlItem10, + this.layoutControlItem7, + this.layoutControlItem9, + this.layoutControlItem12, + this.layoutControlItem5, + this.layoutControlItem4, + this.txtunitcost111}); + this.layoutControlGroup1.Name = "layoutControlGroup1"; + this.layoutControlGroup1.Size = new System.Drawing.Size(1017, 677); + 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(498, 24); + this.layoutControlItem1.Text = "id"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(49, 14); + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.txtcustomerid; + this.layoutControlItem2.CustomizationFormText = "客户"; + this.layoutControlItem2.Location = new System.Drawing.Point(0, 24); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(498, 24); + this.layoutControlItem2.Text = "客户"; + this.layoutControlItem2.TextSize = new System.Drawing.Size(49, 14); + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.txtspec; + this.layoutControlItem6.CustomizationFormText = "规格型号"; + this.layoutControlItem6.Location = new System.Drawing.Point(0, 72); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(498, 24); + this.layoutControlItem6.Text = "规格型号"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(49, 14); + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.txtwarehouse; + this.layoutControlItem8.CustomizationFormText = "仓库"; + this.layoutControlItem8.Location = new System.Drawing.Point(0, 96); + this.layoutControlItem8.Name = "layoutControlItem8"; + this.layoutControlItem8.Size = new System.Drawing.Size(498, 24); + this.layoutControlItem8.Text = "仓库"; + this.layoutControlItem8.TextSize = new System.Drawing.Size(49, 14); + // + // layoutControlItem11 + // + this.layoutControlItem11.Control = this.txtremark; + this.layoutControlItem11.CustomizationFormText = "备注"; + this.layoutControlItem11.Location = new System.Drawing.Point(498, 120); + this.layoutControlItem11.Name = "layoutControlItem11"; + this.layoutControlItem11.Size = new System.Drawing.Size(499, 24); + this.layoutControlItem11.Text = "备注"; + this.layoutControlItem11.TextSize = new System.Drawing.Size(49, 14); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.txtcustomercode; + this.layoutControlItem3.CustomizationFormText = "客户编码"; + this.layoutControlItem3.Location = new System.Drawing.Point(498, 24); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(499, 24); + this.layoutControlItem3.Text = "客户编码"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(49, 14); + // + // layoutControlItem10 + // + this.layoutControlItem10.Control = this.txtproductBOMcode; + this.layoutControlItem10.CustomizationFormText = "BOM编号"; + this.layoutControlItem10.Location = new System.Drawing.Point(498, 0); + this.layoutControlItem10.Name = "layoutControlItem10"; + this.layoutControlItem10.Size = new System.Drawing.Size(499, 24); + this.layoutControlItem10.Text = "BOM编号"; + this.layoutControlItem10.TextSize = new System.Drawing.Size(49, 14); + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.txtunit; + this.layoutControlItem7.CustomizationFormText = "计量单位"; + this.layoutControlItem7.Location = new System.Drawing.Point(498, 72); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(499, 24); + this.layoutControlItem7.Text = "计量单位"; + this.layoutControlItem7.TextSize = new System.Drawing.Size(49, 14); + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.txtversion; + this.layoutControlItem9.CustomizationFormText = "版本号"; + this.layoutControlItem9.Location = new System.Drawing.Point(498, 96); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(499, 24); + this.layoutControlItem9.Text = "版本号"; + this.layoutControlItem9.TextSize = new System.Drawing.Size(49, 14); + // + // layoutControlItem12 + // + this.layoutControlItem12.Control = this.xtraTabControl2; + this.layoutControlItem12.Location = new System.Drawing.Point(0, 144); + this.layoutControlItem12.Name = "layoutControlItem12"; + this.layoutControlItem12.Size = new System.Drawing.Size(997, 513); + this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem12.TextVisible = false; + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.txtproductid; + this.layoutControlItem5.CustomizationFormText = "产品"; + this.layoutControlItem5.Location = new System.Drawing.Point(0, 48); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(498, 24); + this.layoutControlItem5.Text = "产品"; + this.layoutControlItem5.TextSize = new System.Drawing.Size(49, 14); + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.txtproductcode; + this.layoutControlItem4.CustomizationFormText = "产品编号"; + this.layoutControlItem4.Location = new System.Drawing.Point(498, 48); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(499, 24); + this.layoutControlItem4.Text = "产品编号"; + this.layoutControlItem4.TextSize = new System.Drawing.Size(49, 14); + // + // txtunitcost + // + this.txtunitcost.Location = new System.Drawing.Point(64, 132); + this.txtunitcost.Name = "txtunitcost"; + this.txtunitcost.Size = new System.Drawing.Size(442, 20); + this.txtunitcost.StyleController = this.layoutControl1; + this.txtunitcost.TabIndex = 1; + // + // txtunitcost111 + // + this.txtunitcost111.Control = this.txtunitcost; + this.txtunitcost111.Location = new System.Drawing.Point(0, 120); + this.txtunitcost111.Name = "txtunitcost111"; + this.txtunitcost111.Size = new System.Drawing.Size(498, 24); + this.txtunitcost111.Text = "单位成本"; + this.txtunitcost111.TextSize = new System.Drawing.Size(49, 14); + // + // FrmproductBOM + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1027, 744); + this.Controls.Add(this.xtraTabControl1); + this.Name = "FrmproductBOM"; + this.Text = "产品BOM"; + this.Load += new System.EventHandler(this.FrmproductBOM_Load); + this.Controls.SetChildIndex(this.xtraTabControl1, 0); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcustomerid)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtproductid)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtunit)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtwarehouse)).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.treeList1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditmaterialname)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditmaterialtype)).EndInit(); + this.contextMenuStrip1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcustomerid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcustomercode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtspec.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtversion.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductBOMcode.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.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtunitcost.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtunitcost111)).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.XtraEditors.TextEdit txtid; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtcustomerid; + + private DevExpress.XtraEditors.LookUpEdit txtcustomerid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtcustomercode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtproductcode; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtproductid; + + private DevExpress.XtraEditors.LookUpEdit txtproductid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtspec; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtunit; + + private DevExpress.XtraEditors.LookUpEdit txtunit; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtwarehouse; + + private DevExpress.XtraEditors.LookUpEdit txtwarehouse; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtversion; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtproductBOMcode; + /////////////////////////////// + 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 XtraTabControl xtraTabControl2; + private XtraTabPage xtraTabPage1; + private LayoutControlItem layoutControlItem12; + private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemAdd; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemAddSon; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemDel; + private DevExpress.XtraTreeList.TreeList treeList1; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn1; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn2; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn3; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn4; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn5; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn7; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn8; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn9; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn10; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn11; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn12; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn13; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn14; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn15; + private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn16; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemLookUpEditmaterialtype; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemLookUpEditmaterialname; + private TextEdit txtunitcost; + private LayoutControlItem txtunitcost111; + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmproductBOM.resx b/WinformGeneralDeveloperFrame/Form/FrmproductBOM.resx new file mode 100644 index 0000000..ad53752 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmproductBOM.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/FrmproductBOMdetail.cs b/WinformGeneralDeveloperFrame/Form/FrmproductBOMdetail.cs new file mode 100644 index 0000000..56f38da --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmproductBOMdetail.cs @@ -0,0 +1,244 @@ +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 FrmproductBOMdetail : FrmBaseForm + { + private Dictionary fieldDictionary = new Dictionary(); + public FrmproductBOMdetail() + { + InitializeComponent(); + } + private void FrmproductBOMdetail_Load(object sender, EventArgs e) + { + InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new productBOMdetailInfo()); + InitSearchDicData(); + } + /// + /// 数据源初始化 + /// + /// + private void Init() + { + txtpid.Properties.DataSource = GetDataTableUtils.SqlTable("物料tree"); + repositoryItemTreeListtxtpid.DataSource= GetDataTableUtils.SqlTable("物料tree"); + txtmaterialname.Properties.DataSource = GetDataTableUtils.SqlTable("物料tree"); + repositoryItemTreeListtxtmaterialname.DataSource= GetDataTableUtils.SqlTable("物料tree"); + txtmaterialtype.Properties.DataSource = GetDataTableUtils.SqlTable("物料类别"); + repositoryItemtxtmaterialtype.DataSource= GetDataTableUtils.SqlTable("物料类别"); + txtunit.Properties.DataSource = GetDataTableUtils.SqlTable("计量单位"); + repositoryItemtxtunit.DataSource= GetDataTableUtils.SqlTable("计量单位"); + txtwarehouse.Properties.DataSource = GetDataTableUtils.SqlTable("仓库"); + repositoryItemtxtwarehouse.DataSource= GetDataTableUtils.SqlTable("仓库"); + } + /// + /// 搜索字段 + /// + /// + private void InitSearchDicData() + { + fieldDictionary.Add("id","id"); + fieldDictionary.Add("父项","pid"); + fieldDictionary.Add("BOM主表","productBOMid"); + fieldDictionary.Add("BOM编号","productBOMcode"); + fieldDictionary.Add("产品编号","productcode"); + fieldDictionary.Add("物料id","materialid"); + fieldDictionary.Add("物料名称","materialname"); + fieldDictionary.Add("物料编号","materialcode"); + fieldDictionary.Add("规格型号","materialspec"); + fieldDictionary.Add("物料类型","materialtype"); + fieldDictionary.Add("单位用量","unitusenumber"); + fieldDictionary.Add("计量单位","unit"); + fieldDictionary.Add("仓库","warehouse"); + fieldDictionary.Add("单价","unitprice"); + fieldDictionary.Add("金额","money"); + fieldDictionary.Add("备注","remark"); + } + + public override void InitgrdListDataSource() + { + using (var con=new MESDB())/// + { + grdList.DataSource=con.productBOMdetailInfo.ToList(); + } + Init(); + } + /// + /// 字段为空校验 + /// + /// + public override bool CheckInput() + { + if(string.IsNullOrEmpty(txtpid.EditValue.ToString())) + { + "父项不能为空".ShowWarning(); + txtpid.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtproductBOMid.EditValue.ToString())) + { + "BOM主表不能为空".ShowWarning(); + txtproductBOMid.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtproductBOMcode.EditValue.ToString())) + { + "BOM编号不能为空".ShowWarning(); + txtproductBOMcode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtproductcode.EditValue.ToString())) + { + "产品编号不能为空".ShowWarning(); + txtproductcode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtmaterialid.EditValue.ToString())) + { + "物料id不能为空".ShowWarning(); + txtmaterialid.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtmaterialname.EditValue.ToString())) + { + "物料名称不能为空".ShowWarning(); + txtmaterialname.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtmaterialcode.EditValue.ToString())) + { + "物料编号不能为空".ShowWarning(); + txtmaterialcode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtmaterialspec.EditValue.ToString())) + { + "规格型号不能为空".ShowWarning(); + txtmaterialspec.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtmaterialtype.EditValue.ToString())) + { + "物料类型不能为空".ShowWarning(); + txtmaterialtype.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtunitusenumber.EditValue.ToString())) + { + "单位用量不能为空".ShowWarning(); + txtunitusenumber.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtunit.EditValue.ToString())) + { + "计量单位不能为空".ShowWarning(); + txtunit.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtwarehouse.EditValue.ToString())) + { + "仓库不能为空".ShowWarning(); + txtwarehouse.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(txtremark.EditValue.ToString())) + { + "备注不能为空".ShowWarning(); + txtremark.Focus(); + return false; + } + return true; + } + /// + /// 保存 + /// + /// + public override bool SaveFunction() + { + try + { + productBOMdetailInfo info= (productBOMdetailInfo)this.ControlDataToModel(new productBOMdetailInfo()); + using (var db = new MESDB()) + { + db.productBOMdetailInfo.AddOrUpdate(info); + db.SaveChanges(); + } + } + catch (Exception ex) + { + ex.Message.ShowError(); + return false; + } + return true; + } + /// + /// 删除 + /// + /// + public override bool DelFunction() + { + try + { + productBOMdetailInfo info = (productBOMdetailInfo)this.ControlDataToModel(new productBOMdetailInfo()); + 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.productBOMdetailInfo.SqlQuery("select * from productBOMdetail").ToList(); + } + else + { + grdList.DataSource = db.productBOMdetailInfo.SqlQuery($"select * from productBOMdetail where {sql}").ToList(); + } + } + } + } + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmproductBOMdetail.designer.cs b/WinformGeneralDeveloperFrame/Form/FrmproductBOMdetail.designer.cs new file mode 100644 index 0000000..3f19d12 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmproductBOMdetail.designer.cs @@ -0,0 +1,1026 @@ + +using DevExpress.XtraEditors; +using DevExpress.XtraLayout; +using DevExpress.XtraTab; + +namespace MES.Form +{ + partial class FrmproductBOMdetail + { + /// + /// 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.gridColumn15 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn16 = new DevExpress.XtraGrid.Columns.GridColumn(); + + this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); + this.tabDataList = new DevExpress.XtraTab.XtraTabPage(); + this.tabDataDetail = new DevExpress.XtraTab.XtraTabPage(); + this.grdList = new DevExpress.XtraGrid.GridControl(); + this.grdListView = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.panelControl2 = new DevExpress.XtraEditors.PanelControl(); + this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + + + ////////////////////// + this.txtid=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtpidTreeList = new DevExpress.XtraTreeList.TreeList(); + this.repositoryItemTreeListtxtpid = new DevExpress.XtraEditors.Repository.RepositoryItemTreeListLookUpEdit(); + this.repositoryItemTreeListtxtpidTreeList = new DevExpress.XtraTreeList.TreeList(); + + this.txtpid=new DevExpress.XtraEditors.TreeListLookUpEdit(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtproductBOMid=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtproductBOMcode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtproductcode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtmaterialid=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtmaterialnameTreeList = new DevExpress.XtraTreeList.TreeList(); + this.repositoryItemTreeListtxtmaterialname = new DevExpress.XtraEditors.Repository.RepositoryItemTreeListLookUpEdit(); + this.repositoryItemTreeListtxtmaterialnameTreeList = new DevExpress.XtraTreeList.TreeList(); + + this.txtmaterialname=new DevExpress.XtraEditors.TreeListLookUpEdit(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtmaterialcode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtmaterialspec=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + this.repositoryItemtxtmaterialtype = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + + this.txtmaterialtype=new DevExpress.XtraEditors.LookUpEdit(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtunitusenumber=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + this.repositoryItemtxtunit = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + + this.txtunit=new DevExpress.XtraEditors.LookUpEdit(); + this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + this.repositoryItemtxtwarehouse = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + + this.txtwarehouse=new DevExpress.XtraEditors.LookUpEdit(); + this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtunitprice=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtmoney=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtremark=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem(); + + + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); + + this.layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtpidTreeList)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtpid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtpidTreeList)).BeginInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtpid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtproductBOMid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtproductBOMcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtproductcode.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.txtmaterialnameTreeList)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtmaterialname)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtmaterialnameTreeList)).BeginInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialname.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialspec.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtmaterialtype)).BeginInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialtype.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtunitusenumber.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtunit)).BeginInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtwarehouse)).BeginInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtunitprice.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmoney.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).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(); + + this.SuspendLayout(); + + // layoutControl1 + // + + this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.layoutControl1.Location = new System.Drawing.Point(12, 8); + this.layoutControl1.Name = "layoutControl1"; + this.layoutControl1.Root = this.layoutControlGroup1; + layoutControl1.AutoScroll=true; + this.layoutControl1.Size = new System.Drawing.Size(605, 363); + this.layoutControl1.TabIndex = 6; + this.layoutControl1.Text = "layoutControl1"; + + this.layoutControl1.Controls.Add(this.txtid); + this.layoutControl1.Controls.Add(this.txtpid); + this.layoutControl1.Controls.Add(this.txtproductBOMid); + this.layoutControl1.Controls.Add(this.txtproductBOMcode); + this.layoutControl1.Controls.Add(this.txtproductcode); + this.layoutControl1.Controls.Add(this.txtmaterialid); + this.layoutControl1.Controls.Add(this.txtmaterialname); + this.layoutControl1.Controls.Add(this.txtmaterialcode); + this.layoutControl1.Controls.Add(this.txtmaterialspec); + this.layoutControl1.Controls.Add(this.txtmaterialtype); + this.layoutControl1.Controls.Add(this.txtunitusenumber); + this.layoutControl1.Controls.Add(this.txtunit); + this.layoutControl1.Controls.Add(this.txtwarehouse); + this.layoutControl1.Controls.Add(this.txtunitprice); + this.layoutControl1.Controls.Add(this.txtmoney); + this.layoutControl1.Controls.Add(this.txtremark); +//TextEdit +//DateEdit +//SimpleButton +//CheckEdit +//MemoEdit +//PictureEdit +//LookUpEdit +//ComboBoxEdit + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtid.Location = new System.Drawing.Point(112, 12); + this.txtid.Name = "txtid"; + this.txtid.Size = new System.Drawing.Size(481, 20); + this.txtid.StyleController = this.layoutControl1; + this.txtid.TabIndex = 1; + // + // 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(585, 24); + this.layoutControlItem1.Text = "id"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(96, 14); + + // + // treeListLookUpEdit1 + // + this.txtpid.EditValue = ""; + this.txtpid.Location = new System.Drawing.Point(120, 84); + this.txtpid.Name = "txtpid"; + this.txtpid.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtpid.Properties.DisplayMember = "Name"; + this.txtpid.Properties.TreeList = this.txtpidTreeList; + this.txtpid.Properties.ValueMember = "ID"; + this.txtpid.Size = new System.Drawing.Size(932, 20); + this.txtpid.StyleController = this.layoutControl1; + this.txtpid.TabIndex = 2; + // + // treeListLookUpEdit1TreeList + // + this.txtpidTreeList.Location = new System.Drawing.Point(0, 0); + this.txtpidTreeList.Name = "txtpidTreeList"; + this.txtpidTreeList.OptionsView.ShowIndentAsRowStyle = true; + this.txtpidTreeList.ParentFieldName = "PID"; + this.txtpidTreeList.Size = new System.Drawing.Size(400, 200); + this.txtpidTreeList.TabIndex = 0; + + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.txtpid; + this.layoutControlItem2.CustomizationFormText = "父项"; + this.layoutControlItem2.Location = new System.Drawing.Point(0, 24); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(585, 24); + this.layoutControlItem2.Text = "父项"; + this.layoutControlItem2.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtproductBOMid.Location = new System.Drawing.Point(112, 60); + this.txtproductBOMid.Name = "txtproductBOMid"; + this.txtproductBOMid.Size = new System.Drawing.Size(481, 20); + this.txtproductBOMid.StyleController = this.layoutControl1; + this.txtproductBOMid.TabIndex = 3; + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.txtproductBOMid; + this.layoutControlItem3.CustomizationFormText = "BOM主表"; + this.layoutControlItem3.Location = new System.Drawing.Point(0, 48); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(585, 24); + this.layoutControlItem3.Text = "BOM主表"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtproductBOMcode.Location = new System.Drawing.Point(112, 84); + this.txtproductBOMcode.Name = "txtproductBOMcode"; + this.txtproductBOMcode.Size = new System.Drawing.Size(481, 20); + this.txtproductBOMcode.StyleController = this.layoutControl1; + this.txtproductBOMcode.TabIndex = 4; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.txtproductBOMcode; + this.layoutControlItem4.CustomizationFormText = "BOM编号"; + this.layoutControlItem4.Location = new System.Drawing.Point(0, 72); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(585, 24); + this.layoutControlItem4.Text = "BOM编号"; + this.layoutControlItem4.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtproductcode.Location = new System.Drawing.Point(112, 108); + this.txtproductcode.Name = "txtproductcode"; + this.txtproductcode.Size = new System.Drawing.Size(481, 20); + this.txtproductcode.StyleController = this.layoutControl1; + this.txtproductcode.TabIndex = 5; + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.txtproductcode; + this.layoutControlItem5.CustomizationFormText = "产品编号"; + this.layoutControlItem5.Location = new System.Drawing.Point(0, 96); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(585, 24); + this.layoutControlItem5.Text = "产品编号"; + this.layoutControlItem5.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtmaterialid.Location = new System.Drawing.Point(112, 132); + this.txtmaterialid.Name = "txtmaterialid"; + this.txtmaterialid.Size = new System.Drawing.Size(481, 20); + this.txtmaterialid.StyleController = this.layoutControl1; + this.txtmaterialid.TabIndex = 6; + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.txtmaterialid; + this.layoutControlItem6.CustomizationFormText = "物料id"; + this.layoutControlItem6.Location = new System.Drawing.Point(0, 120); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(585, 24); + this.layoutControlItem6.Text = "物料id"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(96, 14); + + // + // treeListLookUpEdit1 + // + this.txtmaterialname.EditValue = ""; + this.txtmaterialname.Location = new System.Drawing.Point(120, 84); + this.txtmaterialname.Name = "txtmaterialname"; + this.txtmaterialname.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtmaterialname.Properties.DisplayMember = "Name"; + this.txtmaterialname.Properties.TreeList = this.txtmaterialnameTreeList; + this.txtmaterialname.Properties.ValueMember = "ID"; + this.txtmaterialname.Size = new System.Drawing.Size(932, 20); + this.txtmaterialname.StyleController = this.layoutControl1; + this.txtmaterialname.TabIndex = 7; + // + // treeListLookUpEdit1TreeList + // + this.txtmaterialnameTreeList.Location = new System.Drawing.Point(0, 0); + this.txtmaterialnameTreeList.Name = "txtmaterialnameTreeList"; + this.txtmaterialnameTreeList.OptionsView.ShowIndentAsRowStyle = true; + this.txtmaterialnameTreeList.ParentFieldName = "PID"; + this.txtmaterialnameTreeList.Size = new System.Drawing.Size(400, 200); + this.txtmaterialnameTreeList.TabIndex = 0; + + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.txtmaterialname; + this.layoutControlItem7.CustomizationFormText = "物料名称"; + this.layoutControlItem7.Location = new System.Drawing.Point(0, 144); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(585, 24); + this.layoutControlItem7.Text = "物料名称"; + this.layoutControlItem7.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtmaterialcode.Location = new System.Drawing.Point(112, 180); + this.txtmaterialcode.Name = "txtmaterialcode"; + this.txtmaterialcode.Size = new System.Drawing.Size(481, 20); + this.txtmaterialcode.StyleController = this.layoutControl1; + this.txtmaterialcode.TabIndex = 8; + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.txtmaterialcode; + this.layoutControlItem8.CustomizationFormText = "物料编号"; + this.layoutControlItem8.Location = new System.Drawing.Point(0, 168); + this.layoutControlItem8.Name = "layoutControlItem8"; + this.layoutControlItem8.Size = new System.Drawing.Size(585, 24); + this.layoutControlItem8.Text = "物料编号"; + this.layoutControlItem8.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtmaterialspec.Location = new System.Drawing.Point(112, 204); + this.txtmaterialspec.Name = "txtmaterialspec"; + this.txtmaterialspec.Size = new System.Drawing.Size(481, 20); + this.txtmaterialspec.StyleController = this.layoutControl1; + this.txtmaterialspec.TabIndex = 9; + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.txtmaterialspec; + this.layoutControlItem9.CustomizationFormText = "规格型号"; + this.layoutControlItem9.Location = new System.Drawing.Point(0, 192); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(585, 24); + this.layoutControlItem9.Text = "规格型号"; + this.layoutControlItem9.TextSize = new System.Drawing.Size(96, 14); + + // + // lookUpEdit1 + // + this.txtmaterialtype.Location = new System.Drawing.Point(120, 60); + this.txtmaterialtype.Name = "txtmaterialtype"; + this.txtmaterialtype.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtmaterialtype.Properties.DisplayMember = "Name"; + this.txtmaterialtype.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtmaterialtype.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtmaterialtype.Properties.ValueMember = "ID"; + this.txtmaterialtype.Size = new System.Drawing.Size(932, 20); + this.txtmaterialtype.StyleController = this.layoutControl1; + this.txtmaterialtype.TabIndex = 10; + this.txtmaterialtype.EditValue = ""; + + // + // layoutControlItem10 + // + this.layoutControlItem10.Control = this.txtmaterialtype; + this.layoutControlItem10.CustomizationFormText = "物料类型"; + this.layoutControlItem10.Location = new System.Drawing.Point(0, 216); + this.layoutControlItem10.Name = "layoutControlItem10"; + this.layoutControlItem10.Size = new System.Drawing.Size(585, 24); + this.layoutControlItem10.Text = "物料类型"; + this.layoutControlItem10.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtunitusenumber.Location = new System.Drawing.Point(112, 252); + this.txtunitusenumber.Name = "txtunitusenumber"; + this.txtunitusenumber.Size = new System.Drawing.Size(481, 20); + this.txtunitusenumber.StyleController = this.layoutControl1; + this.txtunitusenumber.TabIndex = 11; + // + // layoutControlItem11 + // + this.layoutControlItem11.Control = this.txtunitusenumber; + this.layoutControlItem11.CustomizationFormText = "单位用量"; + this.layoutControlItem11.Location = new System.Drawing.Point(0, 240); + this.layoutControlItem11.Name = "layoutControlItem11"; + this.layoutControlItem11.Size = new System.Drawing.Size(585, 24); + this.layoutControlItem11.Text = "单位用量"; + this.layoutControlItem11.TextSize = new System.Drawing.Size(96, 14); + + // + // lookUpEdit1 + // + this.txtunit.Location = new System.Drawing.Point(120, 60); + 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(932, 20); + this.txtunit.StyleController = this.layoutControl1; + this.txtunit.TabIndex = 12; + this.txtunit.EditValue = ""; + + // + // 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(585, 24); + this.layoutControlItem12.Text = "计量单位"; + this.layoutControlItem12.TextSize = new System.Drawing.Size(96, 14); + + // + // lookUpEdit1 + // + this.txtwarehouse.Location = new System.Drawing.Point(120, 60); + 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(932, 20); + this.txtwarehouse.StyleController = this.layoutControl1; + this.txtwarehouse.TabIndex = 13; + this.txtwarehouse.EditValue = ""; + + // + // layoutControlItem13 + // + this.layoutControlItem13.Control = this.txtwarehouse; + this.layoutControlItem13.CustomizationFormText = "仓库"; + this.layoutControlItem13.Location = new System.Drawing.Point(0, 288); + this.layoutControlItem13.Name = "layoutControlItem13"; + this.layoutControlItem13.Size = new System.Drawing.Size(585, 24); + this.layoutControlItem13.Text = "仓库"; + this.layoutControlItem13.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtunitprice.Location = new System.Drawing.Point(112, 324); + this.txtunitprice.Name = "txtunitprice"; + this.txtunitprice.Size = new System.Drawing.Size(481, 20); + this.txtunitprice.StyleController = this.layoutControl1; + this.txtunitprice.TabIndex = 14; + // + // layoutControlItem14 + // + this.layoutControlItem14.Control = this.txtunitprice; + this.layoutControlItem14.CustomizationFormText = "单价"; + this.layoutControlItem14.Location = new System.Drawing.Point(0, 312); + this.layoutControlItem14.Name = "layoutControlItem14"; + this.layoutControlItem14.Size = new System.Drawing.Size(585, 24); + this.layoutControlItem14.Text = "单价"; + this.layoutControlItem14.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtmoney.Location = new System.Drawing.Point(112, 348); + this.txtmoney.Name = "txtmoney"; + this.txtmoney.Size = new System.Drawing.Size(481, 20); + this.txtmoney.StyleController = this.layoutControl1; + this.txtmoney.TabIndex = 15; + // + // layoutControlItem15 + // + this.layoutControlItem15.Control = this.txtmoney; + this.layoutControlItem15.CustomizationFormText = "金额"; + this.layoutControlItem15.Location = new System.Drawing.Point(0, 336); + this.layoutControlItem15.Name = "layoutControlItem15"; + this.layoutControlItem15.Size = new System.Drawing.Size(585, 24); + this.layoutControlItem15.Text = "金额"; + this.layoutControlItem15.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtremark.Location = new System.Drawing.Point(112, 372); + this.txtremark.Name = "txtremark"; + this.txtremark.Size = new System.Drawing.Size(481, 20); + this.txtremark.StyleController = this.layoutControl1; + this.txtremark.TabIndex = 16; + // + // layoutControlItem16 + // + this.layoutControlItem16.Control = this.txtremark; + this.layoutControlItem16.CustomizationFormText = "备注"; + this.layoutControlItem16.Location = new System.Drawing.Point(0, 360); + this.layoutControlItem16.Name = "layoutControlItem16"; + this.layoutControlItem16.Size = new System.Drawing.Size(585, 24); + this.layoutControlItem16.Text = "备注"; + this.layoutControlItem16.TextSize = new System.Drawing.Size(96, 14); + + + // + // 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.layoutControlGroup1.Location = new System.Drawing.Point(0, 0); + this.layoutControlGroup1.Name = "layoutControlGroup1"; + this.layoutControlGroup1.Size = new System.Drawing.Size(605, 363); + this.layoutControlGroup1.Text = "layoutControlGroup1"; + this.layoutControlGroup1.TextVisible = false; + + + // + // 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(585, 436); + 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(579, 407); + this.tabDataList.Text = "数据列表"; + // + // tabDataDetail + // + this.tabDataDetail.Controls.Add(this.panelControl2); + this.tabDataDetail.Name = "tabDataDetail"; + this.tabDataDetail.Size = new System.Drawing.Size(579, 407); + this.tabDataDetail.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(579, 407); + 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.grdListView.OptionsBehavior.Editable = false; + this.grdListView.GridControl = this.grdList; + this.grdListView.Name = "grdListView"; + this.grdListView.OptionsView.ColumnAutoWidth=false; + this.grdListView.BestFitColumns(); + // + // 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(579, 407); + this.panelControl2.TabIndex = 0; + + //////////////////////////////// + (this.gridColumn1).Caption = "id"; + (this.gridColumn1).Name = "gridColumn1"; + (this.gridColumn1).FieldName = "id"; + // repositoryItemTreeListLookUpEdit1 + // + (this.gridColumn2).ColumnEdit = this.repositoryItemTreeListtxtpid; + this.repositoryItemTreeListtxtpid.AutoHeight = false; + this.repositoryItemTreeListtxtpid.DisplayMember = "Name"; + this.repositoryItemTreeListtxtpid.ValueMember = "ID"; + this.repositoryItemTreeListtxtpid.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemTreeListtxtpid.Name = "repositoryItemTreeListtxtpid"; + this.repositoryItemTreeListtxtpid.TreeList = this.repositoryItemTreeListtxtpidTreeList; + // + // repositoryItemTreeListLookUpEdit1TreeList + // + this.repositoryItemTreeListtxtpidTreeList.Location = new System.Drawing.Point(0, 0); + this.repositoryItemTreeListtxtpidTreeList.ParentFieldName = "PID"; + this.repositoryItemTreeListtxtpidTreeList.Name = "repositoryItemTreeListtxtpidTreeList"; + this.repositoryItemTreeListtxtpidTreeList.OptionsView.ShowIndentAsRowStyle = true; + this.repositoryItemTreeListtxtpidTreeList.Size = new System.Drawing.Size(400, 200); + this.repositoryItemTreeListtxtpidTreeList.TabIndex = 0; + (this.gridColumn2).Caption = "父项"; + (this.gridColumn2).Name = "gridColumn2"; + (this.gridColumn2).FieldName = "pid"; + (this.gridColumn2).Visible = true; + (this.gridColumn2).VisibleIndex = 2; + + //////////////////////////////// + (this.gridColumn3).Caption = "BOM主表"; + (this.gridColumn3).Name = "gridColumn3"; + (this.gridColumn3).FieldName = "productBOMid"; + (this.gridColumn3).Visible = true; + (this.gridColumn3).VisibleIndex = 3; + + //////////////////////////////// + (this.gridColumn4).Caption = "BOM编号"; + (this.gridColumn4).Name = "gridColumn4"; + (this.gridColumn4).FieldName = "productBOMcode"; + (this.gridColumn4).Visible = true; + (this.gridColumn4).VisibleIndex = 4; + + //////////////////////////////// + (this.gridColumn5).Caption = "产品编号"; + (this.gridColumn5).Name = "gridColumn5"; + (this.gridColumn5).FieldName = "productcode"; + (this.gridColumn5).Visible = true; + (this.gridColumn5).VisibleIndex = 5; + + //////////////////////////////// + (this.gridColumn6).Caption = "物料id"; + (this.gridColumn6).Name = "gridColumn6"; + (this.gridColumn6).FieldName = "materialid"; + (this.gridColumn6).Visible = true; + (this.gridColumn6).VisibleIndex = 6; + + // repositoryItemTreeListLookUpEdit1 + // + (this.gridColumn7).ColumnEdit = this.repositoryItemTreeListtxtmaterialname; + this.repositoryItemTreeListtxtmaterialname.AutoHeight = false; + this.repositoryItemTreeListtxtmaterialname.DisplayMember = "Name"; + this.repositoryItemTreeListtxtmaterialname.ValueMember = "ID"; + this.repositoryItemTreeListtxtmaterialname.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemTreeListtxtmaterialname.Name = "repositoryItemTreeListtxtmaterialname"; + this.repositoryItemTreeListtxtmaterialname.TreeList = this.repositoryItemTreeListtxtmaterialnameTreeList; + // + // repositoryItemTreeListLookUpEdit1TreeList + // + this.repositoryItemTreeListtxtmaterialnameTreeList.Location = new System.Drawing.Point(0, 0); + this.repositoryItemTreeListtxtmaterialnameTreeList.ParentFieldName = "PID"; + this.repositoryItemTreeListtxtmaterialnameTreeList.Name = "repositoryItemTreeListtxtmaterialnameTreeList"; + this.repositoryItemTreeListtxtmaterialnameTreeList.OptionsView.ShowIndentAsRowStyle = true; + this.repositoryItemTreeListtxtmaterialnameTreeList.Size = new System.Drawing.Size(400, 200); + this.repositoryItemTreeListtxtmaterialnameTreeList.TabIndex = 0; + (this.gridColumn7).Caption = "物料名称"; + (this.gridColumn7).Name = "gridColumn7"; + (this.gridColumn7).FieldName = "materialname"; + (this.gridColumn7).Visible = true; + (this.gridColumn7).VisibleIndex = 7; + + //////////////////////////////// + (this.gridColumn8).Caption = "物料编号"; + (this.gridColumn8).Name = "gridColumn8"; + (this.gridColumn8).FieldName = "materialcode"; + (this.gridColumn8).Visible = true; + (this.gridColumn8).VisibleIndex = 8; + + //////////////////////////////// + (this.gridColumn9).Caption = "规格型号"; + (this.gridColumn9).Name = "gridColumn9"; + (this.gridColumn9).FieldName = "materialspec"; + (this.gridColumn9).Visible = true; + (this.gridColumn9).VisibleIndex = 9; + + (this.gridColumn10).ColumnEdit = this.repositoryItemtxtmaterialtype; + this.repositoryItemtxtmaterialtype.AutoHeight = false; + this.repositoryItemtxtmaterialtype.DisplayMember = "Name"; + this.repositoryItemtxtmaterialtype.ValueMember = "ID"; + this.repositoryItemtxtmaterialtype.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtmaterialtype.Name = "repositoryItemtxtmaterialtype"; + (this.gridColumn10).Caption = "物料类型"; + (this.gridColumn10).Name = "gridColumn10"; + (this.gridColumn10).FieldName = "materialtype"; + (this.gridColumn10).Visible = true; + (this.gridColumn10).VisibleIndex = 10; + + //////////////////////////////// + (this.gridColumn11).Caption = "单位用量"; + (this.gridColumn11).Name = "gridColumn11"; + (this.gridColumn11).FieldName = "unitusenumber"; + (this.gridColumn11).Visible = true; + (this.gridColumn11).VisibleIndex = 11; + + (this.gridColumn12).ColumnEdit = this.repositoryItemtxtunit; + this.repositoryItemtxtunit.AutoHeight = false; + this.repositoryItemtxtunit.DisplayMember = "Name"; + this.repositoryItemtxtunit.ValueMember = "ID"; + this.repositoryItemtxtunit.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtunit.Name = "repositoryItemtxtunit"; + (this.gridColumn12).Caption = "计量单位"; + (this.gridColumn12).Name = "gridColumn12"; + (this.gridColumn12).FieldName = "unit"; + (this.gridColumn12).Visible = true; + (this.gridColumn12).VisibleIndex = 12; + + (this.gridColumn13).ColumnEdit = this.repositoryItemtxtwarehouse; + this.repositoryItemtxtwarehouse.AutoHeight = false; + this.repositoryItemtxtwarehouse.DisplayMember = "Name"; + this.repositoryItemtxtwarehouse.ValueMember = "ID"; + this.repositoryItemtxtwarehouse.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtwarehouse.Name = "repositoryItemtxtwarehouse"; + (this.gridColumn13).Caption = "仓库"; + (this.gridColumn13).Name = "gridColumn13"; + (this.gridColumn13).FieldName = "warehouse"; + (this.gridColumn13).Visible = true; + (this.gridColumn13).VisibleIndex = 13; + + //////////////////////////////// + (this.gridColumn14).Caption = "单价"; + (this.gridColumn14).Name = "gridColumn14"; + (this.gridColumn14).FieldName = "unitprice"; + (this.gridColumn14).Visible = true; + (this.gridColumn14).VisibleIndex = 14; + + //////////////////////////////// + (this.gridColumn15).Caption = "金额"; + (this.gridColumn15).Name = "gridColumn15"; + (this.gridColumn15).FieldName = "money"; + (this.gridColumn15).Visible = true; + (this.gridColumn15).VisibleIndex = 15; + + //////////////////////////////// + (this.gridColumn16).Caption = "备注"; + (this.gridColumn16).Name = "gridColumn16"; + (this.gridColumn16).FieldName = "remark"; + (this.gridColumn16).Visible = true; + (this.gridColumn16).VisibleIndex = 16; + + + // + // XtraForm1 + // + 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 = "FrmproductBOMdetail"; + this.Text = "FrmproductBOMdetail"; + this.Load += new System.EventHandler(this.FrmproductBOMdetail_Load); + this.Controls.SetChildIndex(this.xtraTabControl1, 0); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtpidTreeList)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtpid)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtpidTreeList)).EndInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtpid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtproductBOMid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtproductBOMcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtproductcode.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.txtmaterialnameTreeList)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtmaterialname)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtmaterialnameTreeList)).EndInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialname.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialspec.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtmaterialtype)).EndInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialtype.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtunitusenumber.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtunit)).EndInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtwarehouse)).EndInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtunitprice.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmoney.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); + this.xtraTabControl1.ResumeLayout(false); + this.tabDataList.ResumeLayout(false); + this.tabDataDetail.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.grdList)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.grdListView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); + this.layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).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.XtraEditors.TextEdit txtid; + private DevExpress.XtraTreeList.TreeList txtpidTreeList; + private DevExpress.XtraEditors.Repository.RepositoryItemTreeListLookUpEdit repositoryItemTreeListtxtpid; + private DevExpress.XtraTreeList.TreeList repositoryItemTreeListtxtpidTreeList; + + private DevExpress.XtraEditors.TreeListLookUpEdit txtpid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtproductBOMid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtproductBOMcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtproductcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmaterialid; + private DevExpress.XtraTreeList.TreeList txtmaterialnameTreeList; + private DevExpress.XtraEditors.Repository.RepositoryItemTreeListLookUpEdit repositoryItemTreeListtxtmaterialname; + private DevExpress.XtraTreeList.TreeList repositoryItemTreeListtxtmaterialnameTreeList; + + private DevExpress.XtraEditors.TreeListLookUpEdit txtmaterialname; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmaterialcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmaterialspec; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtmaterialtype; + + private DevExpress.XtraEditors.LookUpEdit txtmaterialtype; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtunitusenumber; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtunit; + + private DevExpress.XtraEditors.LookUpEdit txtunit; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtwarehouse; + + private DevExpress.XtraEditors.LookUpEdit txtwarehouse; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtunitprice; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmoney; + /////////////////////////////// + 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; + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmproductBOMdetail.resx b/WinformGeneralDeveloperFrame/Form/FrmproductBOMdetail.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmproductBOMdetail.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.designer.cs b/WinformGeneralDeveloperFrame/Form/Frmquotation.designer.cs index bcf5440..9c4716d 100644 --- a/WinformGeneralDeveloperFrame/Form/Frmquotation.designer.cs +++ b/WinformGeneralDeveloperFrame/Form/Frmquotation.designer.cs @@ -60,6 +60,7 @@ namespace MES.Form this.toolStripMenuItemAdd = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemDel = new System.Windows.Forms.ToolStripMenuItem(); this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.gridColumn12 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn11 = new DevExpress.XtraGrid.Columns.GridColumn(); this.productid = new DevExpress.XtraGrid.Columns.GridColumn(); this.repositoryItemtxtproductid = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); @@ -97,7 +98,9 @@ namespace MES.Form this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); - this.gridColumn12 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.txttotalprice = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + this.gridColumn23 = new DevExpress.XtraGrid.Columns.GridColumn(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcustomerid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcustomertype)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcustomeruser)).BeginInit(); @@ -141,6 +144,8 @@ namespace MES.Form ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txttotalprice.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit(); this.SuspendLayout(); // // gridColumn1 @@ -314,7 +319,8 @@ namespace MES.Form this.gridColumn7, this.gridColumn8, this.gridColumn9, - this.gridColumn10}); + this.gridColumn10, + this.gridColumn23}); this.grdListView.GridControl = this.grdList; this.grdListView.Name = "grdListView"; this.grdListView.OptionsBehavior.Editable = false; @@ -337,6 +343,7 @@ namespace MES.Form // // layoutControl1 // + this.layoutControl1.Controls.Add(this.txttotalprice); this.layoutControl1.Controls.Add(this.gridControl1); this.layoutControl1.Controls.Add(this.txtid); this.layoutControl1.Controls.Add(this.txtcustomerid); @@ -415,6 +422,12 @@ namespace MES.Form this.gridView1.OptionsView.ShowFooter = true; this.gridView1.ValidateRow += new DevExpress.XtraGrid.Views.Base.ValidateRowEventHandler(this.gridView1_ValidateRow); // + // gridColumn12 + // + this.gridColumn12.Caption = "gridColumn12"; + this.gridColumn12.FieldName = "productname"; + this.gridColumn12.Name = "gridColumn12"; + // // gridColumn11 // this.gridColumn11.Caption = "id"; @@ -634,7 +647,7 @@ namespace MES.Form // txtcreatorId // this.txtcreatorId.EditValue = ""; - this.txtcreatorId.Location = new System.Drawing.Point(63, 108); + this.txtcreatorId.Location = new System.Drawing.Point(698, 108); this.txtcreatorId.Name = "txtcreatorId"; this.txtcreatorId.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); @@ -642,7 +655,7 @@ 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(1215, 20); + this.txtcreatorId.Size = new System.Drawing.Size(580, 20); this.txtcreatorId.StyleController = this.layoutControl1; this.txtcreatorId.TabIndex = 7; // @@ -685,7 +698,8 @@ namespace MES.Form this.layoutControlItem5, this.layoutControlItem8, this.layoutControlItem9, - this.layoutControlItem11}); + this.layoutControlItem11, + this.layoutControlItem12}); this.layoutControlGroup1.Name = "layoutControlGroup1"; this.layoutControlGroup1.Size = new System.Drawing.Size(1290, 733); this.layoutControlGroup1.TextVisible = false; @@ -734,9 +748,9 @@ namespace MES.Form // this.layoutControlItem7.Control = this.txtcreatorId; this.layoutControlItem7.CustomizationFormText = "制单人"; - this.layoutControlItem7.Location = new System.Drawing.Point(0, 96); + this.layoutControlItem7.Location = new System.Drawing.Point(635, 96); this.layoutControlItem7.Name = "layoutControlItem7"; - this.layoutControlItem7.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem7.Size = new System.Drawing.Size(635, 24); this.layoutControlItem7.Text = "制单人"; this.layoutControlItem7.TextSize = new System.Drawing.Size(48, 14); // @@ -799,11 +813,30 @@ namespace MES.Form this.layoutControlItem11.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem11.TextVisible = false; // - // gridColumn12 + // txttotalprice // - this.gridColumn12.Caption = "gridColumn12"; - this.gridColumn12.FieldName = "productname"; - this.gridColumn12.Name = "gridColumn12"; + this.txttotalprice.Location = new System.Drawing.Point(63, 108); + this.txttotalprice.Name = "txttotalprice"; + this.txttotalprice.Size = new System.Drawing.Size(580, 20); + this.txttotalprice.StyleController = this.layoutControl1; + this.txttotalprice.TabIndex = 12; + // + // layoutControlItem12 + // + this.layoutControlItem12.Control = this.txttotalprice; + this.layoutControlItem12.Location = new System.Drawing.Point(0, 96); + this.layoutControlItem12.Name = "layoutControlItem12"; + this.layoutControlItem12.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem12.Text = "总价"; + this.layoutControlItem12.TextSize = new System.Drawing.Size(48, 14); + // + // gridColumn23 + // + this.gridColumn23.Caption = "总价"; + this.gridColumn23.FieldName = "totalprice"; + this.gridColumn23.Name = "gridColumn23"; + this.gridColumn23.Visible = true; + this.gridColumn23.VisibleIndex = 8; // // Frmquotation // @@ -858,6 +891,8 @@ namespace MES.Form ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txttotalprice.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit(); this.ResumeLayout(false); } @@ -940,5 +975,8 @@ namespace MES.Form private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtstockid; private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtproductid; private DevExpress.XtraGrid.Columns.GridColumn gridColumn12; + private TextEdit txttotalprice; + private LayoutControlItem layoutControlItem12; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn23; } } \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/Frmreturnsale.cs b/WinformGeneralDeveloperFrame/Form/Frmreturnsale.cs new file mode 100644 index 0000000..17bfc5c --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/Frmreturnsale.cs @@ -0,0 +1,362 @@ +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; +using DevExpress.XtraEditors; +using DevExpress.XtraEditors.Repository; +using DevExpress.XtraGrid.Columns; + +namespace MES.Form +{ + public partial class Frmreturnsale : FrmBaseForm + { + private Dictionary fieldDictionary = new Dictionary(); + public Frmreturnsale() + { + InitializeComponent(); + } + private void Frmreturnsale_Load(object sender, EventArgs e) + { + + InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new returnsaleInfo(),gridControl1,new string[]{ "txtreturnsalecode" }); + InitSearchDicData(); + repositoryItemGridLookUpEditdeliversalecode.EditValueChanged += RepositoryItemGridLookUpEditdeliversalecode_EditValueChanged; + } + + + /// + /// 数据源初始化 + /// + /// + private void Init() + { + txtcustomerid.Properties.DataSource = GetDataTableUtils.SqlTable("客户"); + repositoryItemtxtcustomerid.DataSource= GetDataTableUtils.SqlTable("客户"); + txtcustomertype.Properties.DataSource = GetDataTableUtils.SqlTable("客户类别"); + repositoryItemtxtcustomertype.DataSource= GetDataTableUtils.SqlTable("客户类别"); + txtcontactuser.Properties.DataSource = GetDataTableUtils.SqlTable("用户"); + repositoryItemtxtcontactuser.DataSource= GetDataTableUtils.SqlTable("用户"); + txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户"); + repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户"); + repositoryItemLookUpEditunit.DataSource = GetDataTableUtils.SqlTable("计量单位"); + repositoryItemLookUpEditwarehouse.DataSource = GetDataTableUtils.SqlTable("仓库"); + } + /// + /// 搜索字段 + /// + /// + private void InitSearchDicData() + { + fieldDictionary.Add("退货单号","returnsalecode"); + } + + public override void InitgrdListDataSource() + { + using (var con=new MESDB()) + { + grdList.DataSource=con.returnsaleInfo.ToList(); + } + Init(); + } + /// + /// 字段为空校验 + /// + /// + public override bool CheckInput() + { + if(string.IsNullOrEmpty(txtreturndate.Text)) + { + "退货日期不能为空".ShowWarning(); + txtreturndate.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtcustomercode.EditValue.ToString())) + { + "客户编号不能为空".ShowWarning(); + txtcustomercode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtcustomerid.EditValue.ToString())) + { + "客户不能为空".ShowWarning(); + txtcustomerid.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtcustomertype.EditValue.ToString())) + { + "客户类型不能为空".ShowWarning(); + txtcustomertype.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtcontactuser.EditValue.ToString())) + { + "联系人不能为空".ShowWarning(); + txtcontactuser.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtcontactphone.EditValue.ToString())) + { + "联系电话不能为空".ShowWarning(); + txtcontactphone.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtcreatorId.EditValue.ToString())) + { + "制单人不能为空".ShowWarning(); + txtcreatorId.Focus(); + return false; + } + return true; + } + /// + /// 保存 + /// + /// + public override bool SaveFunction() + { + string code = "SD" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + + DateTime.Now.Minute + DateTime.Now.Second + DateTime.Now.Millisecond.ToString("D3"); + DataTable dt = gridControl1.DataSource as DataTable; + try + { + returnsaleInfo info = (returnsaleInfo)this.ControlDataToModel(new returnsaleInfo()); + using (var db = new MESDB()) + { + using (var tran = db.Database.BeginTransaction()) + { + try + { + Dictionary> dic = + dt.GetDataTableData(); + if (info.id == 0)//新增 + { + info.returnsalecode = code; + db.returnsaleInfo.Add(info); + db.SaveChanges(); + txtid.Text = info.id.ToString(); + txtreturnsalecode.Text = code; + if (dt != null) + { + List detaiListAdd = + dic["Add"]; + detaiListAdd.ForEach(a => + { + a.returnsalecode = info.returnsalecode; + a.returnsaleid = info.id; + }); + db.returnsaledetailInfo.AddRange(detaiListAdd); + db.SaveChanges(); + } + } + else //更新 + { + db.Entry(info).State = EntityState.Modified; + db.SaveChanges(); + if (dt != null) + { + List detaiListAdd = + dic["Add"]; + detaiListAdd.ForEach(a => + { + a.returnsalecode = info.returnsalecode; + a.returnsaleid = info.id; + }); + db.returnsaledetailInfo.AddRange(detaiListAdd); + + List detaiListEdit = + dic["Edit"]; + detaiListEdit.ForEach((a) => + { + a.returnsalecode = info.returnsalecode; + 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 + { + returnsaleInfo info = (returnsaleInfo)this.ControlDataToModel(new returnsaleInfo()); + using (var db = new MESDB()) + { + db.Entry(info).State=EntityState.Deleted; + db.Database.ExecuteSqlCommand($"delete from returnsaledetail where returnsaleid={info.id}"); + 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.returnsaleInfo.SqlQuery("select * from returnsale").ToList(); + } + else + { + grdList.DataSource = db.returnsaleInfo.SqlQuery($"select * from returnsale where {sql}").ToList(); + } + } + } + } + public override void EditFunction() + { + txtcustomerid.ReadOnly = true; + } + + public override void AddFunction() + { + gridControl1.DataSource = new List().ToDataTable(); + } + + public override void gridControlMouseDoubleClickFunction(object sender, EventArgs e) + { + Initresgridcontrollookupedit(); + returnsaleInfo info = grdListView.GetFocusedRow() as returnsaleInfo; + if (info != null) + { + using (var db = new MESDB()) + { + gridControl1.DataSource = db.returnsaledetailInfo.Where(p => p.returnsaleid == info.id).ToList().ToDataTable(); + gridView1.BestFitColumns(); + } + } + } + + private void Initresgridcontrollookupedit() + { + + GridColumn col11 = new GridColumn() { Caption = "出货单号", FieldName = "deliversalecode", Visible = true }; + + GridColumn col1 = new GridColumn() { Caption = "销售单号", FieldName = "salecode", Visible = true }; + + GridColumn col7 = new GridColumn() { Caption = "产品名称", FieldName = "productname", Visible = true }; + + GridColumn col2 = new GridColumn() { Caption = "规格型号", FieldName = "productspec", Visible = true }; + GridColumn col3 = new GridColumn() { Caption = "数量", FieldName = "number", Visible = true }; + GridColumn col31 = new GridColumn() { Caption = "计量单位", FieldName = "unit", Visible = true }; + RepositoryItemLookUpEdit resItemLookUpEditunit = new RepositoryItemLookUpEdit(); + resItemLookUpEditunit.DataSource = GetDataTableUtils.SqlTable("计量单位"); + resItemLookUpEditunit.DisplayMember = "Name"; + resItemLookUpEditunit.ValueMember = "ID"; + col31.ColumnEdit = resItemLookUpEditunit; + + GridColumn col5 = new GridColumn() { Caption = "仓库", FieldName = "warehouse", Visible = true }; + RepositoryItemLookUpEdit resItemLookUpEditwarehouse = new RepositoryItemLookUpEdit(); + resItemLookUpEditwarehouse.DataSource = GetDataTableUtils.SqlTable("仓库"); + resItemLookUpEditwarehouse.DisplayMember = "Name"; + resItemLookUpEditwarehouse.ValueMember = "ID"; + col5.ColumnEdit = resItemLookUpEditwarehouse; + + gridView2.Columns.AddRange(new GridColumn[] { col11,col1, col7, col2, col3, col31, col5 }); + } + private void txtcustomerid_EditValueChanged(object sender, EventArgs e) + { + Initresgridcontrollookupedit(); + using (var db = new MESDB()) + { + + if (txtcustomerid.EditValue != null) + { + int id = txtcustomerid.EditValue.ToString().ToInt16(); + repositoryItemGridLookUpEditdeliversalecode.DataSource = + db.Database.SqlQuery($"SELECT dt.*FROM deliversale d left join deliversaledetail dt on d.id = dt.deliversaleid where d.customerid = {id} ").ToDataTable(); + customerInfo customer = db.customerInfo.Where(p => p.id == id) + .First(); + if (customer != null) + { + txtcustomercode.Text = customer.customercode; + txtcustomertype.EditValue = customer.customertype; + txtcontactuser.EditValue = customer.contactuser; + txtcontactphone.Text = customer.phonenumber; + } + } + } + } + + private void RepositoryItemGridLookUpEditdeliversalecode_EditValueChanged(object sender, EventArgs e) + { + using (var db = new MESDB()) + { + GridLookUpEdit look = sender as GridLookUpEdit; + deliversaledetailInfo detailInfo = look.Properties.View.GetFocusedDataRow().RowToModel(); + gridView1.GetFocusedDataRow()["deliversalecode"] = detailInfo.deliversalecode; + gridView1.GetFocusedDataRow()["salecode"] = detailInfo.salecode; + gridView1.GetFocusedDataRow()["productcode"] = detailInfo.productcode; + gridView1.GetFocusedDataRow()["productspec"] = detailInfo.productspec; + gridView1.GetFocusedDataRow()["productname"] = detailInfo.productname; + gridView1.GetFocusedDataRow()["unit"] = detailInfo.unit; + gridView1.GetFocusedDataRow()["warehouse"] = detailInfo.warehouse; + gridView1.GetFocusedDataRow()["returnnumber"] = detailInfo.number; + } + } + private void toolStripMenuItemAdd_Click(object sender, EventArgs e) + { + gridView1.AddNewRow(); + } + + private void toolStripMenuItemDel_Click(object sender, EventArgs e) + { + gridView1.DeleteRow(gridView1.FocusedRowHandle); + } + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/Frmreturnsale.designer.cs b/WinformGeneralDeveloperFrame/Form/Frmreturnsale.designer.cs new file mode 100644 index 0000000..a52a64d --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/Frmreturnsale.designer.cs @@ -0,0 +1,976 @@ + +using DevExpress.XtraEditors; +using DevExpress.XtraLayout; +using DevExpress.XtraTab; + +namespace MES.Form +{ + partial class Frmreturnsale + { + /// + /// 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.repositoryItemtxtcustomerid = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemtxtcustomertype = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemtxtcontactuser = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn7 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemtxtcreatorId = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn10 = 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.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.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.repositoryItemGridLookUpEditdeliversalecode = new DevExpress.XtraEditors.Repository.RepositoryItemGridLookUpEdit(); + this.gridView2 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.gridColumn15 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn16 = new DevExpress.XtraGrid.Columns.GridColumn(); + 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.repositoryItemLookUpEditunit = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn22 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemGridLookUpEdit = new DevExpress.XtraEditors.Repository.RepositoryItemGridLookUpEdit(); + this.repositoryItemGridLookUpEdit1View = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.txtid = new DevExpress.XtraEditors.TextEdit(); + this.txtreturndate = new DevExpress.XtraEditors.DateEdit(); + this.txtcustomercode = new DevExpress.XtraEditors.TextEdit(); + this.txtcustomerid = new DevExpress.XtraEditors.LookUpEdit(); + this.txtcustomertype = new DevExpress.XtraEditors.LookUpEdit(); + this.txtcontactuser = new DevExpress.XtraEditors.LookUpEdit(); + this.txtcontactphone = new DevExpress.XtraEditors.TextEdit(); + this.txtcreatorId = new DevExpress.XtraEditors.LookUpEdit(); + this.txtreturnsalecode = new DevExpress.XtraEditors.TextEdit(); + this.txtremark = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcustomerid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcustomertype)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcontactuser)).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.gridControl1)).BeginInit(); + this.contextMenuStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemGridLookUpEditdeliversalecode)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditwarehouse)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditunit)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemGridLookUpEdit)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemGridLookUpEdit1View)).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.txtcustomercode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcustomerid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcustomertype.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcontactuser.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcontactphone.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturnsalecode.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.layoutControlItem8)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).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 = "customercode"; + this.gridColumn3.Name = "gridColumn3"; + this.gridColumn3.Visible = true; + this.gridColumn3.VisibleIndex = 1; + this.gridColumn3.Width = 201; + // + // gridColumn4 + // + this.gridColumn4.Caption = "客户"; + this.gridColumn4.ColumnEdit = this.repositoryItemtxtcustomerid; + this.gridColumn4.FieldName = "customerid"; + this.gridColumn4.Name = "gridColumn4"; + this.gridColumn4.Visible = true; + this.gridColumn4.VisibleIndex = 2; + this.gridColumn4.Width = 201; + // + // repositoryItemtxtcustomerid + // + this.repositoryItemtxtcustomerid.AutoHeight = false; + this.repositoryItemtxtcustomerid.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtcustomerid.DisplayMember = "Name"; + this.repositoryItemtxtcustomerid.Name = "repositoryItemtxtcustomerid"; + this.repositoryItemtxtcustomerid.ValueMember = "ID"; + // + // gridColumn5 + // + this.gridColumn5.Caption = "客户类型"; + this.gridColumn5.ColumnEdit = this.repositoryItemtxtcustomertype; + this.gridColumn5.FieldName = "customertype"; + this.gridColumn5.Name = "gridColumn5"; + this.gridColumn5.Visible = true; + this.gridColumn5.VisibleIndex = 3; + this.gridColumn5.Width = 201; + // + // repositoryItemtxtcustomertype + // + this.repositoryItemtxtcustomertype.AutoHeight = false; + this.repositoryItemtxtcustomertype.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtcustomertype.DisplayMember = "Name"; + this.repositoryItemtxtcustomertype.Name = "repositoryItemtxtcustomertype"; + this.repositoryItemtxtcustomertype.ValueMember = "ID"; + // + // gridColumn6 + // + this.gridColumn6.Caption = "联系人"; + this.gridColumn6.ColumnEdit = this.repositoryItemtxtcontactuser; + this.gridColumn6.FieldName = "contactuser"; + this.gridColumn6.Name = "gridColumn6"; + this.gridColumn6.Visible = true; + this.gridColumn6.VisibleIndex = 4; + this.gridColumn6.Width = 201; + // + // repositoryItemtxtcontactuser + // + this.repositoryItemtxtcontactuser.AutoHeight = false; + this.repositoryItemtxtcontactuser.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtcontactuser.DisplayMember = "Name"; + this.repositoryItemtxtcontactuser.Name = "repositoryItemtxtcontactuser"; + this.repositoryItemtxtcontactuser.ValueMember = "ID"; + // + // gridColumn7 + // + this.gridColumn7.Caption = "联系电话"; + this.gridColumn7.FieldName = "contactphone"; + this.gridColumn7.Name = "gridColumn7"; + this.gridColumn7.Visible = true; + this.gridColumn7.VisibleIndex = 5; + this.gridColumn7.Width = 201; + // + // gridColumn8 + // + this.gridColumn8.Caption = "制单人"; + this.gridColumn8.ColumnEdit = this.repositoryItemtxtcreatorId; + this.gridColumn8.FieldName = "creatorId"; + this.gridColumn8.Name = "gridColumn8"; + this.gridColumn8.Visible = true; + this.gridColumn8.VisibleIndex = 6; + this.gridColumn8.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"; + // + // gridColumn9 + // + this.gridColumn9.Caption = "退货单号"; + this.gridColumn9.FieldName = "returnsalecode"; + this.gridColumn9.Name = "gridColumn9"; + this.gridColumn9.Visible = true; + this.gridColumn9.VisibleIndex = 7; + this.gridColumn9.Width = 201; + // + // gridColumn10 + // + this.gridColumn10.Caption = "备注"; + this.gridColumn10.FieldName = "remark"; + this.gridColumn10.Name = "gridColumn10"; + this.gridColumn10.Visible = true; + this.gridColumn10.VisibleIndex = 8; + this.gridColumn10.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.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.gridControl1); + this.layoutControl1.Controls.Add(this.txtid); + this.layoutControl1.Controls.Add(this.txtreturndate); + this.layoutControl1.Controls.Add(this.txtcustomercode); + this.layoutControl1.Controls.Add(this.txtcustomerid); + this.layoutControl1.Controls.Add(this.txtcustomertype); + this.layoutControl1.Controls.Add(this.txtcontactuser); + this.layoutControl1.Controls.Add(this.txtcontactphone); + this.layoutControl1.Controls.Add(this.txtcreatorId); + this.layoutControl1.Controls.Add(this.txtreturnsalecode); + 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"; + // + // gridControl1 + // + this.gridControl1.ContextMenuStrip = this.contextMenuStrip1; + this.gridControl1.Location = new System.Drawing.Point(12, 156); + this.gridControl1.MainView = this.gridView1; + this.gridControl1.Name = "gridControl1"; + this.gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { + this.repositoryItemLookUpEditwarehouse, + this.repositoryItemLookUpEditunit, + this.repositoryItemGridLookUpEdit, + this.repositoryItemGridLookUpEditdeliversalecode}); + this.gridControl1.Size = new System.Drawing.Size(1266, 565); + this.gridControl1.TabIndex = 11; + 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.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; + // + // gridColumn11 + // + this.gridColumn11.Caption = "id"; + this.gridColumn11.FieldName = "id"; + this.gridColumn11.Name = "gridColumn11"; + // + // gridColumn12 + // + this.gridColumn12.Caption = "退货单主表"; + this.gridColumn12.FieldName = "returnsaleid"; + this.gridColumn12.Name = "gridColumn12"; + // + // gridColumn13 + // + this.gridColumn13.Caption = "退货单号"; + this.gridColumn13.FieldName = "returnsalecode"; + this.gridColumn13.Name = "gridColumn13"; + this.gridColumn13.OptionsColumn.AllowEdit = false; + this.gridColumn13.Visible = true; + this.gridColumn13.VisibleIndex = 1; + this.gridColumn13.Width = 201; + // + // gridColumn14 + // + this.gridColumn14.Caption = "出货单号"; + this.gridColumn14.ColumnEdit = this.repositoryItemGridLookUpEditdeliversalecode; + this.gridColumn14.FieldName = "deliversalecode"; + this.gridColumn14.Name = "gridColumn14"; + this.gridColumn14.Visible = true; + this.gridColumn14.VisibleIndex = 0; + this.gridColumn14.Width = 201; + // + // repositoryItemGridLookUpEditdeliversalecode + // + this.repositoryItemGridLookUpEditdeliversalecode.AutoHeight = false; + this.repositoryItemGridLookUpEditdeliversalecode.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemGridLookUpEditdeliversalecode.DisplayMember = "deliversalecode"; + this.repositoryItemGridLookUpEditdeliversalecode.Name = "repositoryItemGridLookUpEditdeliversalecode"; + this.repositoryItemGridLookUpEditdeliversalecode.NullText = ""; + this.repositoryItemGridLookUpEditdeliversalecode.PopupView = this.gridView2; + this.repositoryItemGridLookUpEditdeliversalecode.ValueMember = "deliversalecode"; + // + // gridView2 + // + this.gridView2.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus; + this.gridView2.Name = "gridView2"; + this.gridView2.OptionsSelection.EnableAppearanceFocusedCell = false; + this.gridView2.OptionsView.ColumnAutoWidth = false; + this.gridView2.OptionsView.ShowGroupPanel = false; + // + // gridColumn15 + // + this.gridColumn15.Caption = "销售单号"; + this.gridColumn15.FieldName = "salecode"; + this.gridColumn15.Name = "gridColumn15"; + this.gridColumn15.OptionsColumn.AllowEdit = false; + this.gridColumn15.Visible = true; + this.gridColumn15.VisibleIndex = 2; + this.gridColumn15.Width = 201; + // + // gridColumn16 + // + this.gridColumn16.Caption = "产品编号"; + this.gridColumn16.FieldName = "productcode"; + this.gridColumn16.Name = "gridColumn16"; + this.gridColumn16.OptionsColumn.AllowEdit = false; + this.gridColumn16.Visible = true; + this.gridColumn16.VisibleIndex = 3; + this.gridColumn16.Width = 201; + // + // gridColumn17 + // + this.gridColumn17.Caption = "产品名称"; + this.gridColumn17.FieldName = "productname"; + this.gridColumn17.Name = "gridColumn17"; + this.gridColumn17.OptionsColumn.AllowEdit = false; + this.gridColumn17.Visible = true; + this.gridColumn17.VisibleIndex = 4; + this.gridColumn17.Width = 201; + // + // gridColumn18 + // + this.gridColumn18.Caption = "规格型号"; + this.gridColumn18.FieldName = "productspec"; + this.gridColumn18.Name = "gridColumn18"; + this.gridColumn18.OptionsColumn.AllowEdit = false; + this.gridColumn18.Visible = true; + this.gridColumn18.VisibleIndex = 5; + 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 = 6; + 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.NullText = ""; + this.repositoryItemLookUpEditwarehouse.ValueMember = "ID"; + // + // gridColumn20 + // + this.gridColumn20.Caption = "退货数量"; + this.gridColumn20.FieldName = "returnnumber"; + this.gridColumn20.Name = "gridColumn20"; + this.gridColumn20.Visible = true; + this.gridColumn20.VisibleIndex = 7; + this.gridColumn20.Width = 201; + // + // gridColumn21 + // + this.gridColumn21.Caption = "计量单位"; + this.gridColumn21.ColumnEdit = this.repositoryItemLookUpEditunit; + this.gridColumn21.FieldName = "unit"; + this.gridColumn21.Name = "gridColumn21"; + this.gridColumn21.OptionsColumn.AllowEdit = false; + this.gridColumn21.Visible = true; + this.gridColumn21.VisibleIndex = 8; + this.gridColumn21.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"; + // + // gridColumn22 + // + this.gridColumn22.Caption = "备注"; + this.gridColumn22.FieldName = "remark"; + this.gridColumn22.Name = "gridColumn22"; + this.gridColumn22.Visible = true; + this.gridColumn22.VisibleIndex = 9; + this.gridColumn22.Width = 201; + // + // repositoryItemGridLookUpEdit + // + this.repositoryItemGridLookUpEdit.AutoHeight = false; + this.repositoryItemGridLookUpEdit.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemGridLookUpEdit.Name = "repositoryItemGridLookUpEdit"; + this.repositoryItemGridLookUpEdit.PopupView = this.repositoryItemGridLookUpEdit1View; + // + // repositoryItemGridLookUpEdit1View + // + this.repositoryItemGridLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus; + this.repositoryItemGridLookUpEdit1View.Name = "repositoryItemGridLookUpEdit1View"; + this.repositoryItemGridLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = false; + this.repositoryItemGridLookUpEdit1View.OptionsView.ShowGroupPanel = false; + // + // txtid + // + this.txtid.Location = new System.Drawing.Point(63, 12); + this.txtid.Name = "txtid"; + this.txtid.Size = new System.Drawing.Size(580, 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(698, 84); + 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(580, 20); + this.txtreturndate.StyleController = this.layoutControl1; + this.txtreturndate.TabIndex = 2; + // + // txtcustomercode + // + this.txtcustomercode.Location = new System.Drawing.Point(698, 36); + this.txtcustomercode.Name = "txtcustomercode"; + this.txtcustomercode.Size = new System.Drawing.Size(580, 20); + this.txtcustomercode.StyleController = this.layoutControl1; + this.txtcustomercode.TabIndex = 3; + // + // txtcustomerid + // + this.txtcustomerid.EditValue = ""; + this.txtcustomerid.Location = new System.Drawing.Point(63, 36); + this.txtcustomerid.Name = "txtcustomerid"; + this.txtcustomerid.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtcustomerid.Properties.DisplayMember = "Name"; + this.txtcustomerid.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtcustomerid.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtcustomerid.Properties.ValueMember = "ID"; + this.txtcustomerid.Size = new System.Drawing.Size(580, 20); + this.txtcustomerid.StyleController = this.layoutControl1; + this.txtcustomerid.TabIndex = 4; + this.txtcustomerid.EditValueChanged += new System.EventHandler(this.txtcustomerid_EditValueChanged); + // + // txtcustomertype + // + this.txtcustomertype.EditValue = ""; + this.txtcustomertype.Location = new System.Drawing.Point(63, 60); + this.txtcustomertype.Name = "txtcustomertype"; + this.txtcustomertype.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtcustomertype.Properties.DisplayMember = "Name"; + this.txtcustomertype.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtcustomertype.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtcustomertype.Properties.ValueMember = "ID"; + this.txtcustomertype.Size = new System.Drawing.Size(580, 20); + this.txtcustomertype.StyleController = this.layoutControl1; + this.txtcustomertype.TabIndex = 5; + // + // txtcontactuser + // + this.txtcontactuser.EditValue = ""; + this.txtcontactuser.Location = new System.Drawing.Point(698, 60); + this.txtcontactuser.Name = "txtcontactuser"; + this.txtcontactuser.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtcontactuser.Properties.DisplayMember = "Name"; + this.txtcontactuser.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtcontactuser.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtcontactuser.Properties.ValueMember = "ID"; + this.txtcontactuser.Size = new System.Drawing.Size(580, 20); + this.txtcontactuser.StyleController = this.layoutControl1; + this.txtcontactuser.TabIndex = 6; + // + // txtcontactphone + // + this.txtcontactphone.Location = new System.Drawing.Point(63, 84); + this.txtcontactphone.Name = "txtcontactphone"; + this.txtcontactphone.Size = new System.Drawing.Size(580, 20); + this.txtcontactphone.StyleController = this.layoutControl1; + this.txtcontactphone.TabIndex = 7; + // + // txtcreatorId + // + this.txtcreatorId.EditValue = ""; + this.txtcreatorId.Location = new System.Drawing.Point(63, 108); + 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(1215, 20); + this.txtcreatorId.StyleController = this.layoutControl1; + this.txtcreatorId.TabIndex = 8; + // + // txtreturnsalecode + // + this.txtreturnsalecode.Location = new System.Drawing.Point(698, 12); + this.txtreturnsalecode.Name = "txtreturnsalecode"; + this.txtreturnsalecode.Size = new System.Drawing.Size(580, 20); + this.txtreturnsalecode.StyleController = this.layoutControl1; + this.txtreturnsalecode.TabIndex = 9; + // + // txtremark + // + this.txtremark.Location = new System.Drawing.Point(63, 132); + this.txtremark.Name = "txtremark"; + this.txtremark.Size = new System.Drawing.Size(1215, 20); + this.txtremark.StyleController = this.layoutControl1; + this.txtremark.TabIndex = 10; + // + // layoutControlGroup1 + // + this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1"; + this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem8, + this.layoutControlItem10, + this.layoutControlItem4, + this.layoutControlItem9, + this.layoutControlItem3, + this.layoutControlItem5, + this.layoutControlItem6, + this.layoutControlItem7, + this.layoutControlItem2, + this.layoutControlItem11}); + 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(48, 14); + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.txtcreatorId; + 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(48, 14); + // + // layoutControlItem10 + // + this.layoutControlItem10.Control = this.txtremark; + this.layoutControlItem10.CustomizationFormText = "备注"; + this.layoutControlItem10.Location = new System.Drawing.Point(0, 120); + this.layoutControlItem10.Name = "layoutControlItem10"; + this.layoutControlItem10.Size = new System.Drawing.Size(1270, 24); + this.layoutControlItem10.Text = "备注"; + this.layoutControlItem10.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.txtcustomerid; + 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(48, 14); + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.txtreturnsalecode; + this.layoutControlItem9.CustomizationFormText = "退货单号"; + this.layoutControlItem9.Location = new System.Drawing.Point(635, 0); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem9.Text = "退货单号"; + this.layoutControlItem9.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.txtcustomercode; + 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(48, 14); + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.txtcustomertype; + 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(48, 14); + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.txtcontactuser; + this.layoutControlItem6.CustomizationFormText = "联系人"; + this.layoutControlItem6.Location = new System.Drawing.Point(635, 48); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem6.Text = "联系人"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.txtcontactphone; + 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.Text = "联系电话"; + this.layoutControlItem7.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.txtreturndate; + this.layoutControlItem2.CustomizationFormText = "退货日期"; + this.layoutControlItem2.Location = new System.Drawing.Point(635, 72); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem2.Text = "退货日期"; + this.layoutControlItem2.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem11 + // + this.layoutControlItem11.Control = this.gridControl1; + this.layoutControlItem11.Location = new System.Drawing.Point(0, 144); + this.layoutControlItem11.Name = "layoutControlItem11"; + this.layoutControlItem11.Size = new System.Drawing.Size(1270, 569); + this.layoutControlItem11.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem11.TextVisible = false; + // + // Frmreturnsale + // + 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 = "Frmreturnsale"; + this.Text = "销售退货单"; + this.Load += new System.EventHandler(this.Frmreturnsale_Load); + this.Controls.SetChildIndex(this.xtraTabControl1, 0); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcustomerid)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcustomertype)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcontactuser)).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.gridControl1)).EndInit(); + this.contextMenuStrip1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemGridLookUpEditdeliversalecode)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditwarehouse)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditunit)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemGridLookUpEdit)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemGridLookUpEdit1View)).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.txtcustomercode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcustomerid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcustomertype.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcontactuser.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcontactphone.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturnsalecode.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.layoutControlItem8)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).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.XtraEditors.TextEdit txtid; + /////////////////////////////// + private DevExpress.XtraEditors.DateEdit txtreturndate; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtcustomercode; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtcustomerid; + + private DevExpress.XtraEditors.LookUpEdit txtcustomerid; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtcustomertype; + + private DevExpress.XtraEditors.LookUpEdit txtcustomertype; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtcontactuser; + + private DevExpress.XtraEditors.LookUpEdit txtcontactuser; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtcontactphone; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtcreatorId; + + private DevExpress.XtraEditors.LookUpEdit txtcreatorId; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtreturnsalecode; + /////////////////////////////// + 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.XtraGrid.GridControl gridControl1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + 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 LayoutControlItem layoutControlItem11; + private DevExpress.XtraEditors.Repository.RepositoryItemGridLookUpEdit repositoryItemGridLookUpEditdeliversalecode; + private DevExpress.XtraGrid.Views.Grid.GridView gridView2; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemLookUpEditwarehouse; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemLookUpEditunit; + private DevExpress.XtraEditors.Repository.RepositoryItemGridLookUpEdit repositoryItemGridLookUpEdit; + private DevExpress.XtraGrid.Views.Grid.GridView repositoryItemGridLookUpEdit1View; + 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/Frmreturnsale.resx b/WinformGeneralDeveloperFrame/Form/Frmreturnsale.resx new file mode 100644 index 0000000..ad53752 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/Frmreturnsale.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/Frmreturnsaledetail.cs b/WinformGeneralDeveloperFrame/Form/Frmreturnsaledetail.cs new file mode 100644 index 0000000..60200b6 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/Frmreturnsaledetail.cs @@ -0,0 +1,211 @@ +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 Frmreturnsaledetail : FrmBaseForm + { + private Dictionary fieldDictionary = new Dictionary(); + public Frmreturnsaledetail() + { + InitializeComponent(); + } + private void Frmreturnsaledetail_Load(object sender, EventArgs e) + { + + InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new returnsaledetailInfo()); + InitSearchDicData(); + } + /// + /// 数据源初始化 + /// + /// + private void Init() + { + + + + + txtwarehouse.Properties.DataSource = GetDataTableUtils.SqlTable("仓库"); + repositoryItemtxtwarehouse.DataSource= GetDataTableUtils.SqlTable("仓库"); + txtunit.Properties.DataSource = GetDataTableUtils.SqlTable("计量单位"); + repositoryItemtxtunit.DataSource= GetDataTableUtils.SqlTable("计量单位"); + + + } + /// + /// 搜索字段 + /// + /// + private void InitSearchDicData() + { + fieldDictionary.Add("id","id"); + fieldDictionary.Add("退货单主表","returnsaleid"); + fieldDictionary.Add("退货单号","returnsalecode"); + fieldDictionary.Add("出货单号","deliversalecode"); + fieldDictionary.Add("销售单号","salecode"); + fieldDictionary.Add("产品编号","productcode"); + fieldDictionary.Add("产品名称","productname"); + fieldDictionary.Add("规格型号","productspec"); + fieldDictionary.Add("仓库","warehouse"); + fieldDictionary.Add("退货数量","returnnumber"); + fieldDictionary.Add("计量单位","unit"); + fieldDictionary.Add("备注","remark"); + } + + public override void InitgrdListDataSource() + { + using (var con=new MESDB())/// + { + grdList.DataSource=con.returnsaledetailInfo.ToList(); + } + Init(); + } + /// + /// 字段为空校验 + /// + /// + public override bool CheckInput() + { + if(string.IsNullOrEmpty(txtreturnsaleid.EditValue.ToString())) + { + "退货单主表不能为空".ShowWarning(); + txtreturnsaleid.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtreturnsalecode.EditValue.ToString())) + { + "退货单号不能为空".ShowWarning(); + txtreturnsalecode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtdeliversalecode.EditValue.ToString())) + { + "出货单号不能为空".ShowWarning(); + txtdeliversalecode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtsalecode.EditValue.ToString())) + { + "销售单号不能为空".ShowWarning(); + txtsalecode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtproductcode.EditValue.ToString())) + { + "产品编号不能为空".ShowWarning(); + txtproductcode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtproductname.EditValue.ToString())) + { + "产品名称不能为空".ShowWarning(); + txtproductname.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtproductspec.EditValue.ToString())) + { + "规格型号不能为空".ShowWarning(); + txtproductspec.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtwarehouse.EditValue.ToString())) + { + "仓库不能为空".ShowWarning(); + txtwarehouse.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; + } + return true; + } + /// + /// 保存 + /// + /// + public override bool SaveFunction() + { + try + { + returnsaledetailInfo info= (returnsaledetailInfo)this.ControlDataToModel(new returnsaledetailInfo()); + using (var db = new MESDB()) + { + db.returnsaledetailInfo.AddOrUpdate(info); + db.SaveChanges(); + } + } + catch (Exception ex) + { + ex.Message.ShowError(); + return false; + } + return true; + } + /// + /// 删除 + /// + /// + public override bool DelFunction() + { + try + { + returnsaledetailInfo info = (returnsaledetailInfo)this.ControlDataToModel(new returnsaledetailInfo()); + 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.returnsaledetailInfo.SqlQuery("select * from returnsaledetail").ToList(); + } + else + { + grdList.DataSource = db.returnsaledetailInfo.SqlQuery($"select * from returnsaledetail where {sql}").ToList(); + } + } + } + } + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/Frmreturnsaledetail.designer.cs b/WinformGeneralDeveloperFrame/Form/Frmreturnsaledetail.designer.cs new file mode 100644 index 0000000..b1620b2 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/Frmreturnsaledetail.designer.cs @@ -0,0 +1,696 @@ + +using DevExpress.XtraEditors; +using DevExpress.XtraLayout; +using DevExpress.XtraTab; + +namespace MES.Form +{ + partial class Frmreturnsaledetail + { + /// + /// 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.repositoryItemtxtwarehouse = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn10 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn11 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemtxtunit = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn12 = 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.txtreturnsaleid = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtreturnsalecode = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtdeliversalecode = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtsalecode = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtproductcode = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtproductname = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtproductspec = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtwarehouse = new DevExpress.XtraEditors.LookUpEdit(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtreturnnumber = new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtunit = new DevExpress.XtraEditors.LookUpEdit(); + this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtremark = new DevExpress.XtraEditors.TextEdit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtwarehouse)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtunit)).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.txtreturnsaleid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturnsalecode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtdeliversalecode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtsalecode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductname.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductspec.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturnnumber.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).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 = "returnsaleid"; + this.gridColumn2.Name = "gridColumn2"; + // + // gridColumn3 + // + this.gridColumn3.Caption = "退货单号"; + this.gridColumn3.FieldName = "returnsalecode"; + this.gridColumn3.Name = "gridColumn3"; + this.gridColumn3.Visible = true; + this.gridColumn3.VisibleIndex = 0; + this.gridColumn3.Width = 201; + // + // gridColumn4 + // + this.gridColumn4.Caption = "出货单号"; + this.gridColumn4.FieldName = "deliversalecode"; + this.gridColumn4.Name = "gridColumn4"; + this.gridColumn4.Visible = true; + this.gridColumn4.VisibleIndex = 1; + this.gridColumn4.Width = 201; + // + // gridColumn5 + // + this.gridColumn5.Caption = "销售单号"; + this.gridColumn5.FieldName = "salecode"; + this.gridColumn5.Name = "gridColumn5"; + this.gridColumn5.Visible = true; + this.gridColumn5.VisibleIndex = 2; + this.gridColumn5.Width = 201; + // + // gridColumn6 + // + this.gridColumn6.Caption = "产品编号"; + this.gridColumn6.FieldName = "productcode"; + this.gridColumn6.Name = "gridColumn6"; + this.gridColumn6.Visible = true; + this.gridColumn6.VisibleIndex = 3; + this.gridColumn6.Width = 201; + // + // gridColumn7 + // + this.gridColumn7.Caption = "产品名称"; + this.gridColumn7.FieldName = "productname"; + this.gridColumn7.Name = "gridColumn7"; + this.gridColumn7.Visible = true; + this.gridColumn7.VisibleIndex = 4; + this.gridColumn7.Width = 201; + // + // gridColumn8 + // + this.gridColumn8.Caption = "规格型号"; + this.gridColumn8.FieldName = "productspec"; + this.gridColumn8.Name = "gridColumn8"; + this.gridColumn8.Visible = true; + this.gridColumn8.VisibleIndex = 5; + this.gridColumn8.Width = 201; + // + // gridColumn9 + // + this.gridColumn9.Caption = "仓库"; + this.gridColumn9.ColumnEdit = this.repositoryItemtxtwarehouse; + this.gridColumn9.FieldName = "warehouse"; + this.gridColumn9.Name = "gridColumn9"; + this.gridColumn9.Visible = true; + this.gridColumn9.VisibleIndex = 6; + this.gridColumn9.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"; + // + // gridColumn10 + // + this.gridColumn10.Caption = "退货数量"; + this.gridColumn10.FieldName = "returnnumber"; + this.gridColumn10.Name = "gridColumn10"; + this.gridColumn10.Visible = true; + this.gridColumn10.VisibleIndex = 7; + this.gridColumn10.Width = 201; + // + // gridColumn11 + // + this.gridColumn11.Caption = "计量单位"; + this.gridColumn11.ColumnEdit = this.repositoryItemtxtunit; + this.gridColumn11.FieldName = "unit"; + this.gridColumn11.Name = "gridColumn11"; + this.gridColumn11.Visible = true; + this.gridColumn11.VisibleIndex = 8; + this.gridColumn11.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"; + // + // gridColumn12 + // + this.gridColumn12.Caption = "备注"; + this.gridColumn12.FieldName = "remark"; + this.gridColumn12.Name = "gridColumn12"; + this.gridColumn12.Visible = true; + this.gridColumn12.VisibleIndex = 9; + this.gridColumn12.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.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.txtreturnsaleid); + this.layoutControl1.Controls.Add(this.txtreturnsalecode); + this.layoutControl1.Controls.Add(this.txtdeliversalecode); + this.layoutControl1.Controls.Add(this.txtsalecode); + this.layoutControl1.Controls.Add(this.txtproductcode); + this.layoutControl1.Controls.Add(this.txtproductname); + this.layoutControl1.Controls.Add(this.txtproductspec); + this.layoutControl1.Controls.Add(this.txtwarehouse); + this.layoutControl1.Controls.Add(this.txtreturnnumber); + this.layoutControl1.Controls.Add(this.txtunit); + 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.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(60, 14); + // + // txtid + // + this.txtid.Location = new System.Drawing.Point(75, 12); + this.txtid.Name = "txtid"; + this.txtid.Size = new System.Drawing.Size(1203, 20); + this.txtid.StyleController = this.layoutControl1; + this.txtid.TabIndex = 1; + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.txtreturnsaleid; + 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(60, 14); + // + // txtreturnsaleid + // + this.txtreturnsaleid.Location = new System.Drawing.Point(75, 36); + this.txtreturnsaleid.Name = "txtreturnsaleid"; + this.txtreturnsaleid.Size = new System.Drawing.Size(1203, 20); + this.txtreturnsaleid.StyleController = this.layoutControl1; + this.txtreturnsaleid.TabIndex = 2; + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.txtreturnsalecode; + 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(60, 14); + // + // txtreturnsalecode + // + this.txtreturnsalecode.Location = new System.Drawing.Point(75, 60); + this.txtreturnsalecode.Name = "txtreturnsalecode"; + this.txtreturnsalecode.Size = new System.Drawing.Size(1203, 20); + this.txtreturnsalecode.StyleController = this.layoutControl1; + this.txtreturnsalecode.TabIndex = 3; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.txtdeliversalecode; + 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(60, 14); + // + // txtdeliversalecode + // + this.txtdeliversalecode.Location = new System.Drawing.Point(75, 84); + this.txtdeliversalecode.Name = "txtdeliversalecode"; + this.txtdeliversalecode.Size = new System.Drawing.Size(1203, 20); + this.txtdeliversalecode.StyleController = this.layoutControl1; + this.txtdeliversalecode.TabIndex = 4; + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.txtsalecode; + 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(60, 14); + // + // txtsalecode + // + this.txtsalecode.Location = new System.Drawing.Point(75, 108); + this.txtsalecode.Name = "txtsalecode"; + this.txtsalecode.Size = new System.Drawing.Size(1203, 20); + this.txtsalecode.StyleController = this.layoutControl1; + this.txtsalecode.TabIndex = 5; + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.txtproductcode; + 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(60, 14); + // + // txtproductcode + // + this.txtproductcode.Location = new System.Drawing.Point(75, 132); + this.txtproductcode.Name = "txtproductcode"; + this.txtproductcode.Size = new System.Drawing.Size(1203, 20); + this.txtproductcode.StyleController = this.layoutControl1; + this.txtproductcode.TabIndex = 6; + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.txtproductname; + 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(60, 14); + // + // txtproductname + // + this.txtproductname.Location = new System.Drawing.Point(75, 156); + this.txtproductname.Name = "txtproductname"; + this.txtproductname.Size = new System.Drawing.Size(1203, 20); + this.txtproductname.StyleController = this.layoutControl1; + this.txtproductname.TabIndex = 7; + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.txtproductspec; + 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(60, 14); + // + // txtproductspec + // + this.txtproductspec.Location = new System.Drawing.Point(75, 180); + this.txtproductspec.Name = "txtproductspec"; + this.txtproductspec.Size = new System.Drawing.Size(1203, 20); + this.txtproductspec.StyleController = this.layoutControl1; + this.txtproductspec.TabIndex = 8; + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.txtwarehouse; + 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(60, 14); + // + // txtwarehouse + // + this.txtwarehouse.EditValue = ""; + this.txtwarehouse.Location = new System.Drawing.Point(75, 204); + 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(1203, 20); + this.txtwarehouse.StyleController = this.layoutControl1; + this.txtwarehouse.TabIndex = 9; + // + // layoutControlItem10 + // + this.layoutControlItem10.Control = this.txtreturnnumber; + 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(60, 14); + // + // txtreturnnumber + // + this.txtreturnnumber.Location = new System.Drawing.Point(75, 228); + this.txtreturnnumber.Name = "txtreturnnumber"; + this.txtreturnnumber.Size = new System.Drawing.Size(1203, 20); + this.txtreturnnumber.StyleController = this.layoutControl1; + this.txtreturnnumber.TabIndex = 10; + // + // layoutControlItem11 + // + this.layoutControlItem11.Control = this.txtunit; + 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(60, 14); + // + // txtunit + // + this.txtunit.EditValue = ""; + this.txtunit.Location = new System.Drawing.Point(75, 252); + 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(1203, 20); + this.txtunit.StyleController = this.layoutControl1; + this.txtunit.TabIndex = 11; + // + // layoutControlItem12 + // + this.layoutControlItem12.Control = this.txtremark; + this.layoutControlItem12.CustomizationFormText = "备注"; + this.layoutControlItem12.Location = new System.Drawing.Point(0, 264); + this.layoutControlItem12.Name = "layoutControlItem12"; + this.layoutControlItem12.Size = new System.Drawing.Size(1270, 449); + this.layoutControlItem12.Text = "备注"; + this.layoutControlItem12.TextSize = new System.Drawing.Size(60, 14); + // + // txtremark + // + this.txtremark.Location = new System.Drawing.Point(75, 276); + this.txtremark.Name = "txtremark"; + this.txtremark.Size = new System.Drawing.Size(1203, 20); + this.txtremark.StyleController = this.layoutControl1; + this.txtremark.TabIndex = 12; + // + // Frmreturnsaledetail + // + 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 = "Frmreturnsaledetail"; + this.Text = "Frmreturnsaledetail"; + this.Load += new System.EventHandler(this.Frmreturnsaledetail_Load); + this.Controls.SetChildIndex(this.xtraTabControl1, 0); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtwarehouse)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtunit)).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.txtreturnsaleid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturnsalecode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtdeliversalecode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtsalecode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductname.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtproductspec.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturnnumber.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).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.XtraEditors.TextEdit txtid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtreturnsaleid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtreturnsalecode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtdeliversalecode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtsalecode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtproductcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtproductname; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtproductspec; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtwarehouse; + + private DevExpress.XtraEditors.LookUpEdit txtwarehouse; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtreturnnumber; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtunit; + + private DevExpress.XtraEditors.LookUpEdit txtunit; + /////////////////////////////// + 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; + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/Frmreturnsaledetail.resx b/WinformGeneralDeveloperFrame/Form/Frmreturnsaledetail.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/Frmreturnsaledetail.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/Frmsale.cs b/WinformGeneralDeveloperFrame/Form/Frmsale.cs index 68b8eb7..9b28d83 100644 --- a/WinformGeneralDeveloperFrame/Form/Frmsale.cs +++ b/WinformGeneralDeveloperFrame/Form/Frmsale.cs @@ -300,7 +300,7 @@ namespace MES.Form .FirstOrDefault(); repositoryItemGridLookUpEdit1.DataSource = - db.quotationdetailInfo.Where(p => p.quotationid == quotation.id).ToList(); + db.quotationdetailInfo.ToList().Where(p => p.quotationid == quotation.id); } } } @@ -347,8 +347,7 @@ namespace MES.Form if (txtcustomerid.EditValue != null) { int id = txtcustomerid.EditValue.ToString().ToInt16(); - customerInfo customer = db.customerInfo.Where(p => p.id == id) - .First(); + customerInfo customer = db.customerInfo.Find(id); if (customer != null) { txtcustomercode.Text = customer.customercode; @@ -377,7 +376,7 @@ namespace MES.Form using (var db = new MESDB()) { GridLookUpEdit look = sender as GridLookUpEdit; - quotationdetailInfo quotationdetail = look.Properties.View.GetFocusedRow() as quotationdetailInfo; + quotationdetailInfo quotationdetail = look.Properties.View.GetFocusedDataRow().RowToModel(); gridView1.GetFocusedDataRow()["productspec"] = quotationdetail.spec; gridView1.GetFocusedDataRow()["unit"] = quotationdetail.unit; gridView1.GetFocusedDataRow()["warehouse"] = quotationdetail.stockid; diff --git a/WinformGeneralDeveloperFrame/Form/FrmsysMenu.cs b/WinformGeneralDeveloperFrame/Form/FrmsysMenu.cs index 57ec120..99e6d82 100644 --- a/WinformGeneralDeveloperFrame/Form/FrmsysMenu.cs +++ b/WinformGeneralDeveloperFrame/Form/FrmsysMenu.cs @@ -38,7 +38,6 @@ namespace MES.Form } Init(); } - private void Init() { txtpid.Properties.DataSource = GetDataTableUtils.SqlTable("菜单tree"); diff --git a/WinformGeneralDeveloperFrame/FrmBaseForm.cs b/WinformGeneralDeveloperFrame/FrmBaseForm.cs index fd73db9..34d2d91 100644 --- a/WinformGeneralDeveloperFrame/FrmBaseForm.cs +++ b/WinformGeneralDeveloperFrame/FrmBaseForm.cs @@ -14,6 +14,7 @@ using DevExpress.XtraGrid; using DevExpress.XtraGrid.Views.Grid; using DevExpress.XtraLayout; using DevExpress.XtraTab; +using DevExpress.XtraTreeList; using MES.Entity; using WinformGeneralDeveloperFrame.Commons; using MES; @@ -26,6 +27,7 @@ namespace WinformGeneralDeveloperFrame private XtraTabControl xtraTab; private GridControl gridControl; private GridControl gridControlDetail; + private TreeList treeList; private GridView gridView; private GridView gridViewDetail; private LayoutControlGroup[] controlGroups; @@ -57,6 +59,17 @@ namespace WinformGeneralDeveloperFrame InitToolBtntatus(EFormStatus.eInit); InitEvent(); } + public void InitFrom(XtraTabControl xtraTab, GridControl gridControl, GridView gridView, LayoutControlGroup[] controlGroups, object DataType, TreeList treeList, string[] readcontrols) + { + if (treeList != null) + { + this.treeList = treeList; + treeList.ContextMenuStrip.Enabled = false; + treeList.OptionsBehavior.Editable = false; + } + readonlycon = readcontrols; + InitFrom(xtraTab, gridControl, gridView, controlGroups, DataType); + } public void InitFrom(XtraTabControl xtraTab, GridControl gridControl, GridView gridView, LayoutControlGroup[] controlGroups, object DataType,GridControl griddetail,string[] readcontrols) { @@ -69,7 +82,6 @@ namespace WinformGeneralDeveloperFrame } readonlycon = readcontrols; InitFrom(xtraTab, gridControl, gridView, controlGroups, DataType); - } public void InitEvent() { @@ -96,6 +108,15 @@ namespace WinformGeneralDeveloperFrame SetControlStatus(controlGroups, true); InitToolBtntatus(EFormStatus.eView); } + + if (gridViewDetail != null) + { + gridViewDetail.BestFitColumns(); + } + if (treeList != null) + { + treeList.BestFitColumns(); + } } public virtual void gridControlMouseDoubleClickFunction(object sender, EventArgs e) { @@ -302,6 +323,11 @@ namespace WinformGeneralDeveloperFrame gridControlDetail.ContextMenuStrip.Enabled = false; gridViewDetail.OptionsBehavior.Editable = false; } + if (treeList != null) + { + treeList.ContextMenuStrip.Enabled = false; + treeList.OptionsBehavior.Editable = false; + } }; break; case EFormStatus.eView: { @@ -310,7 +336,7 @@ namespace WinformGeneralDeveloperFrame if (button.GetType().Name == "SimpleButton") { var btn = (SimpleButton)button; - if (btn.Name == "btnAdd" || btn.Name == "btnDel" || btn.Name == "btnEdit") + if (btn.Name == "btnAdd" || btn.Name == "btnDel" || btn.Name == "btnEdit" || btn.Name == "btnSearch") { btn.Enabled = true; } @@ -326,6 +352,11 @@ namespace WinformGeneralDeveloperFrame gridControlDetail.ContextMenuStrip.Enabled = false; gridViewDetail.OptionsBehavior.Editable = false; } + if (treeList != null) + { + treeList.ContextMenuStrip.Enabled = false; + treeList.OptionsBehavior.Editable = false; + } }; break; case EFormStatus.eViewTab: { @@ -350,6 +381,11 @@ namespace WinformGeneralDeveloperFrame gridControlDetail.ContextMenuStrip.Enabled = false; gridViewDetail.OptionsBehavior.Editable = false; } + if (treeList != null) + { + treeList.ContextMenuStrip.Enabled = false; + treeList.OptionsBehavior.Editable = false; + } }; break; case EFormStatus.eAdd: { @@ -374,6 +410,11 @@ namespace WinformGeneralDeveloperFrame gridControlDetail.ContextMenuStrip.Enabled = true; gridViewDetail.OptionsBehavior.Editable = true; } + if (treeList != null) + { + treeList.ContextMenuStrip.Enabled = true; + treeList.OptionsBehavior.Editable = true; + } }; break; case EFormStatus.eDelete: { @@ -398,6 +439,11 @@ namespace WinformGeneralDeveloperFrame gridControlDetail.ContextMenuStrip.Enabled = false; gridViewDetail.OptionsBehavior.Editable = false; } + if (treeList != null) + { + treeList.ContextMenuStrip.Enabled = false; + treeList.OptionsBehavior.Editable = false; + } }; break; case EFormStatus.eEdit: { @@ -422,6 +468,11 @@ namespace WinformGeneralDeveloperFrame gridControlDetail.ContextMenuStrip.Enabled = true; gridViewDetail.OptionsBehavior.Editable = true; } + if (treeList != null) + { + treeList.ContextMenuStrip.Enabled = true; + treeList.OptionsBehavior.Editable = true; + } }; break; case EFormStatus.eCanel: { @@ -446,6 +497,11 @@ namespace WinformGeneralDeveloperFrame gridControlDetail.ContextMenuStrip.Enabled = false; gridViewDetail.OptionsBehavior.Editable = false; } + if (treeList != null) + { + treeList.ContextMenuStrip.Enabled = false; + treeList.OptionsBehavior.Editable = false; + } }; break; } } diff --git a/WinformGeneralDeveloperFrame/Template/Entity/Entity.vm b/WinformGeneralDeveloperFrame/Template/Entity/Entity.vm index 0dfb430..83d6262 100644 --- a/WinformGeneralDeveloperFrame/Template/Entity/Entity.vm +++ b/WinformGeneralDeveloperFrame/Template/Entity/Entity.vm @@ -22,7 +22,7 @@ namespace ${NameSpace}.Entity #end [ModelBindControl("${info.controlName}")] #if(${info.CSharpFieldType}=="DateTime") - public ${info.CSharpFieldType}? ${info.CSharpFieldName}{set;get;}=DateTime.Now; + public ${info.CSharpFieldType} ${info.CSharpFieldName}{set;get;}=DateTime.Now; #else public ${info.CSharpFieldType} ${info.CSharpFieldName}{set;get;} #end diff --git a/WinformGeneralDeveloperFrame/Template/Winform/Form.vm b/WinformGeneralDeveloperFrame/Template/Winform/Form.vm index 81ae783..1930883 100644 --- a/WinformGeneralDeveloperFrame/Template/Winform/Form.vm +++ b/WinformGeneralDeveloperFrame/Template/Winform/Form.vm @@ -23,7 +23,6 @@ namespace ${NameSpace}.Form } private void Frm${tableName}_Load(object sender, EventArgs e) { - InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new ${tableName}Info()); InitSearchDicData(); } @@ -33,10 +32,6 @@ namespace ${NameSpace}.Form /// private void Init() { - - - - #foreach($info in $EntityList) #if(${info.controlType}=="LookUpEdit"||${info.controlType}=="TreeListLookUpEdit"||${info.controlType}=="CheckedComboBoxEdit"||${info.controlType}=="ComboBoxEdit") #if(${info.controlType}=="LookUpEdit") @@ -64,8 +59,6 @@ namespace ${NameSpace}.Form #end #end #end - - } /// /// 搜索字段 diff --git a/WinformGeneralDeveloperFrame/WinformGeneralDeveloperFrame.csproj b/WinformGeneralDeveloperFrame/WinformGeneralDeveloperFrame.csproj index 0126a05..97f36cb 100644 --- a/WinformGeneralDeveloperFrame/WinformGeneralDeveloperFrame.csproj +++ b/WinformGeneralDeveloperFrame/WinformGeneralDeveloperFrame.csproj @@ -142,9 +142,13 @@ + + + + @@ -187,12 +191,36 @@ Frmproduct.cs + + Form + + + FrmproductBOM.cs + + + Form + + + FrmproductBOMdetail.cs + Form Frmquotation.cs + + Form + + + Frmreturnsale.cs + + + Form + + + Frmreturnsaledetail.cs + Form @@ -379,9 +407,21 @@ Frmproduct.cs + + FrmproductBOM.cs + + + FrmproductBOMdetail.cs + Frmquotation.cs + + Frmreturnsale.cs + + + Frmreturnsaledetail.cs + Frmsale.cs