diff --git a/.vs/WinformGeneralDeveloperFrame/v16/.suo b/.vs/WinformGeneralDeveloperFrame/v16/.suo index 8926511..194393b 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 4b224ee..27e4a03 100644 --- a/WinformGeneralDeveloperFrame/DB/MESDB.cs +++ b/WinformGeneralDeveloperFrame/DB/MESDB.cs @@ -77,5 +77,22 @@ namespace MES public virtual DbSet productionRequisitionDetailInfo { set; get; } + public virtual DbSet productionMaterialReturnInfo { get; set; } + + public virtual DbSet productionMaterialReturnDetailInfo { set; get; } + + public virtual DbSet buyerInWarehouseInfo { get; set; } + + public virtual DbSet buyerInWarehouseDetailInfo { set; get; } + + + public virtual DbSet buyerOutWarehouseDetailInfo { get; set; } + + public virtual DbSet buyerOutWarehouseInfo { set; get; } + + public virtual DbSet productMaterialOutWarehouseDetailInfo { get; set; } + + public virtual DbSet productMaterialOutWarehouseInfo { set; get; } + } } \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/buyerInWarehouseDetailInfo.cs b/WinformGeneralDeveloperFrame/Entity/buyerInWarehouseDetailInfo.cs new file mode 100644 index 0000000..722c28a --- /dev/null +++ b/WinformGeneralDeveloperFrame/Entity/buyerInWarehouseDetailInfo.cs @@ -0,0 +1,55 @@ +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("buyerInWarehouseDetail")] + public partial class buyerInWarehouseDetailInfo + { + ///id + [ModelBindControl("txtid")] + public int id{set;get;} + ///主表id + [ModelBindControl("txtmasterid")] + public int masterid{set;get;} + ///采购入库单号 + [ModelBindControl("txtmastercode")] + public string mastercode{set;get;} + ///采购入库明细单号 + [ModelBindControl("txtdetailcode")] + public string detailcode{set;get;} + ///采购明细单号 + [ModelBindControl("txtbuyerdetailcode")] + public string buyerdetailcode{set;get;} + ///采购单号 + [ModelBindControl("txtbuyercode")] + public string buyercode{set;get;} + ///物料 + [ModelBindControl("txtmaterialid")] + public int materialid{set;get;} + ///物料编号 + [ModelBindControl("txtmaterialcode")] + public string materialcode{set;get;} + ///规格型号 + [ModelBindControl("txtmaterialspec")] + public string materialspec{set;get;} + ///入库数量 + [ModelBindControl("txtnumber")] + public decimal number{set;get;} + ///计量单位 + [ModelBindControl("txtunit")] + public int unit{set;get;} + ///仓库 + [ModelBindControl("txtwarehouse")] + public int warehouse{set;get;} + ///remark + [ModelBindControl("txtremark")] + public string remark{set;get;} + + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/buyerInWarehouseInfo.cs b/WinformGeneralDeveloperFrame/Entity/buyerInWarehouseInfo.cs new file mode 100644 index 0000000..33f1392 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Entity/buyerInWarehouseInfo.cs @@ -0,0 +1,37 @@ +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("buyerInWarehouse")] + public partial class buyerInWarehouseInfo + { + ///id + [ModelBindControl("txtid")] + public int id{set;get;} + ///入库单号 + [ModelBindControl("txtcode")] + public string code{set;get;} + ///制单人 + [ModelBindControl("txtcreatorId")] + public int creatorId{set;get;} + ///供应商 + [ModelBindControl("txtsupplierid")] + public int supplierid{set;get;} + ///供应商编码 + [ModelBindControl("txtsuppliercode")] + public string suppliercode{set;get;} + ///入库日期 + [ModelBindControl("txtintime")] + public DateTime intime{set;get;}=DateTime.Now; + ///备注 + [ModelBindControl("txtremark")] + public string remark{set;get;} + + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/buyerOutWarehouseDetailInfo.cs b/WinformGeneralDeveloperFrame/Entity/buyerOutWarehouseDetailInfo.cs new file mode 100644 index 0000000..edc9b1b --- /dev/null +++ b/WinformGeneralDeveloperFrame/Entity/buyerOutWarehouseDetailInfo.cs @@ -0,0 +1,61 @@ +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("buyerOutWarehouseDetail")] + public partial class buyerOutWarehouseDetailInfo + { + ///id + [ModelBindControl("txtid")] + public int id{set;get;} + ///主表id + [ModelBindControl("txtmasterid")] + public int masterid{set;get;} + ///采购出库单号 + [ModelBindControl("txtmastercode")] + public string mastercode{set;get;} + ///采购出库明细单号 + [ModelBindControl("txtdetailcode")] + public string detailcode{set;get;} + ///采购退货单号 + [ModelBindControl("txtbuyerreturncode")] + public string buyerreturncode{set;get;} + ///采购退货明细单号 + [ModelBindControl("txtbuyerreturndetailcode")] + public string buyerreturndetailcode{set;get;} + ///采购单号 + [ModelBindControl("txtbuyercode")] + public string buyercode{set;get;} + ///采购明细单号 + [ModelBindControl("txtbuyerdetailcode")] + public string buyerdetailcode{set;get;} + ///物料 + [ModelBindControl("txtmaterialid")] + public int materialid{set;get;} + ///物料编码 + [ModelBindControl("txtmaterialcode")] + public string materialcode{set;get;} + ///规格型号 + [ModelBindControl("txtmaterialspec")] + public string materialspec{set;get;} + ///出库数量 + [ModelBindControl("txtnumber")] + public decimal number{set;get;} + ///计量单位 + [ModelBindControl("txtunit")] + public int unit{set;get;} + ///仓库 + [ModelBindControl("txtwarehouse")] + public int warehouse{set;get;} + ///备注 + [ModelBindControl("txtremark")] + public string remark{set;get;} + + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/buyerOutWarehouseInfo.cs b/WinformGeneralDeveloperFrame/Entity/buyerOutWarehouseInfo.cs new file mode 100644 index 0000000..c53c0d4 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Entity/buyerOutWarehouseInfo.cs @@ -0,0 +1,37 @@ +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("buyerOutWarehouse")] + public partial class buyerOutWarehouseInfo + { + ///id + [ModelBindControl("txtid")] + public int id{set;get;} + ///采购退货出库单号 + [ModelBindControl("txtcode")] + public string code{set;get;} + ///出库日期 + [ModelBindControl("txtouttime")] + public DateTime outtime{set;get;}=DateTime.Now; + ///供应商 + [ModelBindControl("txtsupplierid")] + public int supplierid{set;get;} + ///供应商编码 + [ModelBindControl("txtsuppliercode")] + public string suppliercode{set;get;} + ///制单人 + [ModelBindControl("txtcreatorId")] + public int creatorId{set;get;} + ///备注 + [ModelBindControl("txtremark")] + public string remark{set;get;} + + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/productMaterialOutWarehouseDetailInfo.cs b/WinformGeneralDeveloperFrame/Entity/productMaterialOutWarehouseDetailInfo.cs new file mode 100644 index 0000000..c9464de --- /dev/null +++ b/WinformGeneralDeveloperFrame/Entity/productMaterialOutWarehouseDetailInfo.cs @@ -0,0 +1,61 @@ +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("productMaterialOutWarehouseDetail")] + public partial class productMaterialOutWarehouseDetailInfo + { + ///id + [ModelBindControl("txtid")] + public int id{set;get;} + ///主表id + [ModelBindControl("txtmasterid")] + public int masterid{set;get;} + ///生产领料出库单号 + [ModelBindControl("txtmastercode")] + public string mastercode{set;get;} + ///生产领料出库明细单号 + [ModelBindControl("txtdetailcode")] + public string detailcode{set;get;} + ///生产领料单号 + [ModelBindControl("txtpickcode")] + public string pickcode{set;get;} + ///生产领料明细单号 + [ModelBindControl("txtpickdetailcode")] + public string pickdetailcode{set;get;} + ///工单号 + [ModelBindControl("txtwocode")] + public string wocode{set;get;} + ///物料 + [ModelBindControl("txtmaterialid")] + public int materialid{set;get;} + ///物料编码 + [ModelBindControl("txtmaterialcode")] + public string materialcode{set;get;} + ///规格型号 + [ModelBindControl("txtmaterialspec")] + public string materialspec{set;get;} + ///物料类型 + [ModelBindControl("txtmaterialtype")] + public int materialtype{set;get;} + ///出库数量 + [ModelBindControl("txtnumber")] + public decimal number{set;get;} + ///计量单位 + [ModelBindControl("txtunit")] + public int unit{set;get;} + ///仓库 + [ModelBindControl("txtwarehouse")] + public int warehouse{set;get;} + ///备注 + [ModelBindControl("txtremark")] + public string remark{set;get;} + + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/productMaterialOutWarehouseInfo.cs b/WinformGeneralDeveloperFrame/Entity/productMaterialOutWarehouseInfo.cs new file mode 100644 index 0000000..e91104a --- /dev/null +++ b/WinformGeneralDeveloperFrame/Entity/productMaterialOutWarehouseInfo.cs @@ -0,0 +1,34 @@ +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("productMaterialOutWarehouse")] + public partial class productMaterialOutWarehouseInfo + { + ///id + [ModelBindControl("txtid")] + public int id{set;get;} + ///生产领料出库单号 + [ModelBindControl("txtcode")] + public string code{set;get;} + ///领料单位 + [ModelBindControl("txtdept")] + public int dept{set;get;} + ///出库日期 + [ModelBindControl("txtouttime")] + public DateTime outtime{set;get;}=DateTime.Now; + ///制单人 + [ModelBindControl("txtcreatorId")] + public int creatorId{set;get;} + ///备注 + [ModelBindControl("txtremark")] + public string remark{set;get;} + + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/productionMaterialReturnDetailInfo.cs b/WinformGeneralDeveloperFrame/Entity/productionMaterialReturnDetailInfo.cs new file mode 100644 index 0000000..9c7d091 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Entity/productionMaterialReturnDetailInfo.cs @@ -0,0 +1,62 @@ +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("productionMaterialReturnDetail")] + public partial class productionMaterialReturnDetailInfo + { + ///id + [ModelBindControl("txtid")] + public int id{set;get;} + ///主表id + [ModelBindControl("txtmasterid")] + public int masterid{set;get;} + ///退料单号 + [ModelBindControl("txtmastercode")] + public string mastercode{set;get;} + ///退料明细单号 + [ModelBindControl("txtdetailcode")] + public string detailcode{set;get;} + ///领料单号 + [ModelBindControl("txtpickcode")] + public string pickcode{set;get;} + + ///领料明细单号 + [ModelBindControl("txtpickdetailcode")] + public string pickdetailcode { set; get; } + ///工单号 + [ModelBindControl("txtwocode")] + public string wocode{set;get;} + ///物料 + [ModelBindControl("txtmaterialid")] + public int materialid{set;get;} + ///物料编码 + [ModelBindControl("txtmaterialcode")] + public string materialcode{set;get;} + ///规格型号 + [ModelBindControl("txtmaterialspec")] + public string materialspec{set;get;} + ///退料原因 + [ModelBindControl("txtreason")] + public string reason{set;get;} + ///退料数量 + [ModelBindControl("txtnumber")] + public decimal number{set;get;} + ///计量单位 + [ModelBindControl("txtunit")] + public int unit{set;get;} + ///仓库 + [ModelBindControl("txtwarehouse")] + public int warehouse{set;get;} + ///备注 + [ModelBindControl("txtremark")] + public string remark{set;get;} + + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Entity/productionMaterialReturnInfo.cs b/WinformGeneralDeveloperFrame/Entity/productionMaterialReturnInfo.cs new file mode 100644 index 0000000..c7aba94 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Entity/productionMaterialReturnInfo.cs @@ -0,0 +1,34 @@ +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("productionMaterialReturn")] + public partial class productionMaterialReturnInfo + { + ///id + [ModelBindControl("txtid")] + public int id{set;get;} + ///退料单号 + [ModelBindControl("txtcode")] + public string code{set;get;} + ///退料日期 + [ModelBindControl("txtreturntime")] + public DateTime returntime{set;get;}=DateTime.Now; + ///退料单位 + [ModelBindControl("txtreturndept")] + public int returndept{set;get;} + ///制单人 + [ModelBindControl("txtcreatorId")] + public int creatorId{set;get;} + ///制单日期 + [ModelBindControl("txtcreateTime")] + public DateTime createTime{set;get;}=DateTime.Now; + + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmbuyerInWarehouse.cs b/WinformGeneralDeveloperFrame/Form/FrmbuyerInWarehouse.cs new file mode 100644 index 0000000..6cb5bb1 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmbuyerInWarehouse.cs @@ -0,0 +1,157 @@ +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 FrmbuyerInWarehouse : FrmBaseForm + { + private Dictionary fieldDictionary = new Dictionary(); + public FrmbuyerInWarehouse() + { + InitializeComponent(); + } + private void FrmbuyerInWarehouse_Load(object sender, EventArgs e) + { + InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new buyerInWarehouseInfo()); + InitSearchDicData(); + } + /// + /// 数据源初始化 + /// + /// + private void Init() + { + txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户"); + repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户"); + txtsupplierid.Properties.DataSource = GetDataTableUtils.SqlTable("供应商"); + repositoryItemtxtsupplierid.DataSource= GetDataTableUtils.SqlTable("供应商"); + } + /// + /// 搜索字段 + /// + /// + private void InitSearchDicData() + { + fieldDictionary.Add("入库单号","code"); + } + + public override void InitgrdListDataSource() + { + using (var con=new MESDB())/// + { + grdList.DataSource=con.buyerInWarehouseInfo.ToList(); + } + Init(); + } + /// + /// 字段为空校验 + /// + /// + public override bool CheckInput() + { + if(string.IsNullOrEmpty(txtcreatorId.EditValue.ToString())) + { + "制单人不能为空".ShowWarning(); + txtcreatorId.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtsupplierid.EditValue.ToString())) + { + "供应商不能为空".ShowWarning(); + txtsupplierid.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtsuppliercode.EditValue.ToString())) + { + "供应商编码不能为空".ShowWarning(); + txtsuppliercode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtintime.EditValue.ToString())) + { + "入库日期不能为空".ShowWarning(); + txtintime.Focus(); + return false; + } + return true; + } + /// + /// 保存 + /// + /// + public override bool SaveFunction() + { + try + { + buyerInWarehouseInfo info= (buyerInWarehouseInfo)this.ControlDataToModel(new buyerInWarehouseInfo()); + using (var db = new MESDB()) + { + db.buyerInWarehouseInfo.AddOrUpdate(info); + db.SaveChanges(); + } + } + catch (Exception ex) + { + ex.Message.ShowError(); + return false; + } + return true; + } + /// + /// 删除 + /// + /// + public override bool DelFunction() + { + try + { + buyerInWarehouseInfo info = (buyerInWarehouseInfo)this.ControlDataToModel(new buyerInWarehouseInfo()); + 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.buyerInWarehouseInfo.SqlQuery("select * from buyerInWarehouse").ToList(); + } + else + { + grdList.DataSource = db.buyerInWarehouseInfo.SqlQuery($"select * from buyerInWarehouse where {sql}").ToList(); + } + } + } + } + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmbuyerInWarehouse.designer.cs b/WinformGeneralDeveloperFrame/Form/FrmbuyerInWarehouse.designer.cs new file mode 100644 index 0000000..7ef6dfd --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmbuyerInWarehouse.designer.cs @@ -0,0 +1,538 @@ + +using DevExpress.XtraEditors; +using DevExpress.XtraLayout; +using DevExpress.XtraTab; + +namespace MES.Form +{ + partial class FrmbuyerInWarehouse + { + /// + /// 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.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.txtcode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.repositoryItemtxtcreatorId = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + + this.txtcreatorId=new DevExpress.XtraEditors.LookUpEdit(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.repositoryItemtxtsupplierid = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + + this.txtsupplierid=new DevExpress.XtraEditors.LookUpEdit(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtsuppliercode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtintime=new DevExpress.XtraEditors.DateEdit(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtremark=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem7 = 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.txtcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).BeginInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtsupplierid)).BeginInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtsupplierid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtsuppliercode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtintime.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtintime.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).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.txtcode); + this.layoutControl1.Controls.Add(this.txtcreatorId); + this.layoutControl1.Controls.Add(this.txtsupplierid); + this.layoutControl1.Controls.Add(this.txtsuppliercode); + this.layoutControl1.Controls.Add(this.txtintime); + 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); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtcode.Location = new System.Drawing.Point(112, 36); + this.txtcode.Name = "txtcode"; + this.txtcode.Size = new System.Drawing.Size(481, 20); + this.txtcode.StyleController = this.layoutControl1; + this.txtcode.TabIndex = 2; + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.txtcode; + 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); + + // + // lookUpEdit1 + // + this.txtcreatorId.Location = new System.Drawing.Point(120, 60); + this.txtcreatorId.Name = "txtcreatorId"; + this.txtcreatorId.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtcreatorId.Properties.DisplayMember = "Name"; + this.txtcreatorId.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtcreatorId.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtcreatorId.Properties.ValueMember = "ID"; + this.txtcreatorId.Size = new System.Drawing.Size(932, 20); + this.txtcreatorId.StyleController = this.layoutControl1; + this.txtcreatorId.TabIndex = 3; + this.txtcreatorId.EditValue = ""; + + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.txtcreatorId; + this.layoutControlItem3.CustomizationFormText = "制单人"; + 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 = "制单人"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(96, 14); + + // + // lookUpEdit1 + // + this.txtsupplierid.Location = new System.Drawing.Point(120, 60); + this.txtsupplierid.Name = "txtsupplierid"; + this.txtsupplierid.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtsupplierid.Properties.DisplayMember = "Name"; + this.txtsupplierid.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtsupplierid.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtsupplierid.Properties.ValueMember = "ID"; + this.txtsupplierid.Size = new System.Drawing.Size(932, 20); + this.txtsupplierid.StyleController = this.layoutControl1; + this.txtsupplierid.TabIndex = 4; + this.txtsupplierid.EditValue = ""; + + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.txtsupplierid; + this.layoutControlItem4.CustomizationFormText = "供应商"; + 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 = "供应商"; + this.layoutControlItem4.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtsuppliercode.Location = new System.Drawing.Point(112, 108); + this.txtsuppliercode.Name = "txtsuppliercode"; + this.txtsuppliercode.Size = new System.Drawing.Size(481, 20); + this.txtsuppliercode.StyleController = this.layoutControl1; + this.txtsuppliercode.TabIndex = 5; + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.txtsuppliercode; + 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.txtintime.EditValue = null; + this.txtintime.ImeMode = System.Windows.Forms.ImeMode.Off; + this.txtintime.Location = new System.Drawing.Point(112, 132); + this.txtintime.Name = "txtintime"; + this.txtintime.Properties.DisplayFormat.FormatString = "G"; + this.txtintime.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.txtintime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtintime.Properties.VistaTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton()}); + this.txtintime.Size = new System.Drawing.Size(481, 20); + this.txtintime.StyleController = this.layoutControl1; + this.txtintime.TabIndex = 6; + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.txtintime; + this.layoutControlItem6.CustomizationFormText = "入库日期"; + 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 = "入库日期"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtremark.Location = new System.Drawing.Point(112, 156); + this.txtremark.Name = "txtremark"; + this.txtremark.Size = new System.Drawing.Size(481, 20); + this.txtremark.StyleController = this.layoutControl1; + this.txtremark.TabIndex = 7; + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.txtremark; + 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); + + + // + // 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.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.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"; + //////////////////////////////// + (this.gridColumn2).Caption = "入库单号"; + (this.gridColumn2).Name = "gridColumn2"; + (this.gridColumn2).FieldName = "code"; + (this.gridColumn2).Visible = true; + (this.gridColumn2).VisibleIndex = 2; + + (this.gridColumn3).ColumnEdit = this.repositoryItemtxtcreatorId; + this.repositoryItemtxtcreatorId.AutoHeight = false; + this.repositoryItemtxtcreatorId.DisplayMember = "Name"; + this.repositoryItemtxtcreatorId.ValueMember = "ID"; + this.repositoryItemtxtcreatorId.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtcreatorId.Name = "repositoryItemtxtcreatorId"; + (this.gridColumn3).Caption = "制单人"; + (this.gridColumn3).Name = "gridColumn3"; + (this.gridColumn3).FieldName = "creatorId"; + (this.gridColumn3).Visible = true; + (this.gridColumn3).VisibleIndex = 3; + + (this.gridColumn4).ColumnEdit = this.repositoryItemtxtsupplierid; + this.repositoryItemtxtsupplierid.AutoHeight = false; + this.repositoryItemtxtsupplierid.DisplayMember = "Name"; + this.repositoryItemtxtsupplierid.ValueMember = "ID"; + this.repositoryItemtxtsupplierid.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtsupplierid.Name = "repositoryItemtxtsupplierid"; + (this.gridColumn4).Caption = "供应商"; + (this.gridColumn4).Name = "gridColumn4"; + (this.gridColumn4).FieldName = "supplierid"; + (this.gridColumn4).Visible = true; + (this.gridColumn4).VisibleIndex = 4; + + //////////////////////////////// + (this.gridColumn5).Caption = "供应商编码"; + (this.gridColumn5).Name = "gridColumn5"; + (this.gridColumn5).FieldName = "suppliercode"; + (this.gridColumn5).Visible = true; + (this.gridColumn5).VisibleIndex = 5; + + (this.gridColumn6).DisplayFormat.FormatString = "G"; + (this.gridColumn6).DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + (this.gridColumn6).Caption = "入库日期"; + (this.gridColumn6).Name = "gridColumn6"; + (this.gridColumn6).FieldName = "intime"; + (this.gridColumn6).Visible = true; + (this.gridColumn6).VisibleIndex = 6; + + //////////////////////////////// + (this.gridColumn7).Caption = "备注"; + (this.gridColumn7).Name = "gridColumn7"; + (this.gridColumn7).FieldName = "remark"; + (this.gridColumn7).Visible = true; + (this.gridColumn7).VisibleIndex = 7; + + + // + // 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 = "FrmbuyerInWarehouse"; + this.Text = "FrmbuyerInWarehouse"; + this.Load += new System.EventHandler(this.FrmbuyerInWarehouse_Load); + this.Controls.SetChildIndex(this.xtraTabControl1, 0); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).EndInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtsupplierid)).EndInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtsupplierid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtsuppliercode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtintime.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtintime.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).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.XtraEditors.TextEdit txtid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtcode; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtcreatorId; + + private DevExpress.XtraEditors.LookUpEdit txtcreatorId; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtsupplierid; + + private DevExpress.XtraEditors.LookUpEdit txtsupplierid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtsuppliercode; + /////////////////////////////// + private DevExpress.XtraEditors.DateEdit txtintime; + /////////////////////////////// + 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; + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmbuyerInWarehouseDetail.cs b/WinformGeneralDeveloperFrame/Form/FrmbuyerInWarehouseDetail.cs new file mode 100644 index 0000000..7312819 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmbuyerInWarehouseDetail.cs @@ -0,0 +1,213 @@ +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 FrmbuyerInWarehouseDetail : FrmBaseForm + { + private Dictionary fieldDictionary = new Dictionary(); + public FrmbuyerInWarehouseDetail() + { + InitializeComponent(); + } + private void FrmbuyerInWarehouseDetail_Load(object sender, EventArgs e) + { + InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new buyerInWarehouseDetailInfo()); + InitSearchDicData(); + } + /// + /// 数据源初始化 + /// + /// + private void Init() + { + } + /// + /// 搜索字段 + /// + /// + private void InitSearchDicData() + { + fieldDictionary.Add("id","id"); + fieldDictionary.Add("主表id","masterid"); + fieldDictionary.Add("采购入库单号","mastercode"); + fieldDictionary.Add("采购入库明细单号","detailcode"); + fieldDictionary.Add("采购明细单号","buyerdetailcode"); + fieldDictionary.Add("采购单号","buyercode"); + fieldDictionary.Add("物料","materialid"); + fieldDictionary.Add("物料编号","materialcode"); + fieldDictionary.Add("规格型号","materialspec"); + fieldDictionary.Add("入库数量","number"); + fieldDictionary.Add("计量单位","unit"); + fieldDictionary.Add("仓库","warehouse"); + fieldDictionary.Add("remark","remark"); + } + + public override void InitgrdListDataSource() + { + using (var con=new MESDB())/// + { + grdList.DataSource=con.buyerInWarehouseDetailInfo.ToList(); + } + Init(); + } + /// + /// 字段为空校验 + /// + /// + public override bool CheckInput() + { + if(string.IsNullOrEmpty(txtmasterid.EditValue.ToString())) + { + "主表id不能为空".ShowWarning(); + txtmasterid.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtmastercode.EditValue.ToString())) + { + "采购入库单号不能为空".ShowWarning(); + txtmastercode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtdetailcode.EditValue.ToString())) + { + "采购入库明细单号不能为空".ShowWarning(); + txtdetailcode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtbuyerdetailcode.EditValue.ToString())) + { + "采购明细单号不能为空".ShowWarning(); + txtbuyerdetailcode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtbuyercode.EditValue.ToString())) + { + "采购单号不能为空".ShowWarning(); + txtbuyercode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtmaterialid.EditValue.ToString())) + { + "物料不能为空".ShowWarning(); + txtmaterialid.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(txtnumber.EditValue.ToString())) + { + "入库数量不能为空".ShowWarning(); + txtnumber.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(txtremark.EditValue.ToString())) + { + "remark不能为空".ShowWarning(); + txtremark.Focus(); + return false; + } + return true; + } + /// + /// 保存 + /// + /// + public override bool SaveFunction() + { + try + { + buyerInWarehouseDetailInfo info= (buyerInWarehouseDetailInfo)this.ControlDataToModel(new buyerInWarehouseDetailInfo()); + using (var db = new MESDB()) + { + db.buyerInWarehouseDetailInfo.AddOrUpdate(info); + db.SaveChanges(); + } + } + catch (Exception ex) + { + ex.Message.ShowError(); + return false; + } + return true; + } + /// + /// 删除 + /// + /// + public override bool DelFunction() + { + try + { + buyerInWarehouseDetailInfo info = (buyerInWarehouseDetailInfo)this.ControlDataToModel(new buyerInWarehouseDetailInfo()); + 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.buyerInWarehouseDetailInfo.SqlQuery("select * from buyerInWarehouseDetail").ToList(); + } + else + { + grdList.DataSource = db.buyerInWarehouseDetailInfo.SqlQuery($"select * from buyerInWarehouseDetail where {sql}").ToList(); + } + } + } + } + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmbuyerInWarehouseDetail.designer.cs b/WinformGeneralDeveloperFrame/Form/FrmbuyerInWarehouseDetail.designer.cs new file mode 100644 index 0000000..c982974 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmbuyerInWarehouseDetail.designer.cs @@ -0,0 +1,754 @@ + +using DevExpress.XtraEditors; +using DevExpress.XtraLayout; +using DevExpress.XtraTab; + +namespace MES.Form +{ + partial class FrmbuyerInWarehouseDetail + { + /// + /// 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.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.txtmasterid=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtmastercode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtdetailcode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtbuyerdetailcode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtbuyercode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtmaterialid=new DevExpress.XtraEditors.TextEdit(); + 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.txtnumber=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtunit=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtwarehouse=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtremark=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem13 = 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.txtmasterid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmastercode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtdetailcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtbuyerdetailcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtbuyercode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialid.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.txtnumber.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).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.txtmasterid); + this.layoutControl1.Controls.Add(this.txtmastercode); + this.layoutControl1.Controls.Add(this.txtdetailcode); + this.layoutControl1.Controls.Add(this.txtbuyerdetailcode); + this.layoutControl1.Controls.Add(this.txtbuyercode); + this.layoutControl1.Controls.Add(this.txtmaterialid); + this.layoutControl1.Controls.Add(this.txtmaterialcode); + this.layoutControl1.Controls.Add(this.txtmaterialspec); + this.layoutControl1.Controls.Add(this.txtnumber); + this.layoutControl1.Controls.Add(this.txtunit); + this.layoutControl1.Controls.Add(this.txtwarehouse); + 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); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtmasterid.Location = new System.Drawing.Point(112, 36); + this.txtmasterid.Name = "txtmasterid"; + this.txtmasterid.Size = new System.Drawing.Size(481, 20); + this.txtmasterid.StyleController = this.layoutControl1; + this.txtmasterid.TabIndex = 2; + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.txtmasterid; + this.layoutControlItem2.CustomizationFormText = "主表id"; + 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 = "主表id"; + this.layoutControlItem2.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtmastercode.Location = new System.Drawing.Point(112, 60); + this.txtmastercode.Name = "txtmastercode"; + this.txtmastercode.Size = new System.Drawing.Size(481, 20); + this.txtmastercode.StyleController = this.layoutControl1; + this.txtmastercode.TabIndex = 3; + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.txtmastercode; + this.layoutControlItem3.CustomizationFormText = "采购入库单号"; + 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 = "采购入库单号"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtdetailcode.Location = new System.Drawing.Point(112, 84); + this.txtdetailcode.Name = "txtdetailcode"; + this.txtdetailcode.Size = new System.Drawing.Size(481, 20); + this.txtdetailcode.StyleController = this.layoutControl1; + this.txtdetailcode.TabIndex = 4; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.txtdetailcode; + this.layoutControlItem4.CustomizationFormText = "采购入库明细单号"; + 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 = "采购入库明细单号"; + this.layoutControlItem4.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtbuyerdetailcode.Location = new System.Drawing.Point(112, 108); + this.txtbuyerdetailcode.Name = "txtbuyerdetailcode"; + this.txtbuyerdetailcode.Size = new System.Drawing.Size(481, 20); + this.txtbuyerdetailcode.StyleController = this.layoutControl1; + this.txtbuyerdetailcode.TabIndex = 5; + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.txtbuyerdetailcode; + 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.txtbuyercode.Location = new System.Drawing.Point(112, 132); + this.txtbuyercode.Name = "txtbuyercode"; + this.txtbuyercode.Size = new System.Drawing.Size(481, 20); + this.txtbuyercode.StyleController = this.layoutControl1; + this.txtbuyercode.TabIndex = 6; + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.txtbuyercode; + this.layoutControlItem6.CustomizationFormText = "采购单号"; + 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 = "采购单号"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtmaterialid.Location = new System.Drawing.Point(112, 156); + this.txtmaterialid.Name = "txtmaterialid"; + this.txtmaterialid.Size = new System.Drawing.Size(481, 20); + this.txtmaterialid.StyleController = this.layoutControl1; + this.txtmaterialid.TabIndex = 7; + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.txtmaterialid; + 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); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtnumber.Location = new System.Drawing.Point(112, 228); + this.txtnumber.Name = "txtnumber"; + this.txtnumber.Size = new System.Drawing.Size(481, 20); + this.txtnumber.StyleController = this.layoutControl1; + this.txtnumber.TabIndex = 10; + // + // layoutControlItem10 + // + this.layoutControlItem10.Control = this.txtnumber; + 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.txtunit.Location = new System.Drawing.Point(112, 252); + this.txtunit.Name = "txtunit"; + this.txtunit.Size = new System.Drawing.Size(481, 20); + this.txtunit.StyleController = this.layoutControl1; + this.txtunit.TabIndex = 11; + // + // 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(585, 24); + this.layoutControlItem11.Text = "计量单位"; + this.layoutControlItem11.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtwarehouse.Location = new System.Drawing.Point(112, 276); + this.txtwarehouse.Name = "txtwarehouse"; + this.txtwarehouse.Size = new System.Drawing.Size(481, 20); + this.txtwarehouse.StyleController = this.layoutControl1; + this.txtwarehouse.TabIndex = 12; + // + // layoutControlItem12 + // + this.layoutControlItem12.Control = this.txtwarehouse; + 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); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtremark.Location = new System.Drawing.Point(112, 300); + this.txtremark.Name = "txtremark"; + this.txtremark.Size = new System.Drawing.Size(481, 20); + this.txtremark.StyleController = this.layoutControl1; + this.txtremark.TabIndex = 13; + // + // layoutControlItem13 + // + this.layoutControlItem13.Control = this.txtremark; + this.layoutControlItem13.CustomizationFormText = "remark"; + 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 = "remark"; + this.layoutControlItem13.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.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.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"; + (this.gridColumn1).Visible = true; + (this.gridColumn1).VisibleIndex = 1; + + //////////////////////////////// + (this.gridColumn2).Caption = "主表id"; + (this.gridColumn2).Name = "gridColumn2"; + (this.gridColumn2).FieldName = "masterid"; + (this.gridColumn2).Visible = true; + (this.gridColumn2).VisibleIndex = 2; + + //////////////////////////////// + (this.gridColumn3).Caption = "采购入库单号"; + (this.gridColumn3).Name = "gridColumn3"; + (this.gridColumn3).FieldName = "mastercode"; + (this.gridColumn3).Visible = true; + (this.gridColumn3).VisibleIndex = 3; + + //////////////////////////////// + (this.gridColumn4).Caption = "采购入库明细单号"; + (this.gridColumn4).Name = "gridColumn4"; + (this.gridColumn4).FieldName = "detailcode"; + (this.gridColumn4).Visible = true; + (this.gridColumn4).VisibleIndex = 4; + + //////////////////////////////// + (this.gridColumn5).Caption = "采购明细单号"; + (this.gridColumn5).Name = "gridColumn5"; + (this.gridColumn5).FieldName = "buyerdetailcode"; + (this.gridColumn5).Visible = true; + (this.gridColumn5).VisibleIndex = 5; + + //////////////////////////////// + (this.gridColumn6).Caption = "采购单号"; + (this.gridColumn6).Name = "gridColumn6"; + (this.gridColumn6).FieldName = "buyercode"; + (this.gridColumn6).Visible = true; + (this.gridColumn6).VisibleIndex = 6; + + //////////////////////////////// + (this.gridColumn7).Caption = "物料"; + (this.gridColumn7).Name = "gridColumn7"; + (this.gridColumn7).FieldName = "materialid"; + (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).Caption = "入库数量"; + (this.gridColumn10).Name = "gridColumn10"; + (this.gridColumn10).FieldName = "number"; + (this.gridColumn10).Visible = true; + (this.gridColumn10).VisibleIndex = 10; + + //////////////////////////////// + (this.gridColumn11).Caption = "计量单位"; + (this.gridColumn11).Name = "gridColumn11"; + (this.gridColumn11).FieldName = "unit"; + (this.gridColumn11).Visible = true; + (this.gridColumn11).VisibleIndex = 11; + + //////////////////////////////// + (this.gridColumn12).Caption = "仓库"; + (this.gridColumn12).Name = "gridColumn12"; + (this.gridColumn12).FieldName = "warehouse"; + (this.gridColumn12).Visible = true; + (this.gridColumn12).VisibleIndex = 12; + + //////////////////////////////// + (this.gridColumn13).Caption = "remark"; + (this.gridColumn13).Name = "gridColumn13"; + (this.gridColumn13).FieldName = "remark"; + (this.gridColumn13).Visible = true; + (this.gridColumn13).VisibleIndex = 13; + + + // + // 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 = "FrmbuyerInWarehouseDetail"; + this.Text = "FrmbuyerInWarehouseDetail"; + this.Load += new System.EventHandler(this.FrmbuyerInWarehouseDetail_Load); + this.Controls.SetChildIndex(this.xtraTabControl1, 0); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmasterid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmastercode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtdetailcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtbuyerdetailcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtbuyercode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialid.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.txtnumber.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).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.XtraEditors.TextEdit txtid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmasterid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmastercode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtdetailcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtbuyerdetailcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtbuyercode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmaterialid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmaterialcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmaterialspec; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtnumber; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtunit; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtwarehouse; + /////////////////////////////// + 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; + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmbuyerOutWarehouse.cs b/WinformGeneralDeveloperFrame/Form/FrmbuyerOutWarehouse.cs new file mode 100644 index 0000000..b12fe81 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmbuyerOutWarehouse.cs @@ -0,0 +1,157 @@ +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 FrmbuyerOutWarehouse : FrmBaseForm + { + private Dictionary fieldDictionary = new Dictionary(); + public FrmbuyerOutWarehouse() + { + InitializeComponent(); + } + private void FrmbuyerOutWarehouse_Load(object sender, EventArgs e) + { + InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new buyerOutWarehouseInfo()); + InitSearchDicData(); + } + /// + /// 数据源初始化 + /// + /// + private void Init() + { + txtsupplierid.Properties.DataSource = GetDataTableUtils.SqlTable("供应商"); + repositoryItemtxtsupplierid.DataSource= GetDataTableUtils.SqlTable("供应商"); + txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户"); + repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户"); + } + /// + /// 搜索字段 + /// + /// + private void InitSearchDicData() + { + fieldDictionary.Add("采购退货出库单号","code"); + } + + public override void InitgrdListDataSource() + { + using (var con=new MESDB())/// + { + grdList.DataSource=con.buyerOutWarehouseInfo.ToList(); + } + Init(); + } + /// + /// 字段为空校验 + /// + /// + public override bool CheckInput() + { + if(string.IsNullOrEmpty(txtouttime.EditValue.ToString())) + { + "出库日期不能为空".ShowWarning(); + txtouttime.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtsupplierid.EditValue.ToString())) + { + "供应商不能为空".ShowWarning(); + txtsupplierid.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtsuppliercode.EditValue.ToString())) + { + "供应商编码不能为空".ShowWarning(); + txtsuppliercode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtcreatorId.EditValue.ToString())) + { + "制单人不能为空".ShowWarning(); + txtcreatorId.Focus(); + return false; + } + return true; + } + /// + /// 保存 + /// + /// + public override bool SaveFunction() + { + try + { + buyerOutWarehouseInfo info= (buyerOutWarehouseInfo)this.ControlDataToModel(new buyerOutWarehouseInfo()); + using (var db = new MESDB()) + { + db.buyerOutWarehouseInfo.AddOrUpdate(info); + db.SaveChanges(); + } + } + catch (Exception ex) + { + ex.Message.ShowError(); + return false; + } + return true; + } + /// + /// 删除 + /// + /// + public override bool DelFunction() + { + try + { + buyerOutWarehouseInfo info = (buyerOutWarehouseInfo)this.ControlDataToModel(new buyerOutWarehouseInfo()); + 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.buyerOutWarehouseInfo.SqlQuery("select * from buyerOutWarehouse").ToList(); + } + else + { + grdList.DataSource = db.buyerOutWarehouseInfo.SqlQuery($"select * from buyerOutWarehouse where {sql}").ToList(); + } + } + } + } + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmbuyerOutWarehouse.designer.cs b/WinformGeneralDeveloperFrame/Form/FrmbuyerOutWarehouse.designer.cs new file mode 100644 index 0000000..1d00525 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmbuyerOutWarehouse.designer.cs @@ -0,0 +1,538 @@ + +using DevExpress.XtraEditors; +using DevExpress.XtraLayout; +using DevExpress.XtraTab; + +namespace MES.Form +{ + partial class FrmbuyerOutWarehouse + { + /// + /// 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.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.txtcode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtouttime=new DevExpress.XtraEditors.DateEdit(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.repositoryItemtxtsupplierid = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + + this.txtsupplierid=new DevExpress.XtraEditors.LookUpEdit(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtsuppliercode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.repositoryItemtxtcreatorId = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + + this.txtcreatorId=new DevExpress.XtraEditors.LookUpEdit(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtremark=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem7 = 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.txtcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtouttime.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtouttime.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtsupplierid)).BeginInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtsupplierid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtsuppliercode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).BeginInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).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.txtcode); + this.layoutControl1.Controls.Add(this.txtouttime); + this.layoutControl1.Controls.Add(this.txtsupplierid); + this.layoutControl1.Controls.Add(this.txtsuppliercode); + this.layoutControl1.Controls.Add(this.txtcreatorId); + 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); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtcode.Location = new System.Drawing.Point(112, 36); + this.txtcode.Name = "txtcode"; + this.txtcode.Size = new System.Drawing.Size(481, 20); + this.txtcode.StyleController = this.layoutControl1; + this.txtcode.TabIndex = 2; + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.txtcode; + 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.txtouttime.EditValue = null; + this.txtouttime.ImeMode = System.Windows.Forms.ImeMode.Off; + this.txtouttime.Location = new System.Drawing.Point(112, 60); + this.txtouttime.Name = "txtouttime"; + this.txtouttime.Properties.DisplayFormat.FormatString = "G"; + this.txtouttime.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.txtouttime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtouttime.Properties.VistaTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton()}); + this.txtouttime.Size = new System.Drawing.Size(481, 20); + this.txtouttime.StyleController = this.layoutControl1; + this.txtouttime.TabIndex = 3; + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.txtouttime; + this.layoutControlItem3.CustomizationFormText = "出库日期"; + 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 = "出库日期"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(96, 14); + + // + // lookUpEdit1 + // + this.txtsupplierid.Location = new System.Drawing.Point(120, 60); + this.txtsupplierid.Name = "txtsupplierid"; + this.txtsupplierid.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtsupplierid.Properties.DisplayMember = "Name"; + this.txtsupplierid.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtsupplierid.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtsupplierid.Properties.ValueMember = "ID"; + this.txtsupplierid.Size = new System.Drawing.Size(932, 20); + this.txtsupplierid.StyleController = this.layoutControl1; + this.txtsupplierid.TabIndex = 4; + this.txtsupplierid.EditValue = ""; + + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.txtsupplierid; + this.layoutControlItem4.CustomizationFormText = "供应商"; + 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 = "供应商"; + this.layoutControlItem4.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtsuppliercode.Location = new System.Drawing.Point(112, 108); + this.txtsuppliercode.Name = "txtsuppliercode"; + this.txtsuppliercode.Size = new System.Drawing.Size(481, 20); + this.txtsuppliercode.StyleController = this.layoutControl1; + this.txtsuppliercode.TabIndex = 5; + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.txtsuppliercode; + 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); + + // + // lookUpEdit1 + // + this.txtcreatorId.Location = new System.Drawing.Point(120, 60); + this.txtcreatorId.Name = "txtcreatorId"; + this.txtcreatorId.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtcreatorId.Properties.DisplayMember = "Name"; + this.txtcreatorId.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtcreatorId.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtcreatorId.Properties.ValueMember = "ID"; + this.txtcreatorId.Size = new System.Drawing.Size(932, 20); + this.txtcreatorId.StyleController = this.layoutControl1; + this.txtcreatorId.TabIndex = 6; + this.txtcreatorId.EditValue = ""; + + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.txtcreatorId; + this.layoutControlItem6.CustomizationFormText = "制单人"; + 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 = "制单人"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtremark.Location = new System.Drawing.Point(112, 156); + this.txtremark.Name = "txtremark"; + this.txtremark.Size = new System.Drawing.Size(481, 20); + this.txtremark.StyleController = this.layoutControl1; + this.txtremark.TabIndex = 7; + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.txtremark; + 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); + + + // + // 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.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.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"; + //////////////////////////////// + (this.gridColumn2).Caption = "采购退货出库单号"; + (this.gridColumn2).Name = "gridColumn2"; + (this.gridColumn2).FieldName = "code"; + (this.gridColumn2).Visible = true; + (this.gridColumn2).VisibleIndex = 2; + + (this.gridColumn3).DisplayFormat.FormatString = "G"; + (this.gridColumn3).DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + (this.gridColumn3).Caption = "出库日期"; + (this.gridColumn3).Name = "gridColumn3"; + (this.gridColumn3).FieldName = "outtime"; + (this.gridColumn3).Visible = true; + (this.gridColumn3).VisibleIndex = 3; + + (this.gridColumn4).ColumnEdit = this.repositoryItemtxtsupplierid; + this.repositoryItemtxtsupplierid.AutoHeight = false; + this.repositoryItemtxtsupplierid.DisplayMember = "Name"; + this.repositoryItemtxtsupplierid.ValueMember = "ID"; + this.repositoryItemtxtsupplierid.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtsupplierid.Name = "repositoryItemtxtsupplierid"; + (this.gridColumn4).Caption = "供应商"; + (this.gridColumn4).Name = "gridColumn4"; + (this.gridColumn4).FieldName = "supplierid"; + (this.gridColumn4).Visible = true; + (this.gridColumn4).VisibleIndex = 4; + + //////////////////////////////// + (this.gridColumn5).Caption = "供应商编码"; + (this.gridColumn5).Name = "gridColumn5"; + (this.gridColumn5).FieldName = "suppliercode"; + (this.gridColumn5).Visible = true; + (this.gridColumn5).VisibleIndex = 5; + + (this.gridColumn6).ColumnEdit = this.repositoryItemtxtcreatorId; + this.repositoryItemtxtcreatorId.AutoHeight = false; + this.repositoryItemtxtcreatorId.DisplayMember = "Name"; + this.repositoryItemtxtcreatorId.ValueMember = "ID"; + this.repositoryItemtxtcreatorId.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtcreatorId.Name = "repositoryItemtxtcreatorId"; + (this.gridColumn6).Caption = "制单人"; + (this.gridColumn6).Name = "gridColumn6"; + (this.gridColumn6).FieldName = "creatorId"; + (this.gridColumn6).Visible = true; + (this.gridColumn6).VisibleIndex = 6; + + //////////////////////////////// + (this.gridColumn7).Caption = "备注"; + (this.gridColumn7).Name = "gridColumn7"; + (this.gridColumn7).FieldName = "remark"; + (this.gridColumn7).Visible = true; + (this.gridColumn7).VisibleIndex = 7; + + + // + // 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 = "FrmbuyerOutWarehouse"; + this.Text = "FrmbuyerOutWarehouse"; + this.Load += new System.EventHandler(this.FrmbuyerOutWarehouse_Load); + this.Controls.SetChildIndex(this.xtraTabControl1, 0); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtouttime.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtouttime.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtsupplierid)).EndInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtsupplierid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtsuppliercode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).EndInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).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.XtraEditors.TextEdit txtid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtcode; + /////////////////////////////// + private DevExpress.XtraEditors.DateEdit txtouttime; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtsupplierid; + + private DevExpress.XtraEditors.LookUpEdit txtsupplierid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtsuppliercode; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtcreatorId; + + private DevExpress.XtraEditors.LookUpEdit txtcreatorId; + /////////////////////////////// + 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; + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmbuyerOutWarehouseDetail.cs b/WinformGeneralDeveloperFrame/Form/FrmbuyerOutWarehouseDetail.cs new file mode 100644 index 0000000..0a2378d --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmbuyerOutWarehouseDetail.cs @@ -0,0 +1,227 @@ +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 FrmbuyerOutWarehouseDetail : FrmBaseForm + { + private Dictionary fieldDictionary = new Dictionary(); + public FrmbuyerOutWarehouseDetail() + { + InitializeComponent(); + } + private void FrmbuyerOutWarehouseDetail_Load(object sender, EventArgs e) + { + InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new buyerOutWarehouseDetailInfo()); + InitSearchDicData(); + } + /// + /// 数据源初始化 + /// + /// + private void Init() + { + } + /// + /// 搜索字段 + /// + /// + private void InitSearchDicData() + { + fieldDictionary.Add("id","id"); + fieldDictionary.Add("主表id","masterid"); + fieldDictionary.Add("采购出库单号","mastercode"); + fieldDictionary.Add("采购出库明细单号","detailcode"); + fieldDictionary.Add("采购退货单号","buyerreturncode"); + fieldDictionary.Add("采购退货明细单号","buyerreturndetailcode"); + fieldDictionary.Add("采购单号","buyercode"); + fieldDictionary.Add("采购明细单号","buyerdetailcode"); + fieldDictionary.Add("物料","materialid"); + fieldDictionary.Add("物料编码","materialcode"); + fieldDictionary.Add("规格型号","materialspec"); + fieldDictionary.Add("出库数量","number"); + fieldDictionary.Add("计量单位","unit"); + fieldDictionary.Add("仓库","warehouse"); + fieldDictionary.Add("备注","remark"); + } + + public override void InitgrdListDataSource() + { + using (var con=new MESDB())/// + { + grdList.DataSource=con.buyerOutWarehouseDetailInfo.ToList(); + } + Init(); + } + /// + /// 字段为空校验 + /// + /// + public override bool CheckInput() + { + if(string.IsNullOrEmpty(txtmasterid.EditValue.ToString())) + { + "主表id不能为空".ShowWarning(); + txtmasterid.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtmastercode.EditValue.ToString())) + { + "采购出库单号不能为空".ShowWarning(); + txtmastercode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtdetailcode.EditValue.ToString())) + { + "采购出库明细单号不能为空".ShowWarning(); + txtdetailcode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtbuyerreturncode.EditValue.ToString())) + { + "采购退货单号不能为空".ShowWarning(); + txtbuyerreturncode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtbuyerreturndetailcode.EditValue.ToString())) + { + "采购退货明细单号不能为空".ShowWarning(); + txtbuyerreturndetailcode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtbuyercode.EditValue.ToString())) + { + "采购单号不能为空".ShowWarning(); + txtbuyercode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtbuyerdetailcode.EditValue.ToString())) + { + "采购明细单号不能为空".ShowWarning(); + txtbuyerdetailcode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtmaterialid.EditValue.ToString())) + { + "物料不能为空".ShowWarning(); + txtmaterialid.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(txtnumber.EditValue.ToString())) + { + "出库数量不能为空".ShowWarning(); + txtnumber.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(txtremark.EditValue.ToString())) + { + "备注不能为空".ShowWarning(); + txtremark.Focus(); + return false; + } + return true; + } + /// + /// 保存 + /// + /// + public override bool SaveFunction() + { + try + { + buyerOutWarehouseDetailInfo info= (buyerOutWarehouseDetailInfo)this.ControlDataToModel(new buyerOutWarehouseDetailInfo()); + using (var db = new MESDB()) + { + db.buyerOutWarehouseDetailInfo.AddOrUpdate(info); + db.SaveChanges(); + } + } + catch (Exception ex) + { + ex.Message.ShowError(); + return false; + } + return true; + } + /// + /// 删除 + /// + /// + public override bool DelFunction() + { + try + { + buyerOutWarehouseDetailInfo info = (buyerOutWarehouseDetailInfo)this.ControlDataToModel(new buyerOutWarehouseDetailInfo()); + 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.buyerOutWarehouseDetailInfo.SqlQuery("select * from buyerOutWarehouseDetail").ToList(); + } + else + { + grdList.DataSource = db.buyerOutWarehouseDetailInfo.SqlQuery($"select * from buyerOutWarehouseDetail where {sql}").ToList(); + } + } + } + } + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmbuyerOutWarehouseDetail.designer.cs b/WinformGeneralDeveloperFrame/Form/FrmbuyerOutWarehouseDetail.designer.cs new file mode 100644 index 0000000..4839c99 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmbuyerOutWarehouseDetail.designer.cs @@ -0,0 +1,840 @@ + +using DevExpress.XtraEditors; +using DevExpress.XtraLayout; +using DevExpress.XtraTab; + +namespace MES.Form +{ + partial class FrmbuyerOutWarehouseDetail + { + /// + /// 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.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.txtmasterid=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtmastercode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtdetailcode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtbuyerreturncode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtbuyerreturndetailcode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtbuyercode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtbuyerdetailcode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtmaterialid=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtmaterialcode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtmaterialspec=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtnumber=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtunit=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtwarehouse=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtremark=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem15 = 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.txtmasterid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmastercode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtdetailcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtbuyerreturncode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtbuyerreturndetailcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtbuyercode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtbuyerdetailcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialspec.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtnumber.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).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.txtmasterid); + this.layoutControl1.Controls.Add(this.txtmastercode); + this.layoutControl1.Controls.Add(this.txtdetailcode); + this.layoutControl1.Controls.Add(this.txtbuyerreturncode); + this.layoutControl1.Controls.Add(this.txtbuyerreturndetailcode); + this.layoutControl1.Controls.Add(this.txtbuyercode); + this.layoutControl1.Controls.Add(this.txtbuyerdetailcode); + this.layoutControl1.Controls.Add(this.txtmaterialid); + this.layoutControl1.Controls.Add(this.txtmaterialcode); + this.layoutControl1.Controls.Add(this.txtmaterialspec); + this.layoutControl1.Controls.Add(this.txtnumber); + this.layoutControl1.Controls.Add(this.txtunit); + this.layoutControl1.Controls.Add(this.txtwarehouse); + 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); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtmasterid.Location = new System.Drawing.Point(112, 36); + this.txtmasterid.Name = "txtmasterid"; + this.txtmasterid.Size = new System.Drawing.Size(481, 20); + this.txtmasterid.StyleController = this.layoutControl1; + this.txtmasterid.TabIndex = 2; + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.txtmasterid; + this.layoutControlItem2.CustomizationFormText = "主表id"; + 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 = "主表id"; + this.layoutControlItem2.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtmastercode.Location = new System.Drawing.Point(112, 60); + this.txtmastercode.Name = "txtmastercode"; + this.txtmastercode.Size = new System.Drawing.Size(481, 20); + this.txtmastercode.StyleController = this.layoutControl1; + this.txtmastercode.TabIndex = 3; + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.txtmastercode; + this.layoutControlItem3.CustomizationFormText = "采购出库单号"; + 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 = "采购出库单号"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtdetailcode.Location = new System.Drawing.Point(112, 84); + this.txtdetailcode.Name = "txtdetailcode"; + this.txtdetailcode.Size = new System.Drawing.Size(481, 20); + this.txtdetailcode.StyleController = this.layoutControl1; + this.txtdetailcode.TabIndex = 4; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.txtdetailcode; + this.layoutControlItem4.CustomizationFormText = "采购出库明细单号"; + 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 = "采购出库明细单号"; + this.layoutControlItem4.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtbuyerreturncode.Location = new System.Drawing.Point(112, 108); + this.txtbuyerreturncode.Name = "txtbuyerreturncode"; + this.txtbuyerreturncode.Size = new System.Drawing.Size(481, 20); + this.txtbuyerreturncode.StyleController = this.layoutControl1; + this.txtbuyerreturncode.TabIndex = 5; + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.txtbuyerreturncode; + 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.txtbuyerreturndetailcode.Location = new System.Drawing.Point(112, 132); + this.txtbuyerreturndetailcode.Name = "txtbuyerreturndetailcode"; + this.txtbuyerreturndetailcode.Size = new System.Drawing.Size(481, 20); + this.txtbuyerreturndetailcode.StyleController = this.layoutControl1; + this.txtbuyerreturndetailcode.TabIndex = 6; + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.txtbuyerreturndetailcode; + this.layoutControlItem6.CustomizationFormText = "采购退货明细单号"; + 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 = "采购退货明细单号"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtbuyercode.Location = new System.Drawing.Point(112, 156); + this.txtbuyercode.Name = "txtbuyercode"; + this.txtbuyercode.Size = new System.Drawing.Size(481, 20); + this.txtbuyercode.StyleController = this.layoutControl1; + this.txtbuyercode.TabIndex = 7; + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.txtbuyercode; + 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.txtbuyerdetailcode.Location = new System.Drawing.Point(112, 180); + this.txtbuyerdetailcode.Name = "txtbuyerdetailcode"; + this.txtbuyerdetailcode.Size = new System.Drawing.Size(481, 20); + this.txtbuyerdetailcode.StyleController = this.layoutControl1; + this.txtbuyerdetailcode.TabIndex = 8; + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.txtbuyerdetailcode; + 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.txtmaterialid.Location = new System.Drawing.Point(112, 204); + this.txtmaterialid.Name = "txtmaterialid"; + this.txtmaterialid.Size = new System.Drawing.Size(481, 20); + this.txtmaterialid.StyleController = this.layoutControl1; + this.txtmaterialid.TabIndex = 9; + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.txtmaterialid; + 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); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtmaterialcode.Location = new System.Drawing.Point(112, 228); + this.txtmaterialcode.Name = "txtmaterialcode"; + this.txtmaterialcode.Size = new System.Drawing.Size(481, 20); + this.txtmaterialcode.StyleController = this.layoutControl1; + this.txtmaterialcode.TabIndex = 10; + // + // layoutControlItem10 + // + this.layoutControlItem10.Control = this.txtmaterialcode; + 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.txtmaterialspec.Location = new System.Drawing.Point(112, 252); + this.txtmaterialspec.Name = "txtmaterialspec"; + this.txtmaterialspec.Size = new System.Drawing.Size(481, 20); + this.txtmaterialspec.StyleController = this.layoutControl1; + this.txtmaterialspec.TabIndex = 11; + // + // layoutControlItem11 + // + this.layoutControlItem11.Control = this.txtmaterialspec; + 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); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtnumber.Location = new System.Drawing.Point(112, 276); + this.txtnumber.Name = "txtnumber"; + this.txtnumber.Size = new System.Drawing.Size(481, 20); + this.txtnumber.StyleController = this.layoutControl1; + this.txtnumber.TabIndex = 12; + // + // layoutControlItem12 + // + this.layoutControlItem12.Control = this.txtnumber; + 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); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtunit.Location = new System.Drawing.Point(112, 300); + this.txtunit.Name = "txtunit"; + this.txtunit.Size = new System.Drawing.Size(481, 20); + this.txtunit.StyleController = this.layoutControl1; + this.txtunit.TabIndex = 13; + // + // layoutControlItem13 + // + this.layoutControlItem13.Control = this.txtunit; + 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.txtwarehouse.Location = new System.Drawing.Point(112, 324); + this.txtwarehouse.Name = "txtwarehouse"; + this.txtwarehouse.Size = new System.Drawing.Size(481, 20); + this.txtwarehouse.StyleController = this.layoutControl1; + this.txtwarehouse.TabIndex = 14; + // + // layoutControlItem14 + // + this.layoutControlItem14.Control = this.txtwarehouse; + 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.txtremark.Location = new System.Drawing.Point(112, 348); + this.txtremark.Name = "txtremark"; + this.txtremark.Size = new System.Drawing.Size(481, 20); + this.txtremark.StyleController = this.layoutControl1; + this.txtremark.TabIndex = 15; + // + // layoutControlItem15 + // + this.layoutControlItem15.Control = this.txtremark; + 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); + + + // + // 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.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.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"; + (this.gridColumn1).Visible = true; + (this.gridColumn1).VisibleIndex = 1; + + //////////////////////////////// + (this.gridColumn2).Caption = "主表id"; + (this.gridColumn2).Name = "gridColumn2"; + (this.gridColumn2).FieldName = "masterid"; + (this.gridColumn2).Visible = true; + (this.gridColumn2).VisibleIndex = 2; + + //////////////////////////////// + (this.gridColumn3).Caption = "采购出库单号"; + (this.gridColumn3).Name = "gridColumn3"; + (this.gridColumn3).FieldName = "mastercode"; + (this.gridColumn3).Visible = true; + (this.gridColumn3).VisibleIndex = 3; + + //////////////////////////////// + (this.gridColumn4).Caption = "采购出库明细单号"; + (this.gridColumn4).Name = "gridColumn4"; + (this.gridColumn4).FieldName = "detailcode"; + (this.gridColumn4).Visible = true; + (this.gridColumn4).VisibleIndex = 4; + + //////////////////////////////// + (this.gridColumn5).Caption = "采购退货单号"; + (this.gridColumn5).Name = "gridColumn5"; + (this.gridColumn5).FieldName = "buyerreturncode"; + (this.gridColumn5).Visible = true; + (this.gridColumn5).VisibleIndex = 5; + + //////////////////////////////// + (this.gridColumn6).Caption = "采购退货明细单号"; + (this.gridColumn6).Name = "gridColumn6"; + (this.gridColumn6).FieldName = "buyerreturndetailcode"; + (this.gridColumn6).Visible = true; + (this.gridColumn6).VisibleIndex = 6; + + //////////////////////////////// + (this.gridColumn7).Caption = "采购单号"; + (this.gridColumn7).Name = "gridColumn7"; + (this.gridColumn7).FieldName = "buyercode"; + (this.gridColumn7).Visible = true; + (this.gridColumn7).VisibleIndex = 7; + + //////////////////////////////// + (this.gridColumn8).Caption = "采购明细单号"; + (this.gridColumn8).Name = "gridColumn8"; + (this.gridColumn8).FieldName = "buyerdetailcode"; + (this.gridColumn8).Visible = true; + (this.gridColumn8).VisibleIndex = 8; + + //////////////////////////////// + (this.gridColumn9).Caption = "物料"; + (this.gridColumn9).Name = "gridColumn9"; + (this.gridColumn9).FieldName = "materialid"; + (this.gridColumn9).Visible = true; + (this.gridColumn9).VisibleIndex = 9; + + //////////////////////////////// + (this.gridColumn10).Caption = "物料编码"; + (this.gridColumn10).Name = "gridColumn10"; + (this.gridColumn10).FieldName = "materialcode"; + (this.gridColumn10).Visible = true; + (this.gridColumn10).VisibleIndex = 10; + + //////////////////////////////// + (this.gridColumn11).Caption = "规格型号"; + (this.gridColumn11).Name = "gridColumn11"; + (this.gridColumn11).FieldName = "materialspec"; + (this.gridColumn11).Visible = true; + (this.gridColumn11).VisibleIndex = 11; + + //////////////////////////////// + (this.gridColumn12).Caption = "出库数量"; + (this.gridColumn12).Name = "gridColumn12"; + (this.gridColumn12).FieldName = "number"; + (this.gridColumn12).Visible = true; + (this.gridColumn12).VisibleIndex = 12; + + //////////////////////////////// + (this.gridColumn13).Caption = "计量单位"; + (this.gridColumn13).Name = "gridColumn13"; + (this.gridColumn13).FieldName = "unit"; + (this.gridColumn13).Visible = true; + (this.gridColumn13).VisibleIndex = 13; + + //////////////////////////////// + (this.gridColumn14).Caption = "仓库"; + (this.gridColumn14).Name = "gridColumn14"; + (this.gridColumn14).FieldName = "warehouse"; + (this.gridColumn14).Visible = true; + (this.gridColumn14).VisibleIndex = 14; + + //////////////////////////////// + (this.gridColumn15).Caption = "备注"; + (this.gridColumn15).Name = "gridColumn15"; + (this.gridColumn15).FieldName = "remark"; + (this.gridColumn15).Visible = true; + (this.gridColumn15).VisibleIndex = 15; + + + // + // 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 = "FrmbuyerOutWarehouseDetail"; + this.Text = "FrmbuyerOutWarehouseDetail"; + this.Load += new System.EventHandler(this.FrmbuyerOutWarehouseDetail_Load); + this.Controls.SetChildIndex(this.xtraTabControl1, 0); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmasterid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmastercode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtdetailcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtbuyerreturncode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtbuyerreturndetailcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtbuyercode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtbuyerdetailcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialspec.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtnumber.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).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.XtraEditors.TextEdit txtid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmasterid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmastercode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtdetailcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtbuyerreturncode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtbuyerreturndetailcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtbuyercode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtbuyerdetailcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmaterialid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmaterialcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmaterialspec; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtnumber; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtunit; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtwarehouse; + /////////////////////////////// + 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; + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/Frmbuyerreturn.designer.cs b/WinformGeneralDeveloperFrame/Form/Frmbuyerreturn.designer.cs index 562c52d..6a1430d 100644 --- a/WinformGeneralDeveloperFrame/Form/Frmbuyerreturn.designer.cs +++ b/WinformGeneralDeveloperFrame/Form/Frmbuyerreturn.designer.cs @@ -244,7 +244,7 @@ namespace MES.Form // this.tabDataList.Controls.Add(this.grdList); this.tabDataList.Name = "tabDataList"; - this.tabDataList.Size = new System.Drawing.Size(1295, 740); + this.tabDataList.Size = new System.Drawing.Size(1294, 737); this.tabDataList.Text = "数据列表"; // // grdList @@ -253,7 +253,7 @@ namespace MES.Form this.grdList.Location = new System.Drawing.Point(0, 0); this.grdList.MainView = this.grdListView; this.grdList.Name = "grdList"; - this.grdList.Size = new System.Drawing.Size(1295, 740); + 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}); @@ -278,7 +278,7 @@ namespace MES.Form // this.tabDataDetail.Controls.Add(this.panelControl2); this.tabDataDetail.Name = "tabDataDetail"; - this.tabDataDetail.Size = new System.Drawing.Size(1295, 740); + this.tabDataDetail.Size = new System.Drawing.Size(1294, 737); this.tabDataDetail.Text = "数据编辑"; // // panelControl2 @@ -287,7 +287,7 @@ namespace MES.Form this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill; this.panelControl2.Location = new System.Drawing.Point(0, 0); this.panelControl2.Name = "panelControl2"; - this.panelControl2.Size = new System.Drawing.Size(1295, 740); + this.panelControl2.Size = new System.Drawing.Size(1294, 737); this.panelControl2.TabIndex = 0; // // layoutControl1 @@ -305,7 +305,7 @@ namespace MES.Form this.layoutControl1.Location = new System.Drawing.Point(2, 2); this.layoutControl1.Name = "layoutControl1"; this.layoutControl1.Root = this.layoutControlGroup1; - this.layoutControl1.Size = new System.Drawing.Size(1291, 736); + this.layoutControl1.Size = new System.Drawing.Size(1290, 733); this.layoutControl1.TabIndex = 6; this.layoutControl1.Text = "layoutControl1"; // @@ -314,7 +314,7 @@ namespace MES.Form this.xtraTabControl2.Location = new System.Drawing.Point(12, 132); this.xtraTabControl2.Name = "xtraTabControl2"; this.xtraTabControl2.SelectedTabPage = this.xtraTabPage1; - this.xtraTabControl2.Size = new System.Drawing.Size(1267, 592); + this.xtraTabControl2.Size = new System.Drawing.Size(1266, 589); this.xtraTabControl2.TabIndex = 9; this.xtraTabControl2.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { this.xtraTabPage1}); @@ -323,7 +323,7 @@ namespace MES.Form // this.xtraTabPage1.Controls.Add(this.gridControl1); this.xtraTabPage1.Name = "xtraTabPage1"; - this.xtraTabPage1.Size = new System.Drawing.Size(1262, 566); + this.xtraTabPage1.Size = new System.Drawing.Size(1260, 560); this.xtraTabPage1.Text = "明细"; // // gridControl1 @@ -338,7 +338,7 @@ namespace MES.Form this.repositoryItemLookUpEditunit, this.repositoryItemLookUpEditwarehouse, this.repositoryItemTextEditbuyerdetailcode}); - this.gridControl1.Size = new System.Drawing.Size(1262, 566); + this.gridControl1.Size = new System.Drawing.Size(1260, 560); this.gridControl1.TabIndex = 1; this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.gridView1}); @@ -349,19 +349,19 @@ namespace MES.Form this.toolStripMenuItemAdd, this.toolStripMenuItemDel}); this.contextMenuStrip1.Name = "contextMenuStrip1"; - this.contextMenuStrip1.Size = new System.Drawing.Size(181, 70); + this.contextMenuStrip1.Size = new System.Drawing.Size(113, 48); // // toolStripMenuItemAdd // this.toolStripMenuItemAdd.Name = "toolStripMenuItemAdd"; - this.toolStripMenuItemAdd.Size = new System.Drawing.Size(180, 22); + 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(180, 22); + this.toolStripMenuItemDel.Size = new System.Drawing.Size(112, 22); this.toolStripMenuItemDel.Text = "删除行"; this.toolStripMenuItemDel.Click += new System.EventHandler(this.toolStripMenuItemDel_Click); // @@ -563,7 +563,7 @@ namespace MES.Form // this.txtid.Location = new System.Drawing.Point(87, 12); this.txtid.Name = "txtid"; - this.txtid.Size = new System.Drawing.Size(556, 20); + this.txtid.Size = new System.Drawing.Size(555, 20); this.txtid.StyleController = this.layoutControl1; this.txtid.TabIndex = 1; // @@ -571,7 +571,7 @@ namespace MES.Form // this.txtreturndate.EditValue = null; this.txtreturndate.ImeMode = System.Windows.Forms.ImeMode.Off; - this.txtreturndate.Location = new System.Drawing.Point(722, 60); + this.txtreturndate.Location = new System.Drawing.Point(721, 60); this.txtreturndate.Name = "txtreturndate"; this.txtreturndate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); @@ -585,7 +585,7 @@ namespace MES.Form // // txtsuppliercode // - this.txtsuppliercode.Location = new System.Drawing.Point(722, 36); + this.txtsuppliercode.Location = new System.Drawing.Point(721, 36); this.txtsuppliercode.Name = "txtsuppliercode"; this.txtsuppliercode.Size = new System.Drawing.Size(557, 20); this.txtsuppliercode.StyleController = this.layoutControl1; @@ -602,7 +602,7 @@ namespace MES.Form this.txtsupplierid.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; this.txtsupplierid.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; this.txtsupplierid.Properties.ValueMember = "ID"; - this.txtsupplierid.Size = new System.Drawing.Size(556, 20); + this.txtsupplierid.Size = new System.Drawing.Size(555, 20); this.txtsupplierid.StyleController = this.layoutControl1; this.txtsupplierid.TabIndex = 4; this.txtsupplierid.EditValueChanged += new System.EventHandler(this.txtsupplierid_EditValueChanged); @@ -618,13 +618,13 @@ 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(556, 20); + this.txtcreatorId.Size = new System.Drawing.Size(555, 20); this.txtcreatorId.StyleController = this.layoutControl1; this.txtcreatorId.TabIndex = 5; // // txtreturnbuyercode // - this.txtreturnbuyercode.Location = new System.Drawing.Point(722, 12); + this.txtreturnbuyercode.Location = new System.Drawing.Point(721, 12); this.txtreturnbuyercode.Name = "txtreturnbuyercode"; this.txtreturnbuyercode.Size = new System.Drawing.Size(557, 20); this.txtreturnbuyercode.StyleController = this.layoutControl1; @@ -634,7 +634,7 @@ namespace MES.Form // this.txttotalprice.Location = new System.Drawing.Point(87, 84); this.txttotalprice.Name = "txttotalprice"; - this.txttotalprice.Size = new System.Drawing.Size(1192, 20); + this.txttotalprice.Size = new System.Drawing.Size(1191, 20); this.txttotalprice.StyleController = this.layoutControl1; this.txttotalprice.TabIndex = 7; // @@ -642,7 +642,7 @@ namespace MES.Form // this.txtremark.Location = new System.Drawing.Point(87, 108); this.txtremark.Name = "txtremark"; - this.txtremark.Size = new System.Drawing.Size(1192, 20); + this.txtremark.Size = new System.Drawing.Size(1191, 20); this.txtremark.StyleController = this.layoutControl1; this.txtremark.TabIndex = 8; // @@ -661,7 +661,7 @@ namespace MES.Form this.layoutControlItem4, this.layoutControlItem3}); this.layoutControlGroup1.Name = "layoutControlGroup1"; - this.layoutControlGroup1.Size = new System.Drawing.Size(1291, 736); + this.layoutControlGroup1.Size = new System.Drawing.Size(1290, 733); this.layoutControlGroup1.TextVisible = false; // // layoutControlItem1 @@ -670,7 +670,7 @@ namespace MES.Form this.layoutControlItem1.CustomizationFormText = "id"; this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); this.layoutControlItem1.Name = "layoutControlItem1"; - this.layoutControlItem1.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem1.Size = new System.Drawing.Size(634, 24); this.layoutControlItem1.Text = "id"; this.layoutControlItem1.TextSize = new System.Drawing.Size(72, 14); // @@ -680,7 +680,7 @@ namespace MES.Form 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.Size = new System.Drawing.Size(634, 24); this.layoutControlItem5.Text = "制单人"; this.layoutControlItem5.TextSize = new System.Drawing.Size(72, 14); // @@ -690,7 +690,7 @@ namespace MES.Form this.layoutControlItem7.CustomizationFormText = "金额"; this.layoutControlItem7.Location = new System.Drawing.Point(0, 72); this.layoutControlItem7.Name = "layoutControlItem7"; - this.layoutControlItem7.Size = new System.Drawing.Size(1271, 24); + this.layoutControlItem7.Size = new System.Drawing.Size(1270, 24); this.layoutControlItem7.Text = "金额"; this.layoutControlItem7.TextSize = new System.Drawing.Size(72, 14); // @@ -700,7 +700,7 @@ namespace MES.Form this.layoutControlItem8.CustomizationFormText = "备注"; this.layoutControlItem8.Location = new System.Drawing.Point(0, 96); this.layoutControlItem8.Name = "layoutControlItem8"; - this.layoutControlItem8.Size = new System.Drawing.Size(1271, 24); + this.layoutControlItem8.Size = new System.Drawing.Size(1270, 24); this.layoutControlItem8.Text = "备注"; this.layoutControlItem8.TextSize = new System.Drawing.Size(72, 14); // @@ -708,7 +708,7 @@ namespace MES.Form // this.layoutControlItem6.Control = this.txtreturnbuyercode; this.layoutControlItem6.CustomizationFormText = "采购退货单号"; - this.layoutControlItem6.Location = new System.Drawing.Point(635, 0); + this.layoutControlItem6.Location = new System.Drawing.Point(634, 0); this.layoutControlItem6.Name = "layoutControlItem6"; this.layoutControlItem6.Size = new System.Drawing.Size(636, 24); this.layoutControlItem6.Text = "采购退货单号"; @@ -718,7 +718,7 @@ namespace MES.Form // this.layoutControlItem2.Control = this.txtreturndate; this.layoutControlItem2.CustomizationFormText = "退货日期"; - this.layoutControlItem2.Location = new System.Drawing.Point(635, 48); + this.layoutControlItem2.Location = new System.Drawing.Point(634, 48); this.layoutControlItem2.Name = "layoutControlItem2"; this.layoutControlItem2.Size = new System.Drawing.Size(636, 24); this.layoutControlItem2.Text = "退货日期"; @@ -729,7 +729,7 @@ namespace MES.Form this.layoutControlItem9.Control = this.xtraTabControl2; this.layoutControlItem9.Location = new System.Drawing.Point(0, 120); this.layoutControlItem9.Name = "layoutControlItem9"; - this.layoutControlItem9.Size = new System.Drawing.Size(1271, 596); + this.layoutControlItem9.Size = new System.Drawing.Size(1270, 593); this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem9.TextVisible = false; // @@ -739,7 +739,7 @@ namespace MES.Form 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.Size = new System.Drawing.Size(634, 24); this.layoutControlItem4.Text = "供应商名称"; this.layoutControlItem4.TextSize = new System.Drawing.Size(72, 14); // @@ -747,7 +747,7 @@ namespace MES.Form // this.layoutControlItem3.Control = this.txtsuppliercode; this.layoutControlItem3.CustomizationFormText = "供应商编号"; - this.layoutControlItem3.Location = new System.Drawing.Point(635, 24); + this.layoutControlItem3.Location = new System.Drawing.Point(634, 24); this.layoutControlItem3.Name = "layoutControlItem3"; this.layoutControlItem3.Size = new System.Drawing.Size(636, 24); this.layoutControlItem3.Text = "供应商编号"; diff --git a/WinformGeneralDeveloperFrame/Form/FrmproductMaterialOutWarehouse.cs b/WinformGeneralDeveloperFrame/Form/FrmproductMaterialOutWarehouse.cs new file mode 100644 index 0000000..7422844 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmproductMaterialOutWarehouse.cs @@ -0,0 +1,151 @@ +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 FrmproductMaterialOutWarehouse : FrmBaseForm + { + private Dictionary fieldDictionary = new Dictionary(); + public FrmproductMaterialOutWarehouse() + { + InitializeComponent(); + } + private void FrmproductMaterialOutWarehouse_Load(object sender, EventArgs e) + { + InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new productMaterialOutWarehouseInfo()); + InitSearchDicData(); + } + /// + /// 数据源初始化 + /// + /// + private void Init() + { + txtdept.Properties.DataSource = GetDataTableUtils.SqlTable("部门"); + repositoryItemTreeListtxtdept.DataSource= GetDataTableUtils.SqlTable("部门"); + txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户"); + repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户"); + } + /// + /// 搜索字段 + /// + /// + private void InitSearchDicData() + { + fieldDictionary.Add("生产领料出库单号","code"); + } + + public override void InitgrdListDataSource() + { + using (var con=new MESDB())/// + { + grdList.DataSource=con.productMaterialOutWarehouseInfo.ToList(); + } + Init(); + } + /// + /// 字段为空校验 + /// + /// + public override bool CheckInput() + { + if(string.IsNullOrEmpty(txtdept.EditValue.ToString())) + { + "领料单位不能为空".ShowWarning(); + txtdept.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtouttime.EditValue.ToString())) + { + "出库日期不能为空".ShowWarning(); + txtouttime.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtcreatorId.EditValue.ToString())) + { + "制单人不能为空".ShowWarning(); + txtcreatorId.Focus(); + return false; + } + return true; + } + /// + /// 保存 + /// + /// + public override bool SaveFunction() + { + try + { + productMaterialOutWarehouseInfo info= (productMaterialOutWarehouseInfo)this.ControlDataToModel(new productMaterialOutWarehouseInfo()); + using (var db = new MESDB()) + { + db.productMaterialOutWarehouseInfo.AddOrUpdate(info); + db.SaveChanges(); + } + } + catch (Exception ex) + { + ex.Message.ShowError(); + return false; + } + return true; + } + /// + /// 删除 + /// + /// + public override bool DelFunction() + { + try + { + productMaterialOutWarehouseInfo info = (productMaterialOutWarehouseInfo)this.ControlDataToModel(new productMaterialOutWarehouseInfo()); + 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.productMaterialOutWarehouseInfo.SqlQuery("select * from productMaterialOutWarehouse").ToList(); + } + else + { + grdList.DataSource = db.productMaterialOutWarehouseInfo.SqlQuery($"select * from productMaterialOutWarehouse where {sql}").ToList(); + } + } + } + } + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmproductMaterialOutWarehouse.designer.cs b/WinformGeneralDeveloperFrame/Form/FrmproductMaterialOutWarehouse.designer.cs new file mode 100644 index 0000000..79df0fd --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmproductMaterialOutWarehouse.designer.cs @@ -0,0 +1,523 @@ + +using DevExpress.XtraEditors; +using DevExpress.XtraLayout; +using DevExpress.XtraTab; + +namespace MES.Form +{ + partial class FrmproductMaterialOutWarehouse + { + /// + /// 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.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.txtcode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.txtdeptTreeList = new DevExpress.XtraTreeList.TreeList(); + this.repositoryItemTreeListtxtdept = new DevExpress.XtraEditors.Repository.RepositoryItemTreeListLookUpEdit(); + this.repositoryItemTreeListtxtdeptTreeList = new DevExpress.XtraTreeList.TreeList(); + + this.txtdept=new DevExpress.XtraEditors.TreeListLookUpEdit(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtouttime=new DevExpress.XtraEditors.DateEdit(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.repositoryItemtxtcreatorId = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + + this.txtcreatorId=new DevExpress.XtraEditors.LookUpEdit(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtremark=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem6 = 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.txtcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtdeptTreeList)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtdept)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtdeptTreeList)).BeginInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtdept.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtouttime.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtouttime.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).BeginInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).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.txtcode); + this.layoutControl1.Controls.Add(this.txtdept); + this.layoutControl1.Controls.Add(this.txtouttime); + this.layoutControl1.Controls.Add(this.txtcreatorId); + 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); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtcode.Location = new System.Drawing.Point(112, 36); + this.txtcode.Name = "txtcode"; + this.txtcode.Size = new System.Drawing.Size(481, 20); + this.txtcode.StyleController = this.layoutControl1; + this.txtcode.TabIndex = 2; + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.txtcode; + 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); + + // + // treeListLookUpEdit1 + // + this.txtdept.EditValue = ""; + this.txtdept.Location = new System.Drawing.Point(120, 84); + this.txtdept.Name = "txtdept"; + this.txtdept.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtdept.Properties.DisplayMember = "Name"; + this.txtdept.Properties.TreeList = this.txtdeptTreeList; + this.txtdept.Properties.ValueMember = "ID"; + this.txtdept.Size = new System.Drawing.Size(932, 20); + this.txtdept.StyleController = this.layoutControl1; + this.txtdept.TabIndex = 3; + // + // treeListLookUpEdit1TreeList + // + this.txtdeptTreeList.Location = new System.Drawing.Point(0, 0); + this.txtdeptTreeList.Name = "txtdeptTreeList"; + this.txtdeptTreeList.OptionsView.ShowIndentAsRowStyle = true; + this.txtdeptTreeList.ParentFieldName = "PID"; + this.txtdeptTreeList.Size = new System.Drawing.Size(400, 200); + this.txtdeptTreeList.TabIndex = 0; + + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.txtdept; + this.layoutControlItem3.CustomizationFormText = "领料单位"; + 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 = "领料单位"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtouttime.EditValue = null; + this.txtouttime.ImeMode = System.Windows.Forms.ImeMode.Off; + this.txtouttime.Location = new System.Drawing.Point(112, 84); + this.txtouttime.Name = "txtouttime"; + this.txtouttime.Properties.DisplayFormat.FormatString = "G"; + this.txtouttime.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.txtouttime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtouttime.Properties.VistaTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton()}); + this.txtouttime.Size = new System.Drawing.Size(481, 20); + this.txtouttime.StyleController = this.layoutControl1; + this.txtouttime.TabIndex = 4; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.txtouttime; + this.layoutControlItem4.CustomizationFormText = "出库日期"; + 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 = "出库日期"; + this.layoutControlItem4.TextSize = new System.Drawing.Size(96, 14); + + // + // lookUpEdit1 + // + this.txtcreatorId.Location = new System.Drawing.Point(120, 60); + this.txtcreatorId.Name = "txtcreatorId"; + this.txtcreatorId.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtcreatorId.Properties.DisplayMember = "Name"; + this.txtcreatorId.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtcreatorId.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtcreatorId.Properties.ValueMember = "ID"; + this.txtcreatorId.Size = new System.Drawing.Size(932, 20); + this.txtcreatorId.StyleController = this.layoutControl1; + this.txtcreatorId.TabIndex = 5; + this.txtcreatorId.EditValue = ""; + + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.txtcreatorId; + 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.txtremark.Location = new System.Drawing.Point(112, 132); + this.txtremark.Name = "txtremark"; + this.txtremark.Size = new System.Drawing.Size(481, 20); + this.txtremark.StyleController = this.layoutControl1; + this.txtremark.TabIndex = 6; + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.txtremark; + this.layoutControlItem6.CustomizationFormText = "备注"; + 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 = "备注"; + this.layoutControlItem6.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.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.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"; + //////////////////////////////// + (this.gridColumn2).Caption = "生产领料出库单号"; + (this.gridColumn2).Name = "gridColumn2"; + (this.gridColumn2).FieldName = "code"; + (this.gridColumn2).Visible = true; + (this.gridColumn2).VisibleIndex = 2; + + // repositoryItemTreeListLookUpEdit1 + // + (this.gridColumn3).ColumnEdit = this.repositoryItemTreeListtxtdept; + this.repositoryItemTreeListtxtdept.AutoHeight = false; + this.repositoryItemTreeListtxtdept.DisplayMember = "Name"; + this.repositoryItemTreeListtxtdept.ValueMember = "ID"; + this.repositoryItemTreeListtxtdept.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemTreeListtxtdept.Name = "repositoryItemTreeListtxtdept"; + this.repositoryItemTreeListtxtdept.TreeList = this.repositoryItemTreeListtxtdeptTreeList; + // + // repositoryItemTreeListLookUpEdit1TreeList + // + this.repositoryItemTreeListtxtdeptTreeList.Location = new System.Drawing.Point(0, 0); + this.repositoryItemTreeListtxtdeptTreeList.ParentFieldName = "PID"; + this.repositoryItemTreeListtxtdeptTreeList.Name = "repositoryItemTreeListtxtdeptTreeList"; + this.repositoryItemTreeListtxtdeptTreeList.OptionsView.ShowIndentAsRowStyle = true; + this.repositoryItemTreeListtxtdeptTreeList.Size = new System.Drawing.Size(400, 200); + this.repositoryItemTreeListtxtdeptTreeList.TabIndex = 0; + (this.gridColumn3).Caption = "领料单位"; + (this.gridColumn3).Name = "gridColumn3"; + (this.gridColumn3).FieldName = "dept"; + (this.gridColumn3).Visible = true; + (this.gridColumn3).VisibleIndex = 3; + + (this.gridColumn4).DisplayFormat.FormatString = "G"; + (this.gridColumn4).DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + (this.gridColumn4).Caption = "出库日期"; + (this.gridColumn4).Name = "gridColumn4"; + (this.gridColumn4).FieldName = "outtime"; + (this.gridColumn4).Visible = true; + (this.gridColumn4).VisibleIndex = 4; + + (this.gridColumn5).ColumnEdit = this.repositoryItemtxtcreatorId; + this.repositoryItemtxtcreatorId.AutoHeight = false; + this.repositoryItemtxtcreatorId.DisplayMember = "Name"; + this.repositoryItemtxtcreatorId.ValueMember = "ID"; + this.repositoryItemtxtcreatorId.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtcreatorId.Name = "repositoryItemtxtcreatorId"; + (this.gridColumn5).Caption = "制单人"; + (this.gridColumn5).Name = "gridColumn5"; + (this.gridColumn5).FieldName = "creatorId"; + (this.gridColumn5).Visible = true; + (this.gridColumn5).VisibleIndex = 5; + + //////////////////////////////// + (this.gridColumn6).Caption = "备注"; + (this.gridColumn6).Name = "gridColumn6"; + (this.gridColumn6).FieldName = "remark"; + (this.gridColumn6).Visible = true; + (this.gridColumn6).VisibleIndex = 6; + + + // + // 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 = "FrmproductMaterialOutWarehouse"; + this.Text = "FrmproductMaterialOutWarehouse"; + this.Load += new System.EventHandler(this.FrmproductMaterialOutWarehouse_Load); + this.Controls.SetChildIndex(this.xtraTabControl1, 0); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtdeptTreeList)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtdept)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtdeptTreeList)).EndInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtdept.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtouttime.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtouttime.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).EndInit(); + + ((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).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.XtraEditors.TextEdit txtid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtcode; + private DevExpress.XtraTreeList.TreeList txtdeptTreeList; + private DevExpress.XtraEditors.Repository.RepositoryItemTreeListLookUpEdit repositoryItemTreeListtxtdept; + private DevExpress.XtraTreeList.TreeList repositoryItemTreeListtxtdeptTreeList; + + private DevExpress.XtraEditors.TreeListLookUpEdit txtdept; + /////////////////////////////// + private DevExpress.XtraEditors.DateEdit txtouttime; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtcreatorId; + + private DevExpress.XtraEditors.LookUpEdit txtcreatorId; + /////////////////////////////// + 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; + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmproductMaterialOutWarehouseDetail.cs b/WinformGeneralDeveloperFrame/Form/FrmproductMaterialOutWarehouseDetail.cs new file mode 100644 index 0000000..1f356ea --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmproductMaterialOutWarehouseDetail.cs @@ -0,0 +1,227 @@ +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 FrmproductMaterialOutWarehouseDetail : FrmBaseForm + { + private Dictionary fieldDictionary = new Dictionary(); + public FrmproductMaterialOutWarehouseDetail() + { + InitializeComponent(); + } + private void FrmproductMaterialOutWarehouseDetail_Load(object sender, EventArgs e) + { + InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new productMaterialOutWarehouseDetailInfo()); + InitSearchDicData(); + } + /// + /// 数据源初始化 + /// + /// + private void Init() + { + } + /// + /// 搜索字段 + /// + /// + private void InitSearchDicData() + { + fieldDictionary.Add("id","id"); + fieldDictionary.Add("主表id","masterid"); + fieldDictionary.Add("生产领料出库单号","mastercode"); + fieldDictionary.Add("生产领料出库明细单号","detailcode"); + fieldDictionary.Add("生产领料单号","pickcode"); + fieldDictionary.Add("生产领料明细单号","pickdetailcode"); + fieldDictionary.Add("工单号","wocode"); + fieldDictionary.Add("物料","materialid"); + fieldDictionary.Add("物料编码","materialcode"); + fieldDictionary.Add("规格型号","materialspec"); + fieldDictionary.Add("物料类型","materialtype"); + fieldDictionary.Add("出库数量","number"); + fieldDictionary.Add("计量单位","unit"); + fieldDictionary.Add("仓库","warehouse"); + fieldDictionary.Add("备注","remark"); + } + + public override void InitgrdListDataSource() + { + using (var con=new MESDB())/// + { + grdList.DataSource=con.productMaterialOutWarehouseDetailInfo.ToList(); + } + Init(); + } + /// + /// 字段为空校验 + /// + /// + public override bool CheckInput() + { + if(string.IsNullOrEmpty(txtmasterid.EditValue.ToString())) + { + "主表id不能为空".ShowWarning(); + txtmasterid.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtmastercode.EditValue.ToString())) + { + "生产领料出库单号不能为空".ShowWarning(); + txtmastercode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtdetailcode.EditValue.ToString())) + { + "生产领料出库明细单号不能为空".ShowWarning(); + txtdetailcode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtpickcode.EditValue.ToString())) + { + "生产领料单号不能为空".ShowWarning(); + txtpickcode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtpickdetailcode.EditValue.ToString())) + { + "生产领料明细单号不能为空".ShowWarning(); + txtpickdetailcode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtwocode.EditValue.ToString())) + { + "工单号不能为空".ShowWarning(); + txtwocode.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtmaterialid.EditValue.ToString())) + { + "物料不能为空".ShowWarning(); + txtmaterialid.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(txtnumber.EditValue.ToString())) + { + "出库数量不能为空".ShowWarning(); + txtnumber.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(txtremark.EditValue.ToString())) + { + "备注不能为空".ShowWarning(); + txtremark.Focus(); + return false; + } + return true; + } + /// + /// 保存 + /// + /// + public override bool SaveFunction() + { + try + { + productMaterialOutWarehouseDetailInfo info= (productMaterialOutWarehouseDetailInfo)this.ControlDataToModel(new productMaterialOutWarehouseDetailInfo()); + using (var db = new MESDB()) + { + db.productMaterialOutWarehouseDetailInfo.AddOrUpdate(info); + db.SaveChanges(); + } + } + catch (Exception ex) + { + ex.Message.ShowError(); + return false; + } + return true; + } + /// + /// 删除 + /// + /// + public override bool DelFunction() + { + try + { + productMaterialOutWarehouseDetailInfo info = (productMaterialOutWarehouseDetailInfo)this.ControlDataToModel(new productMaterialOutWarehouseDetailInfo()); + 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.productMaterialOutWarehouseDetailInfo.SqlQuery("select * from productMaterialOutWarehouseDetail").ToList(); + } + else + { + grdList.DataSource = db.productMaterialOutWarehouseDetailInfo.SqlQuery($"select * from productMaterialOutWarehouseDetail where {sql}").ToList(); + } + } + } + } + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmproductMaterialOutWarehouseDetail.designer.cs b/WinformGeneralDeveloperFrame/Form/FrmproductMaterialOutWarehouseDetail.designer.cs new file mode 100644 index 0000000..e32bade --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmproductMaterialOutWarehouseDetail.designer.cs @@ -0,0 +1,840 @@ + +using DevExpress.XtraEditors; +using DevExpress.XtraLayout; +using DevExpress.XtraTab; + +namespace MES.Form +{ + partial class FrmproductMaterialOutWarehouseDetail + { + /// + /// 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.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.txtmasterid=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtmastercode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtdetailcode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtpickcode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtpickdetailcode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtwocode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtmaterialid=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtmaterialcode=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtmaterialspec=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtmaterialtype=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtnumber=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtunit=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtwarehouse=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); + ////////////////////// + this.txtremark=new DevExpress.XtraEditors.TextEdit(); + this.layoutControlItem15 = 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.txtmasterid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmastercode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtdetailcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtpickcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtpickdetailcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtwocode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialspec.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialtype.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtnumber.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).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.txtmasterid); + this.layoutControl1.Controls.Add(this.txtmastercode); + this.layoutControl1.Controls.Add(this.txtdetailcode); + this.layoutControl1.Controls.Add(this.txtpickcode); + this.layoutControl1.Controls.Add(this.txtpickdetailcode); + this.layoutControl1.Controls.Add(this.txtwocode); + this.layoutControl1.Controls.Add(this.txtmaterialid); + this.layoutControl1.Controls.Add(this.txtmaterialcode); + this.layoutControl1.Controls.Add(this.txtmaterialspec); + this.layoutControl1.Controls.Add(this.txtmaterialtype); + this.layoutControl1.Controls.Add(this.txtnumber); + this.layoutControl1.Controls.Add(this.txtunit); + this.layoutControl1.Controls.Add(this.txtwarehouse); + 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); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtmasterid.Location = new System.Drawing.Point(112, 36); + this.txtmasterid.Name = "txtmasterid"; + this.txtmasterid.Size = new System.Drawing.Size(481, 20); + this.txtmasterid.StyleController = this.layoutControl1; + this.txtmasterid.TabIndex = 2; + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.txtmasterid; + this.layoutControlItem2.CustomizationFormText = "主表id"; + 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 = "主表id"; + this.layoutControlItem2.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtmastercode.Location = new System.Drawing.Point(112, 60); + this.txtmastercode.Name = "txtmastercode"; + this.txtmastercode.Size = new System.Drawing.Size(481, 20); + this.txtmastercode.StyleController = this.layoutControl1; + this.txtmastercode.TabIndex = 3; + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.txtmastercode; + this.layoutControlItem3.CustomizationFormText = "生产领料出库单号"; + 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 = "生产领料出库单号"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtdetailcode.Location = new System.Drawing.Point(112, 84); + this.txtdetailcode.Name = "txtdetailcode"; + this.txtdetailcode.Size = new System.Drawing.Size(481, 20); + this.txtdetailcode.StyleController = this.layoutControl1; + this.txtdetailcode.TabIndex = 4; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.txtdetailcode; + this.layoutControlItem4.CustomizationFormText = "生产领料出库明细单号"; + 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 = "生产领料出库明细单号"; + this.layoutControlItem4.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtpickcode.Location = new System.Drawing.Point(112, 108); + this.txtpickcode.Name = "txtpickcode"; + this.txtpickcode.Size = new System.Drawing.Size(481, 20); + this.txtpickcode.StyleController = this.layoutControl1; + this.txtpickcode.TabIndex = 5; + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.txtpickcode; + 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.txtpickdetailcode.Location = new System.Drawing.Point(112, 132); + this.txtpickdetailcode.Name = "txtpickdetailcode"; + this.txtpickdetailcode.Size = new System.Drawing.Size(481, 20); + this.txtpickdetailcode.StyleController = this.layoutControl1; + this.txtpickdetailcode.TabIndex = 6; + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.txtpickdetailcode; + this.layoutControlItem6.CustomizationFormText = "生产领料明细单号"; + 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 = "生产领料明细单号"; + this.layoutControlItem6.TextSize = new System.Drawing.Size(96, 14); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtwocode.Location = new System.Drawing.Point(112, 156); + this.txtwocode.Name = "txtwocode"; + this.txtwocode.Size = new System.Drawing.Size(481, 20); + this.txtwocode.StyleController = this.layoutControl1; + this.txtwocode.TabIndex = 7; + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.txtwocode; + 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.txtmaterialid.Location = new System.Drawing.Point(112, 180); + this.txtmaterialid.Name = "txtmaterialid"; + this.txtmaterialid.Size = new System.Drawing.Size(481, 20); + this.txtmaterialid.StyleController = this.layoutControl1; + this.txtmaterialid.TabIndex = 8; + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.txtmaterialid; + 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.txtmaterialcode.Location = new System.Drawing.Point(112, 204); + this.txtmaterialcode.Name = "txtmaterialcode"; + this.txtmaterialcode.Size = new System.Drawing.Size(481, 20); + this.txtmaterialcode.StyleController = this.layoutControl1; + this.txtmaterialcode.TabIndex = 9; + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.txtmaterialcode; + 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); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtmaterialspec.Location = new System.Drawing.Point(112, 228); + this.txtmaterialspec.Name = "txtmaterialspec"; + this.txtmaterialspec.Size = new System.Drawing.Size(481, 20); + this.txtmaterialspec.StyleController = this.layoutControl1; + this.txtmaterialspec.TabIndex = 10; + // + // layoutControlItem10 + // + this.layoutControlItem10.Control = this.txtmaterialspec; + 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.txtmaterialtype.Location = new System.Drawing.Point(112, 252); + this.txtmaterialtype.Name = "txtmaterialtype"; + this.txtmaterialtype.Size = new System.Drawing.Size(481, 20); + this.txtmaterialtype.StyleController = this.layoutControl1; + this.txtmaterialtype.TabIndex = 11; + // + // layoutControlItem11 + // + this.layoutControlItem11.Control = this.txtmaterialtype; + 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); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtnumber.Location = new System.Drawing.Point(112, 276); + this.txtnumber.Name = "txtnumber"; + this.txtnumber.Size = new System.Drawing.Size(481, 20); + this.txtnumber.StyleController = this.layoutControl1; + this.txtnumber.TabIndex = 12; + // + // layoutControlItem12 + // + this.layoutControlItem12.Control = this.txtnumber; + 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); + + // + // txt${ColumnInfo.Name.Alias.ToCapit()} + // + this.txtunit.Location = new System.Drawing.Point(112, 300); + this.txtunit.Name = "txtunit"; + this.txtunit.Size = new System.Drawing.Size(481, 20); + this.txtunit.StyleController = this.layoutControl1; + this.txtunit.TabIndex = 13; + // + // layoutControlItem13 + // + this.layoutControlItem13.Control = this.txtunit; + 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.txtwarehouse.Location = new System.Drawing.Point(112, 324); + this.txtwarehouse.Name = "txtwarehouse"; + this.txtwarehouse.Size = new System.Drawing.Size(481, 20); + this.txtwarehouse.StyleController = this.layoutControl1; + this.txtwarehouse.TabIndex = 14; + // + // layoutControlItem14 + // + this.layoutControlItem14.Control = this.txtwarehouse; + 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.txtremark.Location = new System.Drawing.Point(112, 348); + this.txtremark.Name = "txtremark"; + this.txtremark.Size = new System.Drawing.Size(481, 20); + this.txtremark.StyleController = this.layoutControl1; + this.txtremark.TabIndex = 15; + // + // layoutControlItem15 + // + this.layoutControlItem15.Control = this.txtremark; + 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); + + + // + // 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.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.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"; + (this.gridColumn1).Visible = true; + (this.gridColumn1).VisibleIndex = 1; + + //////////////////////////////// + (this.gridColumn2).Caption = "主表id"; + (this.gridColumn2).Name = "gridColumn2"; + (this.gridColumn2).FieldName = "masterid"; + (this.gridColumn2).Visible = true; + (this.gridColumn2).VisibleIndex = 2; + + //////////////////////////////// + (this.gridColumn3).Caption = "生产领料出库单号"; + (this.gridColumn3).Name = "gridColumn3"; + (this.gridColumn3).FieldName = "mastercode"; + (this.gridColumn3).Visible = true; + (this.gridColumn3).VisibleIndex = 3; + + //////////////////////////////// + (this.gridColumn4).Caption = "生产领料出库明细单号"; + (this.gridColumn4).Name = "gridColumn4"; + (this.gridColumn4).FieldName = "detailcode"; + (this.gridColumn4).Visible = true; + (this.gridColumn4).VisibleIndex = 4; + + //////////////////////////////// + (this.gridColumn5).Caption = "生产领料单号"; + (this.gridColumn5).Name = "gridColumn5"; + (this.gridColumn5).FieldName = "pickcode"; + (this.gridColumn5).Visible = true; + (this.gridColumn5).VisibleIndex = 5; + + //////////////////////////////// + (this.gridColumn6).Caption = "生产领料明细单号"; + (this.gridColumn6).Name = "gridColumn6"; + (this.gridColumn6).FieldName = "pickdetailcode"; + (this.gridColumn6).Visible = true; + (this.gridColumn6).VisibleIndex = 6; + + //////////////////////////////// + (this.gridColumn7).Caption = "工单号"; + (this.gridColumn7).Name = "gridColumn7"; + (this.gridColumn7).FieldName = "wocode"; + (this.gridColumn7).Visible = true; + (this.gridColumn7).VisibleIndex = 7; + + //////////////////////////////// + (this.gridColumn8).Caption = "物料"; + (this.gridColumn8).Name = "gridColumn8"; + (this.gridColumn8).FieldName = "materialid"; + (this.gridColumn8).Visible = true; + (this.gridColumn8).VisibleIndex = 8; + + //////////////////////////////// + (this.gridColumn9).Caption = "物料编码"; + (this.gridColumn9).Name = "gridColumn9"; + (this.gridColumn9).FieldName = "materialcode"; + (this.gridColumn9).Visible = true; + (this.gridColumn9).VisibleIndex = 9; + + //////////////////////////////// + (this.gridColumn10).Caption = "规格型号"; + (this.gridColumn10).Name = "gridColumn10"; + (this.gridColumn10).FieldName = "materialspec"; + (this.gridColumn10).Visible = true; + (this.gridColumn10).VisibleIndex = 10; + + //////////////////////////////// + (this.gridColumn11).Caption = "物料类型"; + (this.gridColumn11).Name = "gridColumn11"; + (this.gridColumn11).FieldName = "materialtype"; + (this.gridColumn11).Visible = true; + (this.gridColumn11).VisibleIndex = 11; + + //////////////////////////////// + (this.gridColumn12).Caption = "出库数量"; + (this.gridColumn12).Name = "gridColumn12"; + (this.gridColumn12).FieldName = "number"; + (this.gridColumn12).Visible = true; + (this.gridColumn12).VisibleIndex = 12; + + //////////////////////////////// + (this.gridColumn13).Caption = "计量单位"; + (this.gridColumn13).Name = "gridColumn13"; + (this.gridColumn13).FieldName = "unit"; + (this.gridColumn13).Visible = true; + (this.gridColumn13).VisibleIndex = 13; + + //////////////////////////////// + (this.gridColumn14).Caption = "仓库"; + (this.gridColumn14).Name = "gridColumn14"; + (this.gridColumn14).FieldName = "warehouse"; + (this.gridColumn14).Visible = true; + (this.gridColumn14).VisibleIndex = 14; + + //////////////////////////////// + (this.gridColumn15).Caption = "备注"; + (this.gridColumn15).Name = "gridColumn15"; + (this.gridColumn15).FieldName = "remark"; + (this.gridColumn15).Visible = true; + (this.gridColumn15).VisibleIndex = 15; + + + // + // 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 = "FrmproductMaterialOutWarehouseDetail"; + this.Text = "FrmproductMaterialOutWarehouseDetail"; + this.Load += new System.EventHandler(this.FrmproductMaterialOutWarehouseDetail_Load); + this.Controls.SetChildIndex(this.xtraTabControl1, 0); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmasterid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmastercode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtdetailcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtpickcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtpickdetailcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtwocode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialspec.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtmaterialtype.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtnumber.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit(); + ///////////////////////// + ((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).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.XtraEditors.TextEdit txtid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmasterid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmastercode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtdetailcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtpickcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtpickdetailcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtwocode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmaterialid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmaterialcode; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmaterialspec; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtmaterialtype; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtnumber; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtunit; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtwarehouse; + /////////////////////////////// + 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; + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmproductionMaterialReturn.cs b/WinformGeneralDeveloperFrame/Form/FrmproductionMaterialReturn.cs new file mode 100644 index 0000000..19cf26f --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmproductionMaterialReturn.cs @@ -0,0 +1,309 @@ +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 FrmproductionMaterialReturn : FrmBaseForm + { + private Dictionary fieldDictionary = new Dictionary(); + public FrmproductionMaterialReturn() + { + InitializeComponent(); + } + private void FrmproductionMaterialReturn_Load(object sender, EventArgs e) + { + InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new productionMaterialReturnInfo(),gridControl1,new []{ "txtcode" }); + InitSearchDicData(); + repositoryItemTextEditpickdetailcode.KeyDown += RepositoryItemTextEditpickdetailcode_KeyDown; + } + + private void RepositoryItemTextEditpickdetailcode_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Tab) + { + using (var db = new MESDB()) + { + string code = gridView1.EditingValue.ToString(); + if (!string.IsNullOrEmpty(code)) + { + productionRequisitionDetailInfo buyerdetailInfo = db.productionRequisitionDetailInfo + .Where(p => p.detailcode==code).FirstOrDefault(); + if (buyerdetailInfo == null) + { + "单号不存在".ShowWarning(); + } + else + { + gridView1.GetFocusedDataRow()["pickdetailcode"] = buyerdetailInfo.detailcode; + gridView1.GetFocusedDataRow()["pickcode"] = buyerdetailInfo.mastercode; + gridView1.GetFocusedDataRow()["wocode"] = buyerdetailInfo.wocode; + gridView1.GetFocusedDataRow()["materialid"] = buyerdetailInfo.materialid; + gridView1.GetFocusedDataRow()["materialcode"] = buyerdetailInfo.materialcode; + gridView1.GetFocusedDataRow()["materialspec"] = buyerdetailInfo.materialspec; + gridView1.GetFocusedDataRow()["unit"] = buyerdetailInfo.unit; + gridView1.GetFocusedDataRow()["warehouse"] = buyerdetailInfo.warehouse; + } + } + } + } + } + + /// + /// 数据源初始化 + /// + /// + private void Init() + { + txtreturndept.Properties.DataSource = GetDataTableUtils.SqlTable("部门"); + repositoryItemTreeListtxtreturndept.DataSource= GetDataTableUtils.SqlTable("部门"); + txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户"); + repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户"); + repositoryItemLookUpEditmaterialid.DataSource = GetDataTableUtils.SqlTable("物料"); + repositoryItemLookUpEditwarehouse.DataSource = GetDataTableUtils.SqlTable("仓库"); + repositoryItemLookUpEditunit.DataSource = GetDataTableUtils.SqlTable("计量单位"); + + } + /// + /// 搜索字段 + /// + /// + private void InitSearchDicData() + { + fieldDictionary.Add("退料单号","code"); + } + + public override void InitgrdListDataSource() + { + using (var con=new MESDB())/// + { + grdList.DataSource=con.productionMaterialReturnInfo.ToList(); + } + Init(); + } + /// + /// 字段为空校验 + /// + /// + public override bool CheckInput() + { + //if(string.IsNullOrEmpty(txtcode.EditValue.ToString())) + //{ + // "退料单号不能为空".ShowWarning(); + // txtcode.Focus(); + // return false; + //} + if(string.IsNullOrEmpty(txtreturntime.EditValue.ToString())) + { + "退料日期不能为空".ShowWarning(); + txtreturntime.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtreturndept.EditValue.ToString())) + { + "退料单位不能为空".ShowWarning(); + txtreturndept.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtcreatorId.EditValue.ToString())) + { + "制单人不能为空".ShowWarning(); + txtcreatorId.Focus(); + return false; + } + if(string.IsNullOrEmpty(txtcreateTime.EditValue.ToString())) + { + "制单日期不能为空".ShowWarning(); + txtcreateTime.Focus(); + return false; + } + return true; + } + /// + /// 保存 + /// + /// + public override bool SaveFunction() + { + string code = "MOR" + DateTime.Now.GetDateTimeCode(); + + DataTable dt = gridControl1.DataSource as DataTable; + try + { + productionMaterialReturnInfo info = (productionMaterialReturnInfo)this.ControlDataToModel(new productionMaterialReturnInfo()); + using (var db = new MESDB()) + { + using (var tran = db.Database.BeginTransaction()) + { + try + { + Dictionary> dic = + dt.GetDataTableData(); + if (info.id == 0) //新增 + { + info.code = code; + db.productionMaterialReturnInfo.Add(info); + db.SaveChanges(); + txtid.Text = info.id.ToString(); + txtcode.Text = code; + if (dt != null) + { + List detaiListAdd = + dic["Add"]; + int num = 0; + detaiListAdd.ForEach(a => + { + num++; + string codedetail = "MORD" + DateTime.Now.GetDateTimeCode() + num; + a.masterid = info.id; + a.mastercode = info.code; + a.detailcode = codedetail; + }); + db.productionMaterialReturnDetailInfo.AddRange(detaiListAdd); + db.SaveChanges(); + } + } + else //更新 + { + db.Entry(info).State = EntityState.Modified; + db.SaveChanges(); + if (dt != null) + { + List detaiListAdd = + dic["Add"]; + int num = 0; + detaiListAdd.ForEach(a => + { + a.masterid = info.id; + a.mastercode = info.code; + num++; + string codedetail = "MORD" + DateTime.Now.GetDateTimeCode() + num; + a.detailcode = codedetail; + }); + db.productionMaterialReturnDetailInfo.AddRange(detaiListAdd); + + List detaiListEdit = + dic["Edit"]; + + detaiListEdit.ForEach((a) => + { + //a.buyercode = info.buyercode; + db.Entry(a).State = EntityState.Modified; + }); + + List detaiListDel = + dic["Del"]; + detaiListDel.ForEach((a) => { db.Entry(a).State = EntityState.Deleted; }); + db.SaveChanges(); + } + } + + tran.Commit(); + } + catch (Exception ex) + { + tran.Rollback(); + ex.Message.ShowError(); + return false; + } + finally + { + tran.Dispose(); + } + } + } + } + catch (Exception ex) + { + ex.Message.ShowError(); + return false; + } + + return true; + } + /// + /// 删除 + /// + /// + public override bool DelFunction() + { + try + { + productionMaterialReturnInfo info = (productionMaterialReturnInfo)this.ControlDataToModel(new productionMaterialReturnInfo()); + 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.productionMaterialReturnInfo.SqlQuery("select * from productionMaterialReturn").ToList(); + } + else + { + grdList.DataSource = db.productionMaterialReturnInfo.SqlQuery($"select * from productionMaterialReturn where {sql}").ToList(); + } + } + } + } + + public override void AddFunction() + { + gridControl1.DataSource = new List().ToDataTable(); + } + + public override void gridControlMouseDoubleClickFunction(object sender, EventArgs e) + { + productionMaterialReturnInfo info = grdListView.GetFocusedRow() as productionMaterialReturnInfo; + if (info != null) + { + using (var db = new MESDB()) + { + gridControl1.DataSource = db.productionMaterialReturnDetailInfo.Where(p => p.masterid == info.id).ToList().ToDataTable(); + gridView1.BestFitColumns(); + } + } + } + + 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/FrmproductionMaterialReturn.designer.cs b/WinformGeneralDeveloperFrame/Form/FrmproductionMaterialReturn.designer.cs new file mode 100644 index 0000000..3fb84b6 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmproductionMaterialReturn.designer.cs @@ -0,0 +1,840 @@ + +using DevExpress.XtraEditors; +using DevExpress.XtraLayout; +using DevExpress.XtraTab; + +namespace MES.Form +{ + partial class FrmproductionMaterialReturn + { + /// + /// 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.repositoryItemTreeListtxtreturndept = new DevExpress.XtraEditors.Repository.RepositoryItemTreeListLookUpEdit(); + this.repositoryItemTreeListtxtreturndeptTreeList = new DevExpress.XtraTreeList.TreeList(); + this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemtxtcreatorId = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); + this.tabDataList = new DevExpress.XtraTab.XtraTabPage(); + this.grdList = new DevExpress.XtraGrid.GridControl(); + this.grdListView = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.tabDataDetail = new DevExpress.XtraTab.XtraTabPage(); + this.panelControl2 = new DevExpress.XtraEditors.PanelControl(); + this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + this.xtraTabControl2 = new DevExpress.XtraTab.XtraTabControl(); + this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage(); + this.gridControl1 = new DevExpress.XtraGrid.GridControl(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.toolStripMenuItemAdd = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItemDel = new System.Windows.Forms.ToolStripMenuItem(); + this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.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.repositoryItemLookUpEditmaterialid = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + this.gridColumn14 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn15 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn16 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn17 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn18 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemLookUpEditunit = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit(); + 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.repositoryItemTextEditpickdetailcode = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit(); + this.txtid = new DevExpress.XtraEditors.TextEdit(); + this.txtcode = new DevExpress.XtraEditors.TextEdit(); + this.txtreturntime = new DevExpress.XtraEditors.DateEdit(); + this.txtreturndept = new DevExpress.XtraEditors.TreeListLookUpEdit(); + this.txtreturndeptTreeList = new DevExpress.XtraTreeList.TreeList(); + this.txtcreatorId = new DevExpress.XtraEditors.LookUpEdit(); + this.txtcreateTime = new DevExpress.XtraEditors.DateEdit(); + this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtreturndept)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtreturndeptTreeList)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); + this.xtraTabControl1.SuspendLayout(); + this.tabDataList.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.grdList)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.grdListView)).BeginInit(); + this.tabDataDetail.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit(); + this.panelControl2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); + this.layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl2)).BeginInit(); + this.xtraTabControl2.SuspendLayout(); + this.xtraTabPage1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit(); + this.contextMenuStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditmaterialid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditunit)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditwarehouse)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEditpickdetailcode)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcode.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturntime.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturntime.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturndept.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturndeptTreeList)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + this.SuspendLayout(); + // + // gridColumn1 + // + this.gridColumn1.Caption = "id"; + this.gridColumn1.FieldName = "id"; + this.gridColumn1.Name = "gridColumn1"; + // + // gridColumn2 + // + this.gridColumn2.Caption = "退料单号"; + this.gridColumn2.FieldName = "code"; + this.gridColumn2.Name = "gridColumn2"; + this.gridColumn2.Visible = true; + this.gridColumn2.VisibleIndex = 0; + this.gridColumn2.Width = 201; + // + // gridColumn3 + // + this.gridColumn3.Caption = "退料日期"; + this.gridColumn3.DisplayFormat.FormatString = "G"; + this.gridColumn3.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.gridColumn3.FieldName = "returntime"; + this.gridColumn3.Name = "gridColumn3"; + this.gridColumn3.Visible = true; + this.gridColumn3.VisibleIndex = 1; + this.gridColumn3.Width = 201; + // + // gridColumn4 + // + this.gridColumn4.Caption = "退料单位"; + this.gridColumn4.ColumnEdit = this.repositoryItemTreeListtxtreturndept; + this.gridColumn4.FieldName = "returndept"; + this.gridColumn4.Name = "gridColumn4"; + this.gridColumn4.Visible = true; + this.gridColumn4.VisibleIndex = 2; + this.gridColumn4.Width = 201; + // + // repositoryItemTreeListtxtreturndept + // + this.repositoryItemTreeListtxtreturndept.AutoHeight = false; + this.repositoryItemTreeListtxtreturndept.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemTreeListtxtreturndept.DisplayMember = "Name"; + this.repositoryItemTreeListtxtreturndept.Name = "repositoryItemTreeListtxtreturndept"; + this.repositoryItemTreeListtxtreturndept.TreeList = this.repositoryItemTreeListtxtreturndeptTreeList; + this.repositoryItemTreeListtxtreturndept.ValueMember = "ID"; + // + // repositoryItemTreeListtxtreturndeptTreeList + // + this.repositoryItemTreeListtxtreturndeptTreeList.Location = new System.Drawing.Point(0, 0); + this.repositoryItemTreeListtxtreturndeptTreeList.Name = "repositoryItemTreeListtxtreturndeptTreeList"; + this.repositoryItemTreeListtxtreturndeptTreeList.OptionsView.ShowIndentAsRowStyle = true; + this.repositoryItemTreeListtxtreturndeptTreeList.ParentFieldName = "PID"; + this.repositoryItemTreeListtxtreturndeptTreeList.Size = new System.Drawing.Size(400, 200); + this.repositoryItemTreeListtxtreturndeptTreeList.TabIndex = 0; + // + // gridColumn5 + // + this.gridColumn5.Caption = "制单人"; + this.gridColumn5.ColumnEdit = this.repositoryItemtxtcreatorId; + this.gridColumn5.FieldName = "creatorId"; + this.gridColumn5.Name = "gridColumn5"; + this.gridColumn5.Visible = true; + this.gridColumn5.VisibleIndex = 3; + this.gridColumn5.Width = 201; + // + // repositoryItemtxtcreatorId + // + this.repositoryItemtxtcreatorId.AutoHeight = false; + this.repositoryItemtxtcreatorId.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemtxtcreatorId.DisplayMember = "Name"; + this.repositoryItemtxtcreatorId.Name = "repositoryItemtxtcreatorId"; + this.repositoryItemtxtcreatorId.ValueMember = "ID"; + // + // gridColumn6 + // + this.gridColumn6.Caption = "制单日期"; + this.gridColumn6.DisplayFormat.FormatString = "G"; + this.gridColumn6.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.gridColumn6.FieldName = "createTime"; + this.gridColumn6.Name = "gridColumn6"; + this.gridColumn6.Visible = true; + this.gridColumn6.VisibleIndex = 4; + this.gridColumn6.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.grdListView.GridControl = this.grdList; + this.grdListView.Name = "grdListView"; + this.grdListView.OptionsBehavior.Editable = false; + this.grdListView.OptionsView.ColumnAutoWidth = false; + this.grdListView.OptionsView.ShowGroupPanel = false; + // + // tabDataDetail + // + this.tabDataDetail.Controls.Add(this.panelControl2); + this.tabDataDetail.Name = "tabDataDetail"; + this.tabDataDetail.Size = new System.Drawing.Size(1294, 737); + this.tabDataDetail.Text = "数据编辑"; + // + // panelControl2 + // + this.panelControl2.Controls.Add(this.layoutControl1); + this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panelControl2.Location = new System.Drawing.Point(0, 0); + this.panelControl2.Name = "panelControl2"; + this.panelControl2.Size = new System.Drawing.Size(1294, 737); + this.panelControl2.TabIndex = 0; + // + // layoutControl1 + // + this.layoutControl1.Controls.Add(this.xtraTabControl2); + this.layoutControl1.Controls.Add(this.txtid); + this.layoutControl1.Controls.Add(this.txtcode); + this.layoutControl1.Controls.Add(this.txtreturntime); + this.layoutControl1.Controls.Add(this.txtreturndept); + this.layoutControl1.Controls.Add(this.txtcreatorId); + this.layoutControl1.Controls.Add(this.txtcreateTime); + this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.layoutControl1.Location = new System.Drawing.Point(2, 2); + this.layoutControl1.Name = "layoutControl1"; + this.layoutControl1.Root = this.layoutControlGroup1; + this.layoutControl1.Size = new System.Drawing.Size(1290, 733); + this.layoutControl1.TabIndex = 6; + this.layoutControl1.Text = "layoutControl1"; + // + // xtraTabControl2 + // + this.xtraTabControl2.Location = new System.Drawing.Point(12, 84); + this.xtraTabControl2.Name = "xtraTabControl2"; + this.xtraTabControl2.SelectedTabPage = this.xtraTabPage1; + this.xtraTabControl2.Size = new System.Drawing.Size(1266, 637); + this.xtraTabControl2.TabIndex = 7; + this.xtraTabControl2.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { + this.xtraTabPage1}); + // + // xtraTabPage1 + // + this.xtraTabPage1.Controls.Add(this.gridControl1); + this.xtraTabPage1.Name = "xtraTabPage1"; + this.xtraTabPage1.Size = new System.Drawing.Size(1260, 608); + this.xtraTabPage1.Text = "退料明细"; + // + // gridControl1 + // + this.gridControl1.ContextMenuStrip = this.contextMenuStrip1; + this.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.gridControl1.Location = new System.Drawing.Point(0, 0); + this.gridControl1.MainView = this.gridView1; + this.gridControl1.Name = "gridControl1"; + this.gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { + this.repositoryItemLookUpEditmaterialid, + this.repositoryItemLookUpEditunit, + this.repositoryItemLookUpEditwarehouse, + this.repositoryItemTextEditpickdetailcode}); + this.gridControl1.Size = new System.Drawing.Size(1260, 608); + this.gridControl1.TabIndex = 1; + this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView1}); + // + // contextMenuStrip1 + // + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItemAdd, + this.toolStripMenuItemDel}); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(113, 48); + // + // toolStripMenuItemAdd + // + this.toolStripMenuItemAdd.Name = "toolStripMenuItemAdd"; + this.toolStripMenuItemAdd.Size = new System.Drawing.Size(112, 22); + this.toolStripMenuItemAdd.Text = "新增行"; + this.toolStripMenuItemAdd.Click += new System.EventHandler(this.toolStripMenuItemAdd_Click); + // + // toolStripMenuItemDel + // + this.toolStripMenuItemDel.Name = "toolStripMenuItemDel"; + this.toolStripMenuItemDel.Size = new System.Drawing.Size(112, 22); + this.toolStripMenuItemDel.Text = "删除行"; + this.toolStripMenuItemDel.Click += new System.EventHandler(this.toolStripMenuItemDel_Click); + // + // gridView1 + // + this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gridColumn7, + this.gridColumn8, + this.gridColumn9, + this.gridColumn10, + this.gridColumn11, + this.gridColumn12, + this.gridColumn13, + this.gridColumn14, + this.gridColumn15, + this.gridColumn16, + this.gridColumn17, + this.gridColumn18, + this.gridColumn19, + this.gridColumn20, + this.gridColumn21}); + this.gridView1.GridControl = this.gridControl1; + this.gridView1.Name = "gridView1"; + this.gridView1.OptionsBehavior.Editable = false; + this.gridView1.OptionsView.ColumnAutoWidth = false; + this.gridView1.OptionsView.ShowGroupPanel = false; + // + // gridColumn7 + // + this.gridColumn7.Caption = "id"; + this.gridColumn7.FieldName = "id"; + this.gridColumn7.Name = "gridColumn7"; + // + // gridColumn8 + // + this.gridColumn8.Caption = "主表id"; + this.gridColumn8.FieldName = "masterid"; + this.gridColumn8.Name = "gridColumn8"; + // + // gridColumn9 + // + this.gridColumn9.Caption = "退料单号"; + this.gridColumn9.FieldName = "mastercode"; + this.gridColumn9.Name = "gridColumn9"; + this.gridColumn9.Visible = true; + this.gridColumn9.VisibleIndex = 11; + this.gridColumn9.Width = 201; + // + // gridColumn10 + // + this.gridColumn10.Caption = "退料明细单号"; + this.gridColumn10.FieldName = "detailcode"; + this.gridColumn10.Name = "gridColumn10"; + this.gridColumn10.Visible = true; + this.gridColumn10.VisibleIndex = 12; + this.gridColumn10.Width = 201; + // + // gridColumn11 + // + this.gridColumn11.Caption = "领料单号"; + this.gridColumn11.FieldName = "pickcode"; + this.gridColumn11.Name = "gridColumn11"; + this.gridColumn11.Visible = true; + this.gridColumn11.VisibleIndex = 1; + this.gridColumn11.Width = 201; + // + // gridColumn12 + // + this.gridColumn12.Caption = "工单号"; + this.gridColumn12.FieldName = "wocode"; + this.gridColumn12.Name = "gridColumn12"; + this.gridColumn12.Visible = true; + this.gridColumn12.VisibleIndex = 2; + this.gridColumn12.Width = 201; + // + // gridColumn13 + // + this.gridColumn13.Caption = "物料"; + this.gridColumn13.ColumnEdit = this.repositoryItemLookUpEditmaterialid; + this.gridColumn13.FieldName = "materialid"; + this.gridColumn13.Name = "gridColumn13"; + this.gridColumn13.Visible = true; + this.gridColumn13.VisibleIndex = 3; + this.gridColumn13.Width = 201; + // + // repositoryItemLookUpEditmaterialid + // + this.repositoryItemLookUpEditmaterialid.AutoHeight = false; + this.repositoryItemLookUpEditmaterialid.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemLookUpEditmaterialid.DisplayMember = "Name"; + this.repositoryItemLookUpEditmaterialid.Name = "repositoryItemLookUpEditmaterialid"; + this.repositoryItemLookUpEditmaterialid.NullText = ""; + this.repositoryItemLookUpEditmaterialid.ValueMember = "ID"; + // + // gridColumn14 + // + this.gridColumn14.Caption = "物料编码"; + this.gridColumn14.FieldName = "materialcode"; + this.gridColumn14.Name = "gridColumn14"; + this.gridColumn14.Visible = true; + this.gridColumn14.VisibleIndex = 4; + this.gridColumn14.Width = 201; + // + // gridColumn15 + // + this.gridColumn15.Caption = "规格型号"; + this.gridColumn15.FieldName = "materialspec"; + this.gridColumn15.Name = "gridColumn15"; + this.gridColumn15.Visible = true; + this.gridColumn15.VisibleIndex = 5; + this.gridColumn15.Width = 201; + // + // gridColumn16 + // + this.gridColumn16.Caption = "退料原因"; + this.gridColumn16.FieldName = "reason"; + this.gridColumn16.Name = "gridColumn16"; + this.gridColumn16.Visible = true; + this.gridColumn16.VisibleIndex = 6; + this.gridColumn16.Width = 201; + // + // gridColumn17 + // + this.gridColumn17.Caption = "退料数量"; + this.gridColumn17.FieldName = "number"; + this.gridColumn17.Name = "gridColumn17"; + this.gridColumn17.Visible = true; + this.gridColumn17.VisibleIndex = 7; + this.gridColumn17.Width = 201; + // + // gridColumn18 + // + this.gridColumn18.Caption = "计量单位"; + this.gridColumn18.ColumnEdit = this.repositoryItemLookUpEditunit; + this.gridColumn18.FieldName = "unit"; + this.gridColumn18.Name = "gridColumn18"; + this.gridColumn18.Visible = true; + this.gridColumn18.VisibleIndex = 8; + this.gridColumn18.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"; + // + // gridColumn19 + // + this.gridColumn19.Caption = "仓库"; + this.gridColumn19.ColumnEdit = this.repositoryItemLookUpEditwarehouse; + this.gridColumn19.FieldName = "warehouse"; + this.gridColumn19.Name = "gridColumn19"; + this.gridColumn19.Visible = true; + this.gridColumn19.VisibleIndex = 9; + this.gridColumn19.Width = 201; + // + // repositoryItemLookUpEditwarehouse + // + this.repositoryItemLookUpEditwarehouse.AutoHeight = false; + this.repositoryItemLookUpEditwarehouse.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemLookUpEditwarehouse.DisplayMember = "Name"; + this.repositoryItemLookUpEditwarehouse.Name = "repositoryItemLookUpEditwarehouse"; + this.repositoryItemLookUpEditwarehouse.NullText = ""; + this.repositoryItemLookUpEditwarehouse.ValueMember = "ID"; + // + // gridColumn20 + // + this.gridColumn20.Caption = "备注"; + this.gridColumn20.FieldName = "remark"; + this.gridColumn20.Name = "gridColumn20"; + this.gridColumn20.Visible = true; + this.gridColumn20.VisibleIndex = 10; + this.gridColumn20.Width = 201; + // + // gridColumn21 + // + this.gridColumn21.Caption = "领料明细单号"; + this.gridColumn21.ColumnEdit = this.repositoryItemTextEditpickdetailcode; + this.gridColumn21.FieldName = "pickdetailcode"; + this.gridColumn21.Name = "gridColumn21"; + this.gridColumn21.Visible = true; + this.gridColumn21.VisibleIndex = 0; + this.gridColumn21.Width = 197; + // + // repositoryItemTextEditpickdetailcode + // + this.repositoryItemTextEditpickdetailcode.AutoHeight = false; + this.repositoryItemTextEditpickdetailcode.Name = "repositoryItemTextEditpickdetailcode"; + // + // 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; + // + // txtcode + // + this.txtcode.Location = new System.Drawing.Point(698, 12); + this.txtcode.Name = "txtcode"; + this.txtcode.Size = new System.Drawing.Size(580, 20); + this.txtcode.StyleController = this.layoutControl1; + this.txtcode.TabIndex = 2; + // + // txtreturntime + // + this.txtreturntime.EditValue = null; + this.txtreturntime.ImeMode = System.Windows.Forms.ImeMode.Off; + this.txtreturntime.Location = new System.Drawing.Point(698, 36); + this.txtreturntime.Name = "txtreturntime"; + this.txtreturntime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtreturntime.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton()}); + this.txtreturntime.Properties.DisplayFormat.FormatString = "G"; + this.txtreturntime.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.txtreturntime.Size = new System.Drawing.Size(580, 20); + this.txtreturntime.StyleController = this.layoutControl1; + this.txtreturntime.TabIndex = 3; + // + // txtreturndept + // + this.txtreturndept.EditValue = ""; + this.txtreturndept.Location = new System.Drawing.Point(63, 36); + this.txtreturndept.Name = "txtreturndept"; + this.txtreturndept.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtreturndept.Properties.DisplayMember = "Name"; + this.txtreturndept.Properties.TreeList = this.txtreturndeptTreeList; + this.txtreturndept.Properties.ValueMember = "ID"; + this.txtreturndept.Size = new System.Drawing.Size(580, 20); + this.txtreturndept.StyleController = this.layoutControl1; + this.txtreturndept.TabIndex = 4; + // + // txtreturndeptTreeList + // + this.txtreturndeptTreeList.Location = new System.Drawing.Point(0, 0); + this.txtreturndeptTreeList.Name = "txtreturndeptTreeList"; + this.txtreturndeptTreeList.OptionsView.ShowIndentAsRowStyle = true; + this.txtreturndeptTreeList.ParentFieldName = "PID"; + this.txtreturndeptTreeList.Size = new System.Drawing.Size(400, 200); + this.txtreturndeptTreeList.TabIndex = 0; + // + // txtcreatorId + // + this.txtcreatorId.EditValue = ""; + this.txtcreatorId.Location = new System.Drawing.Point(63, 60); + this.txtcreatorId.Name = "txtcreatorId"; + this.txtcreatorId.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtcreatorId.Properties.DisplayMember = "Name"; + this.txtcreatorId.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; + this.txtcreatorId.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; + this.txtcreatorId.Properties.ValueMember = "ID"; + this.txtcreatorId.Size = new System.Drawing.Size(580, 20); + this.txtcreatorId.StyleController = this.layoutControl1; + this.txtcreatorId.TabIndex = 5; + // + // txtcreateTime + // + this.txtcreateTime.EditValue = null; + this.txtcreateTime.ImeMode = System.Windows.Forms.ImeMode.Off; + this.txtcreateTime.Location = new System.Drawing.Point(698, 60); + this.txtcreateTime.Name = "txtcreateTime"; + this.txtcreateTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txtcreateTime.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton()}); + this.txtcreateTime.Properties.DisplayFormat.FormatString = "G"; + this.txtcreateTime.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; + this.txtcreateTime.Size = new System.Drawing.Size(580, 20); + this.txtcreateTime.StyleController = this.layoutControl1; + this.txtcreateTime.TabIndex = 6; + // + // layoutControlGroup1 + // + this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1"; + this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem3, + this.layoutControlItem5, + this.layoutControlItem2, + this.layoutControlItem4, + this.layoutControlItem6, + this.layoutControlItem7}); + 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); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.txtreturntime; + 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.txtcreatorId; + this.layoutControlItem5.CustomizationFormText = "制单人"; + this.layoutControlItem5.Location = new System.Drawing.Point(0, 48); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(635, 24); + this.layoutControlItem5.Text = "制单人"; + this.layoutControlItem5.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.txtcode; + this.layoutControlItem2.CustomizationFormText = "退料单号"; + this.layoutControlItem2.Location = new System.Drawing.Point(635, 0); + 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); + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.txtreturndept; + 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); + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.txtcreateTime; + 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.xtraTabControl2; + this.layoutControlItem7.Location = new System.Drawing.Point(0, 72); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(1270, 641); + this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem7.TextVisible = false; + // + // FrmproductionMaterialReturn + // + 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 = "FrmproductionMaterialReturn"; + this.Text = "生产退料单"; + this.Load += new System.EventHandler(this.FrmproductionMaterialReturn_Load); + this.Controls.SetChildIndex(this.xtraTabControl1, 0); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtreturndept)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTreeListtxtreturndeptTreeList)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); + this.xtraTabControl1.ResumeLayout(false); + this.tabDataList.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.grdList)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.grdListView)).EndInit(); + this.tabDataDetail.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit(); + this.panelControl2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); + this.layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl2)).EndInit(); + this.xtraTabControl2.ResumeLayout(false); + this.xtraTabPage1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit(); + this.contextMenuStrip1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditmaterialid)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditunit)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditwarehouse)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEditpickdetailcode)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcode.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturntime.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturntime.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturndept.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtreturndeptTreeList)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtcreateTime.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).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.XtraEditors.TextEdit txtid; + /////////////////////////////// + private DevExpress.XtraEditors.TextEdit txtcode; + /////////////////////////////// + private DevExpress.XtraEditors.DateEdit txtreturntime; + private DevExpress.XtraTreeList.TreeList txtreturndeptTreeList; + private DevExpress.XtraEditors.Repository.RepositoryItemTreeListLookUpEdit repositoryItemTreeListtxtreturndept; + private DevExpress.XtraTreeList.TreeList repositoryItemTreeListtxtreturndeptTreeList; + + private DevExpress.XtraEditors.TreeListLookUpEdit txtreturndept; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtcreatorId; + + private DevExpress.XtraEditors.LookUpEdit txtcreatorId; + /////////////////////////////// + private DevExpress.XtraEditors.DateEdit txtcreateTime; + + 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 XtraTabControl xtraTabControl2; + private XtraTabPage xtraTabPage1; + private LayoutControlItem layoutControlItem7; + private DevExpress.XtraGrid.GridControl gridControl1; + private DevExpress.XtraGrid.Views.Grid.GridView gridView1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn7; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn8; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn9; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn10; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn11; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn12; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn13; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn14; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn15; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn16; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn17; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn18; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn19; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn20; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemLookUpEditmaterialid; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemLookUpEditunit; + private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemLookUpEditwarehouse; + private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemAdd; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemDel; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn21; + private DevExpress.XtraEditors.Repository.RepositoryItemTextEdit repositoryItemTextEditpickdetailcode; + } +} \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmproductionMaterialReturn.resx b/WinformGeneralDeveloperFrame/Form/FrmproductionMaterialReturn.resx new file mode 100644 index 0000000..ad53752 --- /dev/null +++ b/WinformGeneralDeveloperFrame/Form/FrmproductionMaterialReturn.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/FrmproductionRequisition.cs b/WinformGeneralDeveloperFrame/Form/FrmproductionRequisition.cs index 002d171..4c69826 100644 --- a/WinformGeneralDeveloperFrame/Form/FrmproductionRequisition.cs +++ b/WinformGeneralDeveloperFrame/Form/FrmproductionRequisition.cs @@ -381,5 +381,14 @@ namespace MES.Form } } } + + private void gridView1_KeyDown(object sender, KeyEventArgs e) + { + if (e.Control & e.KeyCode == Keys.C) + { + Clipboard.SetDataObject(gridView1.GetFocusedRowCellValue(gridView1.FocusedColumn)); + e.Handled = true; + } + } } } \ No newline at end of file diff --git a/WinformGeneralDeveloperFrame/Form/FrmproductionRequisition.designer.cs b/WinformGeneralDeveloperFrame/Form/FrmproductionRequisition.designer.cs index 0ba75a9..805b6d2 100644 --- a/WinformGeneralDeveloperFrame/Form/FrmproductionRequisition.designer.cs +++ b/WinformGeneralDeveloperFrame/Form/FrmproductionRequisition.designer.cs @@ -527,6 +527,7 @@ namespace MES.Form this.gridView1.OptionsBehavior.Editable = false; this.gridView1.OptionsView.ColumnAutoWidth = false; this.gridView1.OptionsView.ShowGroupPanel = false; + this.gridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.gridView1_KeyDown); // // gridColumn15 // diff --git a/WinformGeneralDeveloperFrame/WinformGeneralDeveloperFrame.csproj b/WinformGeneralDeveloperFrame/WinformGeneralDeveloperFrame.csproj index 7e6f5e4..ea0522a 100644 --- a/WinformGeneralDeveloperFrame/WinformGeneralDeveloperFrame.csproj +++ b/WinformGeneralDeveloperFrame/WinformGeneralDeveloperFrame.csproj @@ -139,6 +139,10 @@ + + + + @@ -150,8 +154,12 @@ + + + + @@ -178,6 +186,30 @@ Frmbuyer.cs + + Form + + + FrmbuyerInWarehouse.cs + + + Form + + + FrmbuyerInWarehouseDetail.cs + + + Form + + + FrmbuyerOutWarehouse.cs + + + Form + + + FrmbuyerOutWarehouseDetail.cs + Form @@ -232,12 +264,30 @@ FrmproductionBOM.cs + + Form + + + FrmproductionMaterialReturn.cs + Form FrmproductionRequisition.cs + + Form + + + FrmproductMaterialOutWarehouse.cs + + + Form + + + FrmproductMaterialOutWarehouseDetail.cs + Form @@ -466,6 +516,9 @@ FrmproductionBOM.cs + + FrmproductionMaterialReturn.cs + FrmproductionRequisition.cs