凯 王 2021-06-15 18:18:49 +08:00
parent b85fa825b9
commit 7b993c8b33
23 changed files with 4375 additions and 155 deletions

View File

@ -445,5 +445,12 @@ namespace WinformGeneralDeveloperFrame.Commons
}
return ts;
}
public static string GetDateTimeCode(this DateTime dt)
{
return DateTime.Now.Year + DateTime.Now.Month.ToString("D2") + DateTime.Now.Day.ToString("D2") +
DateTime.Now.Hour.ToString("D2") +
DateTime.Now.Minute.ToString("D2") + DateTime.Now.Second.ToString("D2") +
DateTime.Now.Millisecond.ToString("D3");
}
}
}

View File

@ -60,5 +60,12 @@ namespace MES
public virtual DbSet<buyerInfo> buyerInfo { get; set; }
public virtual DbSet<buyerdetailInfo> buyerdetailInfo { get; set; }
public virtual DbSet<buyerreturnInfo> buyerreturnInfo { get; set; }
public virtual DbSet<buyerreturndetailInfo> buyerreturndetailInfo { get; set; }
public virtual DbSet<workorderInfo> workorderInfo { get; set; }
}
}

View File

@ -71,5 +71,7 @@ namespace MES.Entity
///明细号
[ModelBindControl("txtbuyerdetailcode")]
public string buyerdetailcode { set; get; }
}
}

View File

@ -0,0 +1,40 @@
using WinformGeneralDeveloperFrame.Commons;
namespace MES.Entity
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
[Table("buyerreturn")]
public partial class buyerreturnInfo
{
///id
[ModelBindControl("txtid")]
public int id{set;get;}
///退货日期
[ModelBindControl("txtreturndate")]
public DateTime returndate{set;get;}=DateTime.Now;
///供应商编号
[ModelBindControl("txtsuppliercode")]
public string suppliercode{set;get;}
///供应商名称
[ModelBindControl("txtsupplierid")]
public int supplierid{set;get;}
///制单人
[ModelBindControl("txtcreatorId")]
public int creatorId{set;get;}
///采购退货单号
[ModelBindControl("txtreturnbuyercode")]
public string returnbuyercode{set;get;}
///金额
[ModelBindControl("txttotalprice")]
public decimal totalprice{set;get;}
///备注
[ModelBindControl("txtremark")]
public string remark{set;get;}
}
}

View File

@ -0,0 +1,58 @@
using WinformGeneralDeveloperFrame.Commons;
namespace MES.Entity
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
[Table("buyerreturndetail")]
public partial class buyerreturndetailInfo
{
///id
[ModelBindControl("txtid")]
public int id{set;get;}
///采购明细单号
[ModelBindControl("txtbuyerdetailcode")]
public string buyerdetailcode{set;get;}
///采购单号
[ModelBindControl("txtbuyercode")]
public string buyercode{set;get;}
///物料编码
[ModelBindControl("txtmaterialcode")]
public string materialcode{set;get;}
///物料名称
[ModelBindControl("txtmaterialid")]
public int materialid{set;get;}
///规格型号
[ModelBindControl("txtmaterialspec")]
public string materialspec{set;get;}
///退货数量
[ModelBindControl("txtreturnnumber")]
public decimal returnnumber{set;get;}
///计量单位
[ModelBindControl("txtunit")]
public int unit{set;get;}
///采购单价
[ModelBindControl("txtunitprice")]
public decimal unitprice{set;get;}
///金额
[ModelBindControl("txtmoney")]
public decimal money{set;get;}
///仓库
[ModelBindControl("txtwarehouse")]
public int warehouse{set;get;}
///退货单号
[ModelBindControl("txtreturnbuyercode")]
public string returnbuyercode{set;get;}
///退货明细单号
[ModelBindControl("txtreturnbuyerdetailcode")]
public string returnbuyerdetailcode{set;get;}
///备注
[ModelBindControl("txtremark")]
public string remark{set;get;}
public int buyerreturnid { set; get; }
}
}

View File

@ -0,0 +1,70 @@
using WinformGeneralDeveloperFrame.Commons;
namespace MES.Entity
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
[Table("workorder")]
public partial class workorderInfo
{
///id
[ModelBindControl("txtid")]
public int id{set;get;}
///工单号
[ModelBindControl("txtwordordercode")]
public string wordordercode{set;get;}
///销售单号
[ModelBindControl("txtsalecode")]
public string salecode{set;get;}
///销售明细单号
[ModelBindControl("txtsaledetailcode")]
public string saledetailcode{set;get;}
///工单类型
[ModelBindControl("txtworkordertype")]
public int workordertype{set;get;}
///生产日期
[ModelBindControl("txtproductdate")]
public DateTime productdate{set;get;}=DateTime.Now;
///生产单位
[ModelBindControl("txtproductdept")]
public int productdept{set;get;}
///产品编号
[ModelBindControl("txtproductcode")]
public string productcode{set;get;}
///产品名称
[ModelBindControl("txtproductid")]
public int productid{set;get;}
///规格型号
[ModelBindControl("txtspec")]
public string spec{set;get;}
///生产数量
[ModelBindControl("txtproductnumber")]
public decimal productnumber{set;get;}
///计量单位
[ModelBindControl("txtunit")]
public int unit{set;get;}
///完工日期
[ModelBindControl("txtfinishdate")]
public DateTime finishdate{set;get;}=DateTime.Now;
///交货日期
[ModelBindControl("txtdeliverdate")]
public DateTime deliverdate{set;get;}=DateTime.Now;
///仓库
[ModelBindControl("txtwarehouse")]
public int warehouse{set;get;}
///制单人
[ModelBindControl("txtcreatorId")]
public int creatorId{set;get;}
///制单日期
[ModelBindControl("txtcreateTime")]
public DateTime createTime{set;get;}=DateTime.Now;
///备注
[ModelBindControl("txtremark")]
public string remark{set;get;}
}
}

View File

@ -12,26 +12,32 @@ using DevExpress.XtraLayout;
using MES.Entity;
using System.Data.Entity.Migrations;
using System.Data.Entity;
using CCWin.SkinClass;
using CCWin.SkinControl;
namespace MES.Form
{
public partial class Frmbuyer : FrmBaseForm
{
public partial class Frmbuyer : FrmBaseForm
{
private Dictionary<string, string> fieldDictionary = new Dictionary<string, string>();
public Frmbuyer()
{
InitializeComponent();
}
private void Frmbuyer_Load(object sender, EventArgs e)
public Frmbuyer()
{
InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new buyerInfo(),gridControl1,new []{ "txtbuyercode", "txttotalprice" });
InitializeComponent();
}
private void Frmbuyer_Load(object sender, EventArgs e)
{
InitFrom(xtraTabControl1, grdList, grdListView, new LayoutControlGroup[] {layoutControlGroup1},
new buyerInfo(), gridControl1, new[] {"txtbuyercode", "txttotalprice"});
InitSearchDicData();
repositoryItemTextEditrequisitioncode.KeyDown += RepositoryItemTextEditrequisitioncode_KeyDown;
txtsupplierid.EditValueChanged += Txtsupplierid_EditValueChanged;
}
}
private void Txtsupplierid_EditValueChanged(object sender, EventArgs e)
{
using (var db=new MESDB())
using (var db = new MESDB())
{
supplierInfo supplier = db.supplierInfo.Find(txtsupplierid.EditValue);
txtsuppliercode.Text = supplier.suppliercode;
@ -74,83 +80,92 @@ namespace MES.Form
/// </summary>
/// <returns></returns>
private void Init()
{
txtsupplierid.Properties.DataSource = GetDataTableUtils.SqlTable("供应商");
repositoryItemtxtsupplierid.DataSource= GetDataTableUtils.SqlTable("物料");
txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户");
{
txtsupplierid.Properties.DataSource = GetDataTableUtils.SqlTable("供应商");
repositoryItemtxtsupplierid.DataSource = GetDataTableUtils.SqlTable("物料");
txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
repositoryItemtxtcreatorId.DataSource = GetDataTableUtils.SqlTable("用户");
repositoryItemLookUpEditmaterialid.DataSource = GetDataTableUtils.SqlTable("物料");
repositoryItemLookUpEditmaterialunit.DataSource = GetDataTableUtils.SqlTable("计量单位");
repositoryItemLookUpEditwarehouse.DataSource = GetDataTableUtils.SqlTable("仓库");
}
/// <summary>
/// 搜索字段
/// </summary>
/// <returns></returns>
/// 搜索字段
/// </summary>
/// <returns></returns>
private void InitSearchDicData()
{
fieldDictionary.Add("id","id");
fieldDictionary.Add("采购单号","buyercode");
fieldDictionary.Add("采购日期","buyerdate");
fieldDictionary.Add("供应商","supplierid");
fieldDictionary.Add("供应商编码","suppliercode");
fieldDictionary.Add("完货日期","deliverdate");
fieldDictionary.Add("制单人","creatorId");
fieldDictionary.Add("金额","totalprice");
fieldDictionary.Add("备注","remark");
fieldDictionary.Add("id", "id");
fieldDictionary.Add("采购单号", "buyercode");
fieldDictionary.Add("采购日期", "buyerdate");
fieldDictionary.Add("供应商", "supplierid");
fieldDictionary.Add("供应商编码", "suppliercode");
fieldDictionary.Add("完货日期", "deliverdate");
fieldDictionary.Add("制单人", "creatorId");
fieldDictionary.Add("金额", "totalprice");
fieldDictionary.Add("备注", "remark");
}
public override void InitgrdListDataSource()
public override void InitgrdListDataSource()
{
using (var con=new MESDB())///
using (var con = new MESDB()) ///
{
grdList.DataSource=con.buyerInfo.ToList();
grdList.DataSource = con.buyerInfo.ToList();
}
Init();
}
/// <summary>
/// 字段为空校验
/// </summary>
/// <returns></returns>
}
/// <summary>
/// 字段为空校验
/// </summary>
/// <returns></returns>
public override bool CheckInput()
{
if(string.IsNullOrEmpty(txtbuyerdate.ToString()))
{
"采购日期不能为空".ShowWarning();
txtbuyerdate.Focus();
return false;
}
if(string.IsNullOrEmpty(txtsupplierid.EditValue.ToString()))
{
"供应商不能为空".ShowWarning();
txtsupplierid.Focus();
return false;
}
if(string.IsNullOrEmpty(txtsuppliercode.EditValue.ToString()))
{
"供应商编码不能为空".ShowWarning();
txtsuppliercode.Focus();
return false;
}
if(string.IsNullOrEmpty(txtdeliverdate.EditValue.ToString()))
{
"完货日期不能为空".ShowWarning();
txtdeliverdate.Focus();
return false;
}
if(string.IsNullOrEmpty(txtcreatorId.EditValue.ToString()))
{
"制单人不能为空".ShowWarning();
txtcreatorId.Focus();
return false;
}
if(string.IsNullOrEmpty(txttotalprice.EditValue.ToString()))
{
"金额不能为空".ShowWarning();
txttotalprice.Focus();
return false;
}
return true;
if (string.IsNullOrEmpty(txtbuyerdate.ToString()))
{
"采购日期不能为空".ShowWarning();
txtbuyerdate.Focus();
return false;
}
if (string.IsNullOrEmpty(txtsupplierid.EditValue.ToString()))
{
"供应商不能为空".ShowWarning();
txtsupplierid.Focus();
return false;
}
if (string.IsNullOrEmpty(txtsuppliercode.EditValue.ToString()))
{
"供应商编码不能为空".ShowWarning();
txtsuppliercode.Focus();
return false;
}
if (string.IsNullOrEmpty(txtdeliverdate.EditValue.ToString()))
{
"完货日期不能为空".ShowWarning();
txtdeliverdate.Focus();
return false;
}
if (string.IsNullOrEmpty(txtcreatorId.EditValue.ToString()))
{
"制单人不能为空".ShowWarning();
txtcreatorId.Focus();
return false;
}
if (string.IsNullOrEmpty(txttotalprice.EditValue.ToString()))
{
"金额不能为空".ShowWarning();
txttotalprice.Focus();
return false;
}
return true;
}
public override void AddFunction()
@ -159,17 +174,120 @@ namespace MES.Form
}
/// <summary>
/// 保存
/// </summary>
/// <returns></returns>
public override bool SaveFunction()
/// 保存
/// </summary>
/// <returns></returns>
public override bool SaveFunction()
{
string code = "CG" + DateTime.Now.GetDateTimeCode();
DataTable dt = gridControl1.DataSource as DataTable;
try
{
buyerInfo info = (buyerInfo) this.ControlDataToModel(new buyerInfo());
using (var db = new MESDB())
{
using (var tran = db.Database.BeginTransaction())
{
try
{
Dictionary<string, List<buyerdetailInfo>> dic =
dt.GetDataTableData<buyerdetailInfo>();
if (info.id == 0) //新增
{
info.buyercode = code;
db.buyerInfo.Add(info);
db.SaveChanges();
txtid.Text = info.id.ToString();
txtbuyercode.Text = code;
if (dt != null)
{
List<buyerdetailInfo> detaiListAdd =
dic["Add"];
int num = 0;
detaiListAdd.ForEach(a =>
{
num++;
string codedetail = "SDD" + DateTime.Now.GetDateTimeCode() + num;
a.buyercode = info.buyercode;
a.buyerid = info.id;
a.buyerdetailcode = codedetail;
});
db.buyerdetailInfo.AddRange(detaiListAdd);
db.SaveChanges();
}
}
else //更新
{
db.Entry(info).State = EntityState.Modified;
db.SaveChanges();
if (dt != null)
{
List<buyerdetailInfo> detaiListAdd =
dic["Add"];
int num = 0;
detaiListAdd.ForEach(a =>
{
a.buyercode = info.buyercode;
a.buyerid = info.id;
num++;
string codedetail = "SDD" + DateTime.Now.GetDateTimeCode() + num;
a.buyerdetailcode = codedetail;
});
db.buyerdetailInfo.AddRange(detaiListAdd);
List<buyerdetailInfo> detaiListEdit =
dic["Edit"];
detaiListEdit.ForEach((a) =>
{
a.buyercode = info.buyercode;
db.Entry(a).State = EntityState.Modified;
});
List<buyerdetailInfo> 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;
}
/// <summary>
/// 删除
/// </summary>
/// <returns></returns>
public override bool DelFunction()
{
try
{
buyerInfo info= (buyerInfo)this.ControlDataToModel(new buyerInfo());
buyerInfo info = (buyerInfo) this.ControlDataToModel(new buyerInfo());
using (var db = new MESDB())
{
db.buyerInfo.AddOrUpdate(info);
db.Entry(info).State = EntityState.Deleted;
db.SaveChanges();
}
}
@ -178,38 +296,18 @@ namespace MES.Form
ex.Message.ShowError();
return false;
}
return true;
}
/// <summary>
/// 删除
/// </summary>
/// <returns></returns>
public override bool DelFunction()
{
try
{
buyerInfo info = (buyerInfo)this.ControlDataToModel(new buyerInfo());
using (var db = new MESDB())
{
db.Entry(info).State=EntityState.Deleted;
db.SaveChanges();
}
}
catch (Exception ex)
{
ex.Message.ShowError();
return false;
}
return true;
}
/// <summary>
/// 搜索
/// </summary>
/// <returns></returns>
/// 搜索
/// </summary>
/// <returns></returns>
public override void SearchFunction()
{
FrmSearch frm = new FrmSearch(fieldDictionary);
if (frm.ShowDialog()==DialogResult.OK)
if (frm.ShowDialog() == DialogResult.OK)
{
string sql = frm.sql;
using (var db = new MESDB())
@ -226,6 +324,19 @@ namespace MES.Form
}
}
public override void gridControlMouseDoubleClickFunction(object sender, EventArgs e)
{
buyerInfo info = grdListView.GetFocusedRow() as buyerInfo;
if (info != null)
{
using (var db = new MESDB())
{
gridControl1.DataSource = db.buyerdetailInfo.Where(p => p.buyerid == info.id).ToList().ToDataTable();
gridView1.BestFitColumns();
}
}
}
private void toolStripMenuItemAdd_Click(object sender, EventArgs e)
{
gridView1.AddNewRow();
@ -235,5 +346,37 @@ namespace MES.Form
{
gridView1.DeleteRow(gridView1.FocusedRowHandle);
}
private void gridView1_ValidateRow(object sender, DevExpress.XtraGrid.Views.Base.ValidateRowEventArgs e)
{
//gridControl1.RefreshDataSource();
//DataTable dt=gridControl1.DataSource as DataTable; ;
//decimal total = 0;
//foreach (DataRow row in dt.Rows)
//{
// total += row.ItemArray[10].ToDecimal(0);
//}
//txttotalprice.Text = total.ToString();
}
private void gridControl1_Validated(object sender, EventArgs e)
{
DataTable dt = gridControl1.DataSource as DataTable; ;
decimal total = 0;
foreach (DataRow row in dt.Rows)
{
total += row.ItemArray[10].ToDecimal(0);
}
txttotalprice.Text = total.ToString();
}
private void gridView1_ValidateRow_1(object sender, DevExpress.XtraGrid.Views.Base.ValidateRowEventArgs e)
{
if (gridView1.GetFocusedDataRow()["money"].ToString().IsNullOrEmpty())
{
e.Valid = false;
e.ErrorText = "请输入请购明细单号";
}
}
}
}

View File

@ -269,7 +269,7 @@ namespace MES.Form
this.xtraTabControl1.Location = new System.Drawing.Point(0, 34);
this.xtraTabControl1.Name = "xtraTabControl1";
this.xtraTabControl1.SelectedTabPage = this.tabDataList;
this.xtraTabControl1.Size = new System.Drawing.Size(1300, 766);
this.xtraTabControl1.Size = new System.Drawing.Size(992, 673);
this.xtraTabControl1.TabIndex = 1;
this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
this.tabDataList,
@ -279,7 +279,7 @@ namespace MES.Form
//
this.tabDataList.Controls.Add(this.grdList);
this.tabDataList.Name = "tabDataList";
this.tabDataList.Size = new System.Drawing.Size(1294, 737);
this.tabDataList.Size = new System.Drawing.Size(986, 644);
this.tabDataList.Text = "数据列表";
//
// grdList
@ -288,7 +288,7 @@ namespace MES.Form
this.grdList.Location = new System.Drawing.Point(0, 0);
this.grdList.MainView = this.grdListView;
this.grdList.Name = "grdList";
this.grdList.Size = new System.Drawing.Size(1294, 737);
this.grdList.Size = new System.Drawing.Size(986, 644);
this.grdList.TabIndex = 0;
this.grdList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.grdListView});
@ -314,7 +314,7 @@ namespace MES.Form
//
this.tabDataDetail.Controls.Add(this.panelControl2);
this.tabDataDetail.Name = "tabDataDetail";
this.tabDataDetail.Size = new System.Drawing.Size(1294, 737);
this.tabDataDetail.Size = new System.Drawing.Size(986, 644);
this.tabDataDetail.Text = "数据编辑";
//
// panelControl2
@ -323,7 +323,7 @@ namespace MES.Form
this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelControl2.Location = new System.Drawing.Point(0, 0);
this.panelControl2.Name = "panelControl2";
this.panelControl2.Size = new System.Drawing.Size(1294, 737);
this.panelControl2.Size = new System.Drawing.Size(986, 644);
this.panelControl2.TabIndex = 0;
//
// layoutControl1
@ -342,7 +342,7 @@ namespace MES.Form
this.layoutControl1.Location = new System.Drawing.Point(2, 2);
this.layoutControl1.Name = "layoutControl1";
this.layoutControl1.Root = this.layoutControlGroup1;
this.layoutControl1.Size = new System.Drawing.Size(1290, 733);
this.layoutControl1.Size = new System.Drawing.Size(982, 640);
this.layoutControl1.TabIndex = 6;
this.layoutControl1.Text = "layoutControl1";
//
@ -351,7 +351,7 @@ namespace MES.Form
this.xtraTabControl2.Location = new System.Drawing.Point(12, 132);
this.xtraTabControl2.Name = "xtraTabControl2";
this.xtraTabControl2.SelectedTabPage = this.xtraTabPage1;
this.xtraTabControl2.Size = new System.Drawing.Size(1266, 589);
this.xtraTabControl2.Size = new System.Drawing.Size(958, 496);
this.xtraTabControl2.TabIndex = 10;
this.xtraTabControl2.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
this.xtraTabPage1});
@ -360,7 +360,7 @@ namespace MES.Form
//
this.xtraTabPage1.Controls.Add(this.gridControl1);
this.xtraTabPage1.Name = "xtraTabPage1";
this.xtraTabPage1.Size = new System.Drawing.Size(1260, 560);
this.xtraTabPage1.Size = new System.Drawing.Size(952, 467);
this.xtraTabPage1.Text = "采购明细";
//
// gridControl1
@ -378,10 +378,11 @@ namespace MES.Form
this.repositoryItemSearchLookUpEditrequisitioncode,
this.repositoryItemGridLookUpEditrequisitioncode,
this.repositoryItemTextEditrequisitioncode});
this.gridControl1.Size = new System.Drawing.Size(1260, 560);
this.gridControl1.Size = new System.Drawing.Size(952, 467);
this.gridControl1.TabIndex = 1;
this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gridView1});
this.gridControl1.Validated += new System.EventHandler(this.gridControl1_Validated);
//
// contextMenuStrip1
//
@ -389,19 +390,19 @@ namespace MES.Form
this.toolStripMenuItemAdd,
this.toolStripMenuItemDel});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(113, 48);
this.contextMenuStrip1.Size = new System.Drawing.Size(181, 70);
//
// toolStripMenuItemAdd
//
this.toolStripMenuItemAdd.Name = "toolStripMenuItemAdd";
this.toolStripMenuItemAdd.Size = new System.Drawing.Size(112, 22);
this.toolStripMenuItemAdd.Size = new System.Drawing.Size(180, 22);
this.toolStripMenuItemAdd.Text = "新增行";
this.toolStripMenuItemAdd.Click += new System.EventHandler(this.toolStripMenuItemAdd_Click);
//
// toolStripMenuItemDel
//
this.toolStripMenuItemDel.Name = "toolStripMenuItemDel";
this.toolStripMenuItemDel.Size = new System.Drawing.Size(112, 22);
this.toolStripMenuItemDel.Size = new System.Drawing.Size(180, 22);
this.toolStripMenuItemDel.Text = "删除行";
this.toolStripMenuItemDel.Click += new System.EventHandler(this.toolStripMenuItemDel_Click);
//
@ -432,6 +433,8 @@ namespace MES.Form
this.gridView1.Name = "gridView1";
this.gridView1.OptionsBehavior.Editable = false;
this.gridView1.OptionsView.ColumnAutoWidth = false;
this.gridView1.OptionsView.ShowFooter = true;
this.gridView1.ValidateRow += new DevExpress.XtraGrid.Views.Base.ValidateRowEventHandler(this.gridView1_ValidateRow_1);
//
// gridColumn10
//
@ -486,6 +489,7 @@ namespace MES.Form
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.repositoryItemLookUpEditmaterialid.DisplayMember = "Name";
this.repositoryItemLookUpEditmaterialid.Name = "repositoryItemLookUpEditmaterialid";
this.repositoryItemLookUpEditmaterialid.NullText = "";
this.repositoryItemLookUpEditmaterialid.ValueMember = "ID";
//
// gridColumn15
@ -552,6 +556,8 @@ namespace MES.Form
this.gridColumn20.Caption = "金额";
this.gridColumn20.FieldName = "money";
this.gridColumn20.Name = "gridColumn20";
this.gridColumn20.Summary.AddRange(new DevExpress.XtraGrid.GridSummaryItem[] {
new DevExpress.XtraGrid.GridColumnSummaryItem(DevExpress.Data.SummaryItemType.Sum, "money", "SUM={0:0.##}")});
this.gridColumn20.Visible = true;
this.gridColumn20.VisibleIndex = 8;
this.gridColumn20.Width = 201;
@ -707,15 +713,15 @@ namespace MES.Form
//
this.txtid.Location = new System.Drawing.Point(75, 12);
this.txtid.Name = "txtid";
this.txtid.Size = new System.Drawing.Size(568, 20);
this.txtid.Size = new System.Drawing.Size(414, 20);
this.txtid.StyleController = this.layoutControl1;
this.txtid.TabIndex = 1;
//
// txtbuyercode
//
this.txtbuyercode.Location = new System.Drawing.Point(710, 12);
this.txtbuyercode.Location = new System.Drawing.Point(556, 12);
this.txtbuyercode.Name = "txtbuyercode";
this.txtbuyercode.Size = new System.Drawing.Size(568, 20);
this.txtbuyercode.Size = new System.Drawing.Size(414, 20);
this.txtbuyercode.StyleController = this.layoutControl1;
this.txtbuyercode.TabIndex = 2;
//
@ -731,7 +737,7 @@ namespace MES.Form
new DevExpress.XtraEditors.Controls.EditorButton()});
this.txtbuyerdate.Properties.DisplayFormat.FormatString = "G";
this.txtbuyerdate.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.txtbuyerdate.Size = new System.Drawing.Size(568, 20);
this.txtbuyerdate.Size = new System.Drawing.Size(414, 20);
this.txtbuyerdate.StyleController = this.layoutControl1;
this.txtbuyerdate.TabIndex = 3;
//
@ -746,15 +752,15 @@ namespace MES.Form
this.txtsupplierid.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains;
this.txtsupplierid.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
this.txtsupplierid.Properties.ValueMember = "ID";
this.txtsupplierid.Size = new System.Drawing.Size(568, 20);
this.txtsupplierid.Size = new System.Drawing.Size(414, 20);
this.txtsupplierid.StyleController = this.layoutControl1;
this.txtsupplierid.TabIndex = 4;
//
// txtsuppliercode
//
this.txtsuppliercode.Location = new System.Drawing.Point(710, 60);
this.txtsuppliercode.Location = new System.Drawing.Point(556, 60);
this.txtsuppliercode.Name = "txtsuppliercode";
this.txtsuppliercode.Size = new System.Drawing.Size(568, 20);
this.txtsuppliercode.Size = new System.Drawing.Size(414, 20);
this.txtsuppliercode.StyleController = this.layoutControl1;
this.txtsuppliercode.TabIndex = 5;
//
@ -762,7 +768,7 @@ namespace MES.Form
//
this.txtdeliverdate.EditValue = null;
this.txtdeliverdate.ImeMode = System.Windows.Forms.ImeMode.Off;
this.txtdeliverdate.Location = new System.Drawing.Point(710, 36);
this.txtdeliverdate.Location = new System.Drawing.Point(556, 36);
this.txtdeliverdate.Name = "txtdeliverdate";
this.txtdeliverdate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
@ -770,7 +776,7 @@ namespace MES.Form
new DevExpress.XtraEditors.Controls.EditorButton()});
this.txtdeliverdate.Properties.DisplayFormat.FormatString = "G";
this.txtdeliverdate.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.txtdeliverdate.Size = new System.Drawing.Size(568, 20);
this.txtdeliverdate.Size = new System.Drawing.Size(414, 20);
this.txtdeliverdate.StyleController = this.layoutControl1;
this.txtdeliverdate.TabIndex = 6;
//
@ -785,15 +791,15 @@ namespace MES.Form
this.txtcreatorId.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains;
this.txtcreatorId.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
this.txtcreatorId.Properties.ValueMember = "ID";
this.txtcreatorId.Size = new System.Drawing.Size(568, 20);
this.txtcreatorId.Size = new System.Drawing.Size(414, 20);
this.txtcreatorId.StyleController = this.layoutControl1;
this.txtcreatorId.TabIndex = 7;
//
// txttotalprice
//
this.txttotalprice.Location = new System.Drawing.Point(710, 84);
this.txttotalprice.Location = new System.Drawing.Point(556, 84);
this.txttotalprice.Name = "txttotalprice";
this.txttotalprice.Size = new System.Drawing.Size(568, 20);
this.txttotalprice.Size = new System.Drawing.Size(414, 20);
this.txttotalprice.StyleController = this.layoutControl1;
this.txttotalprice.TabIndex = 8;
//
@ -801,7 +807,7 @@ namespace MES.Form
//
this.txtremark.Location = new System.Drawing.Point(75, 108);
this.txtremark.Name = "txtremark";
this.txtremark.Size = new System.Drawing.Size(1203, 20);
this.txtremark.Size = new System.Drawing.Size(895, 20);
this.txtremark.StyleController = this.layoutControl1;
this.txtremark.TabIndex = 9;
//
@ -821,7 +827,7 @@ namespace MES.Form
this.layoutControlItem5,
this.layoutControlItem8});
this.layoutControlGroup1.Name = "layoutControlGroup1";
this.layoutControlGroup1.Size = new System.Drawing.Size(1290, 733);
this.layoutControlGroup1.Size = new System.Drawing.Size(982, 640);
this.layoutControlGroup1.TextVisible = false;
//
// layoutControlItem1
@ -830,7 +836,7 @@ namespace MES.Form
this.layoutControlItem1.CustomizationFormText = "id";
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
this.layoutControlItem1.Name = "layoutControlItem1";
this.layoutControlItem1.Size = new System.Drawing.Size(635, 24);
this.layoutControlItem1.Size = new System.Drawing.Size(481, 24);
this.layoutControlItem1.Text = "id";
this.layoutControlItem1.TextSize = new System.Drawing.Size(60, 14);
//
@ -840,7 +846,7 @@ namespace MES.Form
this.layoutControlItem3.CustomizationFormText = "采购日期";
this.layoutControlItem3.Location = new System.Drawing.Point(0, 24);
this.layoutControlItem3.Name = "layoutControlItem3";
this.layoutControlItem3.Size = new System.Drawing.Size(635, 24);
this.layoutControlItem3.Size = new System.Drawing.Size(481, 24);
this.layoutControlItem3.Text = "采购日期";
this.layoutControlItem3.TextSize = new System.Drawing.Size(60, 14);
//
@ -850,7 +856,7 @@ namespace MES.Form
this.layoutControlItem4.CustomizationFormText = "供应商";
this.layoutControlItem4.Location = new System.Drawing.Point(0, 48);
this.layoutControlItem4.Name = "layoutControlItem4";
this.layoutControlItem4.Size = new System.Drawing.Size(635, 24);
this.layoutControlItem4.Size = new System.Drawing.Size(481, 24);
this.layoutControlItem4.Text = "供应商";
this.layoutControlItem4.TextSize = new System.Drawing.Size(60, 14);
//
@ -860,7 +866,7 @@ namespace MES.Form
this.layoutControlItem7.CustomizationFormText = "制单人";
this.layoutControlItem7.Location = new System.Drawing.Point(0, 72);
this.layoutControlItem7.Name = "layoutControlItem7";
this.layoutControlItem7.Size = new System.Drawing.Size(635, 24);
this.layoutControlItem7.Size = new System.Drawing.Size(481, 24);
this.layoutControlItem7.Text = "制单人";
this.layoutControlItem7.TextSize = new System.Drawing.Size(60, 14);
//
@ -870,7 +876,7 @@ namespace MES.Form
this.layoutControlItem9.CustomizationFormText = "备注";
this.layoutControlItem9.Location = new System.Drawing.Point(0, 96);
this.layoutControlItem9.Name = "layoutControlItem9";
this.layoutControlItem9.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem9.Size = new System.Drawing.Size(962, 24);
this.layoutControlItem9.Text = "备注";
this.layoutControlItem9.TextSize = new System.Drawing.Size(60, 14);
//
@ -879,7 +885,7 @@ namespace MES.Form
this.layoutControlItem10.Control = this.xtraTabControl2;
this.layoutControlItem10.Location = new System.Drawing.Point(0, 120);
this.layoutControlItem10.Name = "layoutControlItem10";
this.layoutControlItem10.Size = new System.Drawing.Size(1270, 593);
this.layoutControlItem10.Size = new System.Drawing.Size(962, 500);
this.layoutControlItem10.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem10.TextVisible = false;
//
@ -887,9 +893,9 @@ namespace MES.Form
//
this.layoutControlItem2.Control = this.txtbuyercode;
this.layoutControlItem2.CustomizationFormText = "采购单号";
this.layoutControlItem2.Location = new System.Drawing.Point(635, 0);
this.layoutControlItem2.Location = new System.Drawing.Point(481, 0);
this.layoutControlItem2.Name = "layoutControlItem2";
this.layoutControlItem2.Size = new System.Drawing.Size(635, 24);
this.layoutControlItem2.Size = new System.Drawing.Size(481, 24);
this.layoutControlItem2.Text = "采购单号";
this.layoutControlItem2.TextSize = new System.Drawing.Size(60, 14);
//
@ -897,9 +903,9 @@ namespace MES.Form
//
this.layoutControlItem6.Control = this.txtdeliverdate;
this.layoutControlItem6.CustomizationFormText = "完货日期";
this.layoutControlItem6.Location = new System.Drawing.Point(635, 24);
this.layoutControlItem6.Location = new System.Drawing.Point(481, 24);
this.layoutControlItem6.Name = "layoutControlItem6";
this.layoutControlItem6.Size = new System.Drawing.Size(635, 24);
this.layoutControlItem6.Size = new System.Drawing.Size(481, 24);
this.layoutControlItem6.Text = "完货日期";
this.layoutControlItem6.TextSize = new System.Drawing.Size(60, 14);
//
@ -907,9 +913,9 @@ namespace MES.Form
//
this.layoutControlItem5.Control = this.txtsuppliercode;
this.layoutControlItem5.CustomizationFormText = "供应商编码";
this.layoutControlItem5.Location = new System.Drawing.Point(635, 48);
this.layoutControlItem5.Location = new System.Drawing.Point(481, 48);
this.layoutControlItem5.Name = "layoutControlItem5";
this.layoutControlItem5.Size = new System.Drawing.Size(635, 24);
this.layoutControlItem5.Size = new System.Drawing.Size(481, 24);
this.layoutControlItem5.Text = "供应商编码";
this.layoutControlItem5.TextSize = new System.Drawing.Size(60, 14);
//
@ -917,9 +923,9 @@ namespace MES.Form
//
this.layoutControlItem8.Control = this.txttotalprice;
this.layoutControlItem8.CustomizationFormText = "金额";
this.layoutControlItem8.Location = new System.Drawing.Point(635, 72);
this.layoutControlItem8.Location = new System.Drawing.Point(481, 72);
this.layoutControlItem8.Name = "layoutControlItem8";
this.layoutControlItem8.Size = new System.Drawing.Size(635, 24);
this.layoutControlItem8.Size = new System.Drawing.Size(481, 24);
this.layoutControlItem8.Text = "金额";
this.layoutControlItem8.TextSize = new System.Drawing.Size(60, 14);
//
@ -927,7 +933,7 @@ namespace MES.Form
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1300, 800);
this.ClientSize = new System.Drawing.Size(992, 707);
this.Controls.Add(this.xtraTabControl1);
this.Name = "Frmbuyer";
this.Text = "采购单";

View File

@ -0,0 +1,313 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WinformGeneralDeveloperFrame;
using WinformGeneralDeveloperFrame.Commons;
using DevExpress.XtraLayout;
using MES.Entity;
using System.Data.Entity.Migrations;
using System.Data.Entity;
namespace MES.Form
{
public partial class Frmbuyerreturn : FrmBaseForm
{
private Dictionary<string, string> fieldDictionary = new Dictionary<string, string>();
public Frmbuyerreturn()
{
InitializeComponent();
}
private void Frmbuyerreturn_Load(object sender, EventArgs e)
{
InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new buyerreturnInfo(),gridControl1,new []{ "txtreturnbuyercode" , "txttotalprice" });
InitSearchDicData();
repositoryItemTextEditbuyerdetailcode.KeyDown += RepositoryItemTextEditbuyerdetailcode_KeyDown;
}
private void RepositoryItemTextEditbuyerdetailcode_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Tab)
{
using (var db = new MESDB())
{
string code = gridView1.EditingValue.ToString();
if (!string.IsNullOrEmpty(code))
{
buyerdetailInfo buyerdetailInfo = db.buyerdetailInfo
.Where(p => p.buyerdetailcode.Equals(code)).FirstOrDefault();
if (buyerdetailInfo == null)
{
"单号不存在".ShowWarning();
}
else
{
gridView1.GetFocusedDataRow()["buyerdetailcode"] = buyerdetailInfo.buyerdetailcode;
gridView1.GetFocusedDataRow()["buyercode"] = buyerdetailInfo.buyercode;
gridView1.GetFocusedDataRow()["materialid"] = buyerdetailInfo.materialid;
gridView1.GetFocusedDataRow()["materialcode"] = buyerdetailInfo.materialcode;
gridView1.GetFocusedDataRow()["materialspec"] = buyerdetailInfo.materialspec;
gridView1.GetFocusedDataRow()["unit"] = buyerdetailInfo.materialunit;
gridView1.GetFocusedDataRow()["returnnumber"] = buyerdetailInfo.buyernumber;
gridView1.GetFocusedDataRow()["unitprice"] = buyerdetailInfo.unitprice;
gridView1.GetFocusedDataRow()["money"] = buyerdetailInfo.money;
gridView1.GetFocusedDataRow()["warehouse"] = buyerdetailInfo.warehouse;
}
}
}
}
}
/// <summary>
/// 数据源初始化
/// </summary>
/// <returns></returns>
private void Init()
{
txtsupplierid.Properties.DataSource = GetDataTableUtils.SqlTable("供应商");
repositoryItemtxtsupplierid.DataSource= GetDataTableUtils.SqlTable("供应商");
txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户");
repositoryItemLookUpEditwarehouse.DataSource = GetDataTableUtils.SqlTable("仓库");
repositoryItemLookUpEditunit.DataSource = GetDataTableUtils.SqlTable("计量单位");
repositoryItemLookUpEditmaterialid.DataSource = GetDataTableUtils.SqlTable("物料");
}
/// <summary>
/// 搜索字段
/// </summary>
/// <returns></returns>
private void InitSearchDicData()
{
fieldDictionary.Add("供应商编号","suppliercode");
fieldDictionary.Add("供应商名称","supplierid");
}
public override void InitgrdListDataSource()
{
using (var con=new MESDB())///
{
grdList.DataSource=con.buyerreturnInfo.ToList();
}
Init();
}
public override void gridControlMouseDoubleClickFunction(object sender, EventArgs e)
{
buyerreturnInfo info = grdListView.GetFocusedRow() as buyerreturnInfo;
if (info != null)
{
using (var db = new MESDB())
{
gridControl1.DataSource = db.buyerreturndetailInfo.Where(p => p.buyerreturnid == info.id).ToList().ToDataTable();
gridView1.BestFitColumns();
}
}
}
/// <summary>
/// 字段为空校验
/// </summary>
/// <returns></returns>
public override bool CheckInput()
{
if(string.IsNullOrEmpty(txtreturndate.Text.ToString()))
{
"退货日期不能为空".ShowWarning();
txtreturndate.Focus();
return false;
}
if(string.IsNullOrEmpty(txtsuppliercode.EditValue.ToString()))
{
"供应商编号不能为空".ShowWarning();
txtsuppliercode.Focus();
return false;
}
if(string.IsNullOrEmpty(txtsupplierid.EditValue.ToString()))
{
"供应商名称不能为空".ShowWarning();
txtsupplierid.Focus();
return false;
}
if(string.IsNullOrEmpty(txtcreatorId.EditValue.ToString()))
{
"制单人不能为空".ShowWarning();
txtcreatorId.Focus();
return false;
}
return true;
}
/// <summary>
/// 保存
/// </summary>
/// <returns></returns>
public override bool SaveFunction()
{
string code = "PR" + DateTime.Now.GetDateTimeCode();
DataTable dt = gridControl1.DataSource as DataTable;
try
{
buyerreturnInfo info = (buyerreturnInfo)this.ControlDataToModel(new buyerreturnInfo());
using (var db = new MESDB())
{
using (var tran = db.Database.BeginTransaction())
{
try
{
Dictionary<string, List<buyerreturndetailInfo>> dic =
dt.GetDataTableData<buyerreturndetailInfo>();
if (info.id == 0) //新增
{
info.returnbuyercode = code;
db.buyerreturnInfo.Add(info);
db.SaveChanges();
txtid.Text = info.id.ToString();
txtreturnbuyercode.Text = code;
if (dt != null)
{
List<buyerreturndetailInfo> detaiListAdd =
dic["Add"];
int num = 0;
detaiListAdd.ForEach(a =>
{
num++;
string codedetail = "PRD" + DateTime.Now.GetDateTimeCode() + num;
a.buyerreturnid = info.id;
a.returnbuyercode = code;
a.returnbuyerdetailcode = codedetail;
});
db.buyerreturndetailInfo.AddRange(detaiListAdd);
db.SaveChanges();
}
}
else //更新
{
db.Entry(info).State = EntityState.Modified;
db.SaveChanges();
if (dt != null)
{
List<buyerreturndetailInfo> detaiListAdd =
dic["Add"];
int num = 0;
detaiListAdd.ForEach(a =>
{
a.returnbuyercode = info.returnbuyercode;
a.buyerreturnid = info.id;
num++;
string codedetail = "PRD" + DateTime.Now.GetDateTimeCode() + num;
a.returnbuyerdetailcode = codedetail;
});
db.buyerreturndetailInfo.AddRange(detaiListAdd);
List<buyerreturndetailInfo> detaiListEdit =
dic["Edit"];
detaiListEdit.ForEach((a) =>
{
a.returnbuyercode = info.returnbuyercode;
db.Entry(a).State = EntityState.Modified;
});
List<buyerreturndetailInfo> 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;
}
/// <summary>
/// 删除
/// </summary>
/// <returns></returns>
public override bool DelFunction()
{
try
{
buyerreturnInfo info = (buyerreturnInfo)this.ControlDataToModel(new buyerreturnInfo());
using (var db = new MESDB())
{
db.Entry(info).State=EntityState.Deleted;
db.SaveChanges();
}
}
catch (Exception ex)
{
ex.Message.ShowError();
return false;
}
return true;
}
public override void AddFunction()
{
gridControl1.DataSource = new List<buyerreturndetailInfo>().ToDataTable();
}
/// <summary>
/// 搜索
/// </summary>
/// <returns></returns>
public override void SearchFunction()
{
FrmSearch frm = new FrmSearch(fieldDictionary);
if (frm.ShowDialog()==DialogResult.OK)
{
string sql = frm.sql;
using (var db = new MESDB())
{
if (string.IsNullOrEmpty(sql))
{
grdList.DataSource = db.buyerreturnInfo.SqlQuery("select * from buyerreturn").ToList();
}
else
{
grdList.DataSource = db.buyerreturnInfo.SqlQuery($"select * from buyerreturn where {sql}").ToList();
}
}
}
}
private void toolStripMenuItemAdd_Click(object sender, EventArgs e)
{
gridView1.AddNewRow();
}
private void toolStripMenuItemDel_Click(object sender, EventArgs e)
{
gridView1.DeleteRow(gridView1.FocusedRowHandle);
}
private void txtsupplierid_EditValueChanged(object sender, EventArgs e)
{
using (var db = new MESDB())
{
supplierInfo supplier = db.supplierInfo.Find(txtsupplierid.EditValue);
txtsuppliercode.Text = supplier.suppliercode;
}
}
}
}

View File

@ -0,0 +1,884 @@
using DevExpress.XtraEditors;
using DevExpress.XtraLayout;
using DevExpress.XtraTab;
namespace MES.Form
{
partial class Frmbuyerreturn
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemtxtsupplierid = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit();
this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemtxtcreatorId = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit();
this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn7 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn();
this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
this.tabDataList = new DevExpress.XtraTab.XtraTabPage();
this.grdList = new DevExpress.XtraGrid.GridControl();
this.grdListView = new DevExpress.XtraGrid.Views.Grid.GridView();
this.tabDataDetail = new DevExpress.XtraTab.XtraTabPage();
this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
this.xtraTabControl2 = new DevExpress.XtraTab.XtraTabControl();
this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage();
this.gridControl1 = new DevExpress.XtraGrid.GridControl();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripMenuItemAdd = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItemDel = new System.Windows.Forms.ToolStripMenuItem();
this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn10 = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemTextEditbuyerdetailcode = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
this.gridColumn11 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn12 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn13 = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemLookUpEditmaterialid = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit();
this.gridColumn14 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn15 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn16 = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemLookUpEditunit = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit();
this.gridColumn17 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn18 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn19 = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemLookUpEditwarehouse = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit();
this.gridColumn20 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn21 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn22 = new DevExpress.XtraGrid.Columns.GridColumn();
this.txtid = new DevExpress.XtraEditors.TextEdit();
this.txtreturndate = new DevExpress.XtraEditors.DateEdit();
this.txtsuppliercode = new DevExpress.XtraEditors.TextEdit();
this.txtsupplierid = new DevExpress.XtraEditors.LookUpEdit();
this.txtcreatorId = new DevExpress.XtraEditors.LookUpEdit();
this.txtreturnbuyercode = new DevExpress.XtraEditors.TextEdit();
this.txttotalprice = new DevExpress.XtraEditors.TextEdit();
this.txtremark = new DevExpress.XtraEditors.TextEdit();
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtsupplierid)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
this.xtraTabControl1.SuspendLayout();
this.tabDataList.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.grdList)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.grdListView)).BeginInit();
this.tabDataDetail.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit();
this.panelControl2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
this.layoutControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl2)).BeginInit();
this.xtraTabControl2.SuspendLayout();
this.xtraTabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit();
this.contextMenuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEditbuyerdetailcode)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditmaterialid)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditunit)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditwarehouse)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtreturndate.Properties.CalendarTimeProperties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtreturndate.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtsuppliercode.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtsupplierid.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtreturnbuyercode.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txttotalprice.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
this.SuspendLayout();
//
// gridColumn1
//
this.gridColumn1.Caption = "id";
this.gridColumn1.FieldName = "id";
this.gridColumn1.Name = "gridColumn1";
//
// gridColumn2
//
this.gridColumn2.Caption = "退货日期";
this.gridColumn2.DisplayFormat.FormatString = "G";
this.gridColumn2.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.gridColumn2.FieldName = "returndate";
this.gridColumn2.Name = "gridColumn2";
this.gridColumn2.Visible = true;
this.gridColumn2.VisibleIndex = 0;
this.gridColumn2.Width = 201;
//
// gridColumn3
//
this.gridColumn3.Caption = "供应商编号";
this.gridColumn3.FieldName = "suppliercode";
this.gridColumn3.Name = "gridColumn3";
this.gridColumn3.Visible = true;
this.gridColumn3.VisibleIndex = 1;
this.gridColumn3.Width = 201;
//
// gridColumn4
//
this.gridColumn4.Caption = "供应商名称";
this.gridColumn4.ColumnEdit = this.repositoryItemtxtsupplierid;
this.gridColumn4.FieldName = "supplierid";
this.gridColumn4.Name = "gridColumn4";
this.gridColumn4.Visible = true;
this.gridColumn4.VisibleIndex = 2;
this.gridColumn4.Width = 201;
//
// repositoryItemtxtsupplierid
//
this.repositoryItemtxtsupplierid.AutoHeight = false;
this.repositoryItemtxtsupplierid.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.repositoryItemtxtsupplierid.DisplayMember = "Name";
this.repositoryItemtxtsupplierid.Name = "repositoryItemtxtsupplierid";
this.repositoryItemtxtsupplierid.ValueMember = "ID";
//
// gridColumn5
//
this.gridColumn5.Caption = "制单人";
this.gridColumn5.ColumnEdit = this.repositoryItemtxtcreatorId;
this.gridColumn5.FieldName = "creatorId";
this.gridColumn5.Name = "gridColumn5";
this.gridColumn5.Visible = true;
this.gridColumn5.VisibleIndex = 3;
this.gridColumn5.Width = 201;
//
// repositoryItemtxtcreatorId
//
this.repositoryItemtxtcreatorId.AutoHeight = false;
this.repositoryItemtxtcreatorId.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.repositoryItemtxtcreatorId.DisplayMember = "Name";
this.repositoryItemtxtcreatorId.Name = "repositoryItemtxtcreatorId";
this.repositoryItemtxtcreatorId.ValueMember = "ID";
//
// gridColumn6
//
this.gridColumn6.Caption = "采购退货单号";
this.gridColumn6.FieldName = "returnbuyercode";
this.gridColumn6.Name = "gridColumn6";
this.gridColumn6.Visible = true;
this.gridColumn6.VisibleIndex = 4;
this.gridColumn6.Width = 201;
//
// gridColumn7
//
this.gridColumn7.Caption = "金额";
this.gridColumn7.FieldName = "totalprice";
this.gridColumn7.Name = "gridColumn7";
this.gridColumn7.Visible = true;
this.gridColumn7.VisibleIndex = 5;
this.gridColumn7.Width = 201;
//
// gridColumn8
//
this.gridColumn8.Caption = "备注";
this.gridColumn8.FieldName = "remark";
this.gridColumn8.Name = "gridColumn8";
this.gridColumn8.Visible = true;
this.gridColumn8.VisibleIndex = 6;
this.gridColumn8.Width = 201;
//
// xtraTabControl1
//
this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.xtraTabControl1.Location = new System.Drawing.Point(0, 34);
this.xtraTabControl1.Name = "xtraTabControl1";
this.xtraTabControl1.SelectedTabPage = this.tabDataList;
this.xtraTabControl1.Size = new System.Drawing.Size(1300, 766);
this.xtraTabControl1.TabIndex = 1;
this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
this.tabDataList,
this.tabDataDetail});
//
// tabDataList
//
this.tabDataList.Controls.Add(this.grdList);
this.tabDataList.Name = "tabDataList";
this.tabDataList.Size = new System.Drawing.Size(1294, 737);
this.tabDataList.Text = "数据列表";
//
// grdList
//
this.grdList.Dock = System.Windows.Forms.DockStyle.Fill;
this.grdList.Location = new System.Drawing.Point(0, 0);
this.grdList.MainView = this.grdListView;
this.grdList.Name = "grdList";
this.grdList.Size = new System.Drawing.Size(1294, 737);
this.grdList.TabIndex = 0;
this.grdList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.grdListView});
//
// grdListView
//
this.grdListView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
this.gridColumn1,
this.gridColumn2,
this.gridColumn3,
this.gridColumn4,
this.gridColumn5,
this.gridColumn6,
this.gridColumn7,
this.gridColumn8});
this.grdListView.GridControl = this.grdList;
this.grdListView.Name = "grdListView";
this.grdListView.OptionsBehavior.Editable = false;
this.grdListView.OptionsView.ColumnAutoWidth = false;
//
// tabDataDetail
//
this.tabDataDetail.Controls.Add(this.panelControl2);
this.tabDataDetail.Name = "tabDataDetail";
this.tabDataDetail.Size = new System.Drawing.Size(1294, 737);
this.tabDataDetail.Text = "数据编辑";
//
// panelControl2
//
this.panelControl2.Controls.Add(this.layoutControl1);
this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelControl2.Location = new System.Drawing.Point(0, 0);
this.panelControl2.Name = "panelControl2";
this.panelControl2.Size = new System.Drawing.Size(1294, 737);
this.panelControl2.TabIndex = 0;
//
// layoutControl1
//
this.layoutControl1.Controls.Add(this.xtraTabControl2);
this.layoutControl1.Controls.Add(this.txtid);
this.layoutControl1.Controls.Add(this.txtreturndate);
this.layoutControl1.Controls.Add(this.txtsuppliercode);
this.layoutControl1.Controls.Add(this.txtsupplierid);
this.layoutControl1.Controls.Add(this.txtcreatorId);
this.layoutControl1.Controls.Add(this.txtreturnbuyercode);
this.layoutControl1.Controls.Add(this.txttotalprice);
this.layoutControl1.Controls.Add(this.txtremark);
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutControl1.Location = new System.Drawing.Point(2, 2);
this.layoutControl1.Name = "layoutControl1";
this.layoutControl1.Root = this.layoutControlGroup1;
this.layoutControl1.Size = new System.Drawing.Size(1290, 733);
this.layoutControl1.TabIndex = 6;
this.layoutControl1.Text = "layoutControl1";
//
// xtraTabControl2
//
this.xtraTabControl2.Location = new System.Drawing.Point(12, 132);
this.xtraTabControl2.Name = "xtraTabControl2";
this.xtraTabControl2.SelectedTabPage = this.xtraTabPage1;
this.xtraTabControl2.Size = new System.Drawing.Size(1266, 589);
this.xtraTabControl2.TabIndex = 9;
this.xtraTabControl2.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
this.xtraTabPage1});
//
// xtraTabPage1
//
this.xtraTabPage1.Controls.Add(this.gridControl1);
this.xtraTabPage1.Name = "xtraTabPage1";
this.xtraTabPage1.Size = new System.Drawing.Size(1260, 560);
this.xtraTabPage1.Text = "明细";
//
// gridControl1
//
this.gridControl1.ContextMenuStrip = this.contextMenuStrip1;
this.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridControl1.Location = new System.Drawing.Point(0, 0);
this.gridControl1.MainView = this.gridView1;
this.gridControl1.Name = "gridControl1";
this.gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
this.repositoryItemLookUpEditmaterialid,
this.repositoryItemLookUpEditunit,
this.repositoryItemLookUpEditwarehouse,
this.repositoryItemTextEditbuyerdetailcode});
this.gridControl1.Size = new System.Drawing.Size(1260, 560);
this.gridControl1.TabIndex = 1;
this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gridView1});
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItemAdd,
this.toolStripMenuItemDel});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(113, 48);
//
// toolStripMenuItemAdd
//
this.toolStripMenuItemAdd.Name = "toolStripMenuItemAdd";
this.toolStripMenuItemAdd.Size = new System.Drawing.Size(112, 22);
this.toolStripMenuItemAdd.Text = "新增行";
this.toolStripMenuItemAdd.Click += new System.EventHandler(this.toolStripMenuItemAdd_Click);
//
// toolStripMenuItemDel
//
this.toolStripMenuItemDel.Name = "toolStripMenuItemDel";
this.toolStripMenuItemDel.Size = new System.Drawing.Size(112, 22);
this.toolStripMenuItemDel.Text = "删除行";
this.toolStripMenuItemDel.Click += new System.EventHandler(this.toolStripMenuItemDel_Click);
//
// gridView1
//
this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
this.gridColumn9,
this.gridColumn10,
this.gridColumn11,
this.gridColumn12,
this.gridColumn13,
this.gridColumn14,
this.gridColumn15,
this.gridColumn16,
this.gridColumn17,
this.gridColumn18,
this.gridColumn19,
this.gridColumn20,
this.gridColumn21,
this.gridColumn22});
this.gridView1.GridControl = this.gridControl1;
this.gridView1.Name = "gridView1";
this.gridView1.OptionsBehavior.Editable = false;
this.gridView1.OptionsView.ColumnAutoWidth = false;
//
// gridColumn9
//
this.gridColumn9.Caption = "id";
this.gridColumn9.FieldName = "id";
this.gridColumn9.Name = "gridColumn9";
this.gridColumn9.Width = 201;
//
// gridColumn10
//
this.gridColumn10.Caption = "采购明细单号";
this.gridColumn10.ColumnEdit = this.repositoryItemTextEditbuyerdetailcode;
this.gridColumn10.FieldName = "buyerdetailcode";
this.gridColumn10.Name = "gridColumn10";
this.gridColumn10.Visible = true;
this.gridColumn10.VisibleIndex = 0;
this.gridColumn10.Width = 201;
//
// repositoryItemTextEditbuyerdetailcode
//
this.repositoryItemTextEditbuyerdetailcode.AutoHeight = false;
this.repositoryItemTextEditbuyerdetailcode.Name = "repositoryItemTextEditbuyerdetailcode";
//
// gridColumn11
//
this.gridColumn11.Caption = "采购单号";
this.gridColumn11.FieldName = "buyercode";
this.gridColumn11.Name = "gridColumn11";
this.gridColumn11.OptionsColumn.AllowEdit = false;
this.gridColumn11.Visible = true;
this.gridColumn11.VisibleIndex = 1;
this.gridColumn11.Width = 201;
//
// gridColumn12
//
this.gridColumn12.Caption = "物料编码";
this.gridColumn12.FieldName = "materialcode";
this.gridColumn12.Name = "gridColumn12";
this.gridColumn12.OptionsColumn.AllowEdit = false;
this.gridColumn12.Visible = true;
this.gridColumn12.VisibleIndex = 2;
this.gridColumn12.Width = 201;
//
// gridColumn13
//
this.gridColumn13.Caption = "物料名称";
this.gridColumn13.ColumnEdit = this.repositoryItemLookUpEditmaterialid;
this.gridColumn13.FieldName = "materialid";
this.gridColumn13.Name = "gridColumn13";
this.gridColumn13.OptionsColumn.AllowEdit = false;
this.gridColumn13.Visible = true;
this.gridColumn13.VisibleIndex = 3;
this.gridColumn13.Width = 201;
//
// repositoryItemLookUpEditmaterialid
//
this.repositoryItemLookUpEditmaterialid.AutoHeight = false;
this.repositoryItemLookUpEditmaterialid.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.repositoryItemLookUpEditmaterialid.DisplayMember = "Name";
this.repositoryItemLookUpEditmaterialid.Name = "repositoryItemLookUpEditmaterialid";
this.repositoryItemLookUpEditmaterialid.NullText = "";
this.repositoryItemLookUpEditmaterialid.ValueMember = "ID";
//
// gridColumn14
//
this.gridColumn14.Caption = "规格型号";
this.gridColumn14.FieldName = "materialspec";
this.gridColumn14.Name = "gridColumn14";
this.gridColumn14.OptionsColumn.AllowEdit = false;
this.gridColumn14.Visible = true;
this.gridColumn14.VisibleIndex = 4;
this.gridColumn14.Width = 201;
//
// gridColumn15
//
this.gridColumn15.Caption = "退货数量";
this.gridColumn15.FieldName = "returnnumber";
this.gridColumn15.Name = "gridColumn15";
this.gridColumn15.Visible = true;
this.gridColumn15.VisibleIndex = 5;
this.gridColumn15.Width = 201;
//
// gridColumn16
//
this.gridColumn16.Caption = "计量单位";
this.gridColumn16.ColumnEdit = this.repositoryItemLookUpEditunit;
this.gridColumn16.FieldName = "unit";
this.gridColumn16.Name = "gridColumn16";
this.gridColumn16.OptionsColumn.AllowEdit = false;
this.gridColumn16.Visible = true;
this.gridColumn16.VisibleIndex = 6;
this.gridColumn16.Width = 201;
//
// repositoryItemLookUpEditunit
//
this.repositoryItemLookUpEditunit.AutoHeight = false;
this.repositoryItemLookUpEditunit.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.repositoryItemLookUpEditunit.DisplayMember = "Name";
this.repositoryItemLookUpEditunit.Name = "repositoryItemLookUpEditunit";
this.repositoryItemLookUpEditunit.NullText = "";
this.repositoryItemLookUpEditunit.ValueMember = "ID";
//
// gridColumn17
//
this.gridColumn17.Caption = "采购单价";
this.gridColumn17.FieldName = "unitprice";
this.gridColumn17.Name = "gridColumn17";
this.gridColumn17.OptionsColumn.AllowEdit = false;
this.gridColumn17.Visible = true;
this.gridColumn17.VisibleIndex = 7;
this.gridColumn17.Width = 201;
//
// gridColumn18
//
this.gridColumn18.Caption = "金额";
this.gridColumn18.FieldName = "money";
this.gridColumn18.Name = "gridColumn18";
this.gridColumn18.OptionsColumn.AllowEdit = false;
this.gridColumn18.Visible = true;
this.gridColumn18.VisibleIndex = 8;
this.gridColumn18.Width = 201;
//
// gridColumn19
//
this.gridColumn19.Caption = "仓库";
this.gridColumn19.ColumnEdit = this.repositoryItemLookUpEditwarehouse;
this.gridColumn19.FieldName = "warehouse";
this.gridColumn19.Name = "gridColumn19";
this.gridColumn19.OptionsColumn.AllowEdit = false;
this.gridColumn19.Visible = true;
this.gridColumn19.VisibleIndex = 9;
this.gridColumn19.Width = 201;
//
// repositoryItemLookUpEditwarehouse
//
this.repositoryItemLookUpEditwarehouse.AutoHeight = false;
this.repositoryItemLookUpEditwarehouse.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.repositoryItemLookUpEditwarehouse.DisplayMember = "Name";
this.repositoryItemLookUpEditwarehouse.Name = "repositoryItemLookUpEditwarehouse";
this.repositoryItemLookUpEditwarehouse.ValueMember = "ID";
//
// gridColumn20
//
this.gridColumn20.Caption = "退货单号";
this.gridColumn20.FieldName = "returnbuyercode";
this.gridColumn20.Name = "gridColumn20";
this.gridColumn20.OptionsColumn.AllowEdit = false;
this.gridColumn20.Visible = true;
this.gridColumn20.VisibleIndex = 10;
this.gridColumn20.Width = 201;
//
// gridColumn21
//
this.gridColumn21.Caption = "退货明细单号";
this.gridColumn21.FieldName = "returnbuyerdetailcode";
this.gridColumn21.Name = "gridColumn21";
this.gridColumn21.OptionsColumn.AllowEdit = false;
this.gridColumn21.Visible = true;
this.gridColumn21.VisibleIndex = 11;
this.gridColumn21.Width = 201;
//
// gridColumn22
//
this.gridColumn22.Caption = "备注";
this.gridColumn22.FieldName = "remark";
this.gridColumn22.Name = "gridColumn22";
this.gridColumn22.Visible = true;
this.gridColumn22.VisibleIndex = 12;
this.gridColumn22.Width = 201;
//
// txtid
//
this.txtid.Location = new System.Drawing.Point(87, 12);
this.txtid.Name = "txtid";
this.txtid.Size = new System.Drawing.Size(556, 20);
this.txtid.StyleController = this.layoutControl1;
this.txtid.TabIndex = 1;
//
// txtreturndate
//
this.txtreturndate.EditValue = null;
this.txtreturndate.ImeMode = System.Windows.Forms.ImeMode.Off;
this.txtreturndate.Location = new System.Drawing.Point(722, 60);
this.txtreturndate.Name = "txtreturndate";
this.txtreturndate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txtreturndate.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton()});
this.txtreturndate.Properties.DisplayFormat.FormatString = "G";
this.txtreturndate.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.txtreturndate.Size = new System.Drawing.Size(556, 20);
this.txtreturndate.StyleController = this.layoutControl1;
this.txtreturndate.TabIndex = 2;
//
// txtsuppliercode
//
this.txtsuppliercode.Location = new System.Drawing.Point(722, 36);
this.txtsuppliercode.Name = "txtsuppliercode";
this.txtsuppliercode.Size = new System.Drawing.Size(556, 20);
this.txtsuppliercode.StyleController = this.layoutControl1;
this.txtsuppliercode.TabIndex = 3;
//
// txtsupplierid
//
this.txtsupplierid.EditValue = "";
this.txtsupplierid.Location = new System.Drawing.Point(87, 36);
this.txtsupplierid.Name = "txtsupplierid";
this.txtsupplierid.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txtsupplierid.Properties.DisplayMember = "Name";
this.txtsupplierid.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains;
this.txtsupplierid.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
this.txtsupplierid.Properties.ValueMember = "ID";
this.txtsupplierid.Size = new System.Drawing.Size(556, 20);
this.txtsupplierid.StyleController = this.layoutControl1;
this.txtsupplierid.TabIndex = 4;
this.txtsupplierid.EditValueChanged += new System.EventHandler(this.txtsupplierid_EditValueChanged);
//
// txtcreatorId
//
this.txtcreatorId.EditValue = "";
this.txtcreatorId.Location = new System.Drawing.Point(87, 60);
this.txtcreatorId.Name = "txtcreatorId";
this.txtcreatorId.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.txtcreatorId.Properties.DisplayMember = "Name";
this.txtcreatorId.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains;
this.txtcreatorId.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
this.txtcreatorId.Properties.ValueMember = "ID";
this.txtcreatorId.Size = new System.Drawing.Size(556, 20);
this.txtcreatorId.StyleController = this.layoutControl1;
this.txtcreatorId.TabIndex = 5;
//
// txtreturnbuyercode
//
this.txtreturnbuyercode.Location = new System.Drawing.Point(722, 12);
this.txtreturnbuyercode.Name = "txtreturnbuyercode";
this.txtreturnbuyercode.Size = new System.Drawing.Size(556, 20);
this.txtreturnbuyercode.StyleController = this.layoutControl1;
this.txtreturnbuyercode.TabIndex = 6;
//
// txttotalprice
//
this.txttotalprice.Location = new System.Drawing.Point(87, 84);
this.txttotalprice.Name = "txttotalprice";
this.txttotalprice.Size = new System.Drawing.Size(1191, 20);
this.txttotalprice.StyleController = this.layoutControl1;
this.txttotalprice.TabIndex = 7;
//
// txtremark
//
this.txtremark.Location = new System.Drawing.Point(87, 108);
this.txtremark.Name = "txtremark";
this.txtremark.Size = new System.Drawing.Size(1191, 20);
this.txtremark.StyleController = this.layoutControl1;
this.txtremark.TabIndex = 8;
//
// layoutControlGroup1
//
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
this.layoutControlItem1,
this.layoutControlItem5,
this.layoutControlItem7,
this.layoutControlItem8,
this.layoutControlItem6,
this.layoutControlItem2,
this.layoutControlItem9,
this.layoutControlItem4,
this.layoutControlItem3});
this.layoutControlGroup1.Name = "layoutControlGroup1";
this.layoutControlGroup1.Size = new System.Drawing.Size(1290, 733);
this.layoutControlGroup1.TextVisible = false;
//
// layoutControlItem1
//
this.layoutControlItem1.Control = this.txtid;
this.layoutControlItem1.CustomizationFormText = "id";
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
this.layoutControlItem1.Name = "layoutControlItem1";
this.layoutControlItem1.Size = new System.Drawing.Size(635, 24);
this.layoutControlItem1.Text = "id";
this.layoutControlItem1.TextSize = new System.Drawing.Size(72, 14);
//
// layoutControlItem3
//
this.layoutControlItem3.Control = this.txtsuppliercode;
this.layoutControlItem3.CustomizationFormText = "供应商编号";
this.layoutControlItem3.Location = new System.Drawing.Point(635, 24);
this.layoutControlItem3.Name = "layoutControlItem3";
this.layoutControlItem3.Size = new System.Drawing.Size(635, 24);
this.layoutControlItem3.Text = "供应商编号";
this.layoutControlItem3.TextSize = new System.Drawing.Size(72, 14);
//
// layoutControlItem5
//
this.layoutControlItem5.Control = this.txtcreatorId;
this.layoutControlItem5.CustomizationFormText = "制单人";
this.layoutControlItem5.Location = new System.Drawing.Point(0, 48);
this.layoutControlItem5.Name = "layoutControlItem5";
this.layoutControlItem5.Size = new System.Drawing.Size(635, 24);
this.layoutControlItem5.Text = "制单人";
this.layoutControlItem5.TextSize = new System.Drawing.Size(72, 14);
//
// layoutControlItem7
//
this.layoutControlItem7.Control = this.txttotalprice;
this.layoutControlItem7.CustomizationFormText = "金额";
this.layoutControlItem7.Location = new System.Drawing.Point(0, 72);
this.layoutControlItem7.Name = "layoutControlItem7";
this.layoutControlItem7.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem7.Text = "金额";
this.layoutControlItem7.TextSize = new System.Drawing.Size(72, 14);
//
// layoutControlItem8
//
this.layoutControlItem8.Control = this.txtremark;
this.layoutControlItem8.CustomizationFormText = "备注";
this.layoutControlItem8.Location = new System.Drawing.Point(0, 96);
this.layoutControlItem8.Name = "layoutControlItem8";
this.layoutControlItem8.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem8.Text = "备注";
this.layoutControlItem8.TextSize = new System.Drawing.Size(72, 14);
//
// layoutControlItem6
//
this.layoutControlItem6.Control = this.txtreturnbuyercode;
this.layoutControlItem6.CustomizationFormText = "采购退货单号";
this.layoutControlItem6.Location = new System.Drawing.Point(635, 0);
this.layoutControlItem6.Name = "layoutControlItem6";
this.layoutControlItem6.Size = new System.Drawing.Size(635, 24);
this.layoutControlItem6.Text = "采购退货单号";
this.layoutControlItem6.TextSize = new System.Drawing.Size(72, 14);
//
// layoutControlItem4
//
this.layoutControlItem4.Control = this.txtsupplierid;
this.layoutControlItem4.CustomizationFormText = "供应商名称";
this.layoutControlItem4.Location = new System.Drawing.Point(0, 24);
this.layoutControlItem4.Name = "layoutControlItem4";
this.layoutControlItem4.Size = new System.Drawing.Size(635, 24);
this.layoutControlItem4.Text = "供应商名称";
this.layoutControlItem4.TextSize = new System.Drawing.Size(72, 14);
//
// layoutControlItem2
//
this.layoutControlItem2.Control = this.txtreturndate;
this.layoutControlItem2.CustomizationFormText = "退货日期";
this.layoutControlItem2.Location = new System.Drawing.Point(635, 48);
this.layoutControlItem2.Name = "layoutControlItem2";
this.layoutControlItem2.Size = new System.Drawing.Size(635, 24);
this.layoutControlItem2.Text = "退货日期";
this.layoutControlItem2.TextSize = new System.Drawing.Size(72, 14);
//
// layoutControlItem9
//
this.layoutControlItem9.Control = this.xtraTabControl2;
this.layoutControlItem9.Location = new System.Drawing.Point(0, 120);
this.layoutControlItem9.Name = "layoutControlItem9";
this.layoutControlItem9.Size = new System.Drawing.Size(1270, 593);
this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem9.TextVisible = false;
//
// Frmbuyerreturn
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1300, 800);
this.Controls.Add(this.xtraTabControl1);
this.Name = "Frmbuyerreturn";
this.Text = "采购退货单";
this.Load += new System.EventHandler(this.Frmbuyerreturn_Load);
this.Controls.SetChildIndex(this.xtraTabControl1, 0);
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtsupplierid)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcreatorId)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit();
this.xtraTabControl1.ResumeLayout(false);
this.tabDataList.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.grdList)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.grdListView)).EndInit();
this.tabDataDetail.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit();
this.panelControl2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
this.layoutControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl2)).EndInit();
this.xtraTabControl2.ResumeLayout(false);
this.xtraTabPage1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit();
this.contextMenuStrip1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEditbuyerdetailcode)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditmaterialid)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditunit)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEditwarehouse)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtreturndate.Properties.CalendarTimeProperties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtreturndate.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtsuppliercode.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtsupplierid.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtcreatorId.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtreturnbuyercode.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txttotalprice.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
this.ResumeLayout(false);
}
#endregion
private XtraTabControl xtraTabControl1;
private XtraTabPage tabDataList;
private XtraTabPage tabDataDetail;
private DevExpress.XtraGrid.GridControl grdList;
private DevExpress.XtraGrid.Views.Grid.GridView grdListView;
private PanelControl panelControl2;
private DevExpress.XtraLayout.LayoutControl layoutControl1;
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn1;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn2;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn3;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn4;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn5;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn6;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn7;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn8;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtid;
///////////////////////////////
private DevExpress.XtraEditors.DateEdit txtreturndate;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtsuppliercode;
private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtsupplierid;
private DevExpress.XtraEditors.LookUpEdit txtsupplierid;
private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemtxtcreatorId;
private DevExpress.XtraEditors.LookUpEdit txtcreatorId;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtreturnbuyercode;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txttotalprice;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtremark;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
private XtraTabControl xtraTabControl2;
private XtraTabPage xtraTabPage1;
private LayoutControlItem layoutControlItem9;
private DevExpress.XtraGrid.GridControl gridControl1;
private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn9;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn10;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn11;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn12;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn13;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn14;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn15;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn16;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn17;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn18;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn19;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn20;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn21;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn22;
private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemLookUpEditmaterialid;
private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemLookUpEditunit;
private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemLookUpEditwarehouse;
private DevExpress.XtraEditors.Repository.RepositoryItemTextEdit repositoryItemTextEditbuyerdetailcode;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemAdd;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemDel;
}
}

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -0,0 +1,214 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WinformGeneralDeveloperFrame;
using WinformGeneralDeveloperFrame.Commons;
using DevExpress.XtraLayout;
using MES.Entity;
using System.Data.Entity.Migrations;
using System.Data.Entity;
namespace MES.Form
{
public partial class Frmbuyerreturndetail : FrmBaseForm
{
private Dictionary<string, string> fieldDictionary = new Dictionary<string, string>();
public Frmbuyerreturndetail()
{
InitializeComponent();
}
private void Frmbuyerreturndetail_Load(object sender, EventArgs e)
{
InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new buyerreturndetailInfo());
InitSearchDicData();
}
/// <summary>
/// 数据源初始化
/// </summary>
/// <returns></returns>
private void Init()
{
}
/// <summary>
/// 搜索字段
/// </summary>
/// <returns></returns>
private void InitSearchDicData()
{
fieldDictionary.Add("id","id");
fieldDictionary.Add("采购明细单号","buyerdetailcode");
fieldDictionary.Add("采购单号","buyercode");
fieldDictionary.Add("物料编码","materialcode");
fieldDictionary.Add("物料名称","materialid");
fieldDictionary.Add("规格型号","materialspec");
fieldDictionary.Add("退货数量","returnnumber");
fieldDictionary.Add("计量单位","unit");
fieldDictionary.Add("采购单价","unitprice");
fieldDictionary.Add("金额","money");
fieldDictionary.Add("仓库","warehouse");
fieldDictionary.Add("退货单号","returnbuyercode");
fieldDictionary.Add("退货明细单号","returnbuyerdetailcode");
fieldDictionary.Add("备注","remark");
}
public override void InitgrdListDataSource()
{
using (var con=new MESDB())///
{
grdList.DataSource=con.buyerreturndetailInfo.ToList();
}
Init();
}
/// <summary>
/// 字段为空校验
/// </summary>
/// <returns></returns>
public override bool CheckInput()
{
if(string.IsNullOrEmpty(txtbuyerdetailcode.EditValue.ToString()))
{
"采购明细单号不能为空".ShowWarning();
txtbuyerdetailcode.Focus();
return false;
}
if(string.IsNullOrEmpty(txtbuyercode.EditValue.ToString()))
{
"采购单号不能为空".ShowWarning();
txtbuyercode.Focus();
return false;
}
if(string.IsNullOrEmpty(txtmaterialcode.EditValue.ToString()))
{
"物料编码不能为空".ShowWarning();
txtmaterialcode.Focus();
return false;
}
if(string.IsNullOrEmpty(txtmaterialid.EditValue.ToString()))
{
"物料名称不能为空".ShowWarning();
txtmaterialid.Focus();
return false;
}
if(string.IsNullOrEmpty(txtmaterialspec.EditValue.ToString()))
{
"规格型号不能为空".ShowWarning();
txtmaterialspec.Focus();
return false;
}
if(string.IsNullOrEmpty(txtreturnnumber.EditValue.ToString()))
{
"退货数量不能为空".ShowWarning();
txtreturnnumber.Focus();
return false;
}
if(string.IsNullOrEmpty(txtunit.EditValue.ToString()))
{
"计量单位不能为空".ShowWarning();
txtunit.Focus();
return false;
}
if(string.IsNullOrEmpty(txtunitprice.EditValue.ToString()))
{
"采购单价不能为空".ShowWarning();
txtunitprice.Focus();
return false;
}
if(string.IsNullOrEmpty(txtmoney.EditValue.ToString()))
{
"金额不能为空".ShowWarning();
txtmoney.Focus();
return false;
}
if(string.IsNullOrEmpty(txtwarehouse.EditValue.ToString()))
{
"仓库不能为空".ShowWarning();
txtwarehouse.Focus();
return false;
}
if(string.IsNullOrEmpty(txtreturnbuyercode.EditValue.ToString()))
{
"退货单号不能为空".ShowWarning();
txtreturnbuyercode.Focus();
return false;
}
if(string.IsNullOrEmpty(txtreturnbuyerdetailcode.EditValue.ToString()))
{
"退货明细单号不能为空".ShowWarning();
txtreturnbuyerdetailcode.Focus();
return false;
}
return true;
}
/// <summary>
/// 保存
/// </summary>
/// <returns></returns>
public override bool SaveFunction()
{
try
{
buyerreturndetailInfo info= (buyerreturndetailInfo)this.ControlDataToModel(new buyerreturndetailInfo());
using (var db = new MESDB())
{
db.buyerreturndetailInfo.AddOrUpdate(info);
db.SaveChanges();
}
}
catch (Exception ex)
{
ex.Message.ShowError();
return false;
}
return true;
}
/// <summary>
/// 删除
/// </summary>
/// <returns></returns>
public override bool DelFunction()
{
try
{
buyerreturndetailInfo info = (buyerreturndetailInfo)this.ControlDataToModel(new buyerreturndetailInfo());
using (var db = new MESDB())
{
db.Entry(info).State=EntityState.Deleted;
db.SaveChanges();
}
}
catch (Exception ex)
{
ex.Message.ShowError();
return false;
}
return true;
}
/// <summary>
/// 搜索
/// </summary>
/// <returns></returns>
public override void SearchFunction()
{
FrmSearch frm = new FrmSearch(fieldDictionary);
if (frm.ShowDialog()==DialogResult.OK)
{
string sql = frm.sql;
using (var db = new MESDB())
{
if (string.IsNullOrEmpty(sql))
{
grdList.DataSource = db.buyerreturndetailInfo.SqlQuery("select * from buyerreturndetail").ToList();
}
else
{
grdList.DataSource = db.buyerreturndetailInfo.SqlQuery($"select * from buyerreturndetail where {sql}").ToList();
}
}
}
}
}
}

View File

@ -0,0 +1,742 @@
using DevExpress.XtraEditors;
using DevExpress.XtraLayout;
using DevExpress.XtraTab;
namespace MES.Form
{
partial class Frmbuyerreturndetail
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn7 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn10 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn11 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn12 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn13 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn14 = new DevExpress.XtraGrid.Columns.GridColumn();
this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
this.tabDataList = new DevExpress.XtraTab.XtraTabPage();
this.grdList = new DevExpress.XtraGrid.GridControl();
this.grdListView = new DevExpress.XtraGrid.Views.Grid.GridView();
this.tabDataDetail = new DevExpress.XtraTab.XtraTabPage();
this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtid = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtbuyerdetailcode = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtbuyercode = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtmaterialcode = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtmaterialid = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtmaterialspec = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtreturnnumber = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtunit = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtunitprice = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtmoney = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtwarehouse = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtreturnbuyercode = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtreturnbuyerdetailcode = new DevExpress.XtraEditors.TextEdit();
this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
this.txtremark = new DevExpress.XtraEditors.TextEdit();
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
this.xtraTabControl1.SuspendLayout();
this.tabDataList.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.grdList)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.grdListView)).BeginInit();
this.tabDataDetail.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit();
this.panelControl2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
this.layoutControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtbuyerdetailcode.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtbuyercode.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtmaterialcode.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtmaterialid.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtmaterialspec.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtreturnnumber.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtunitprice.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtmoney.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtreturnbuyercode.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtreturnbuyerdetailcode.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).BeginInit();
this.SuspendLayout();
//
// gridColumn1
//
this.gridColumn1.Caption = "id";
this.gridColumn1.FieldName = "id";
this.gridColumn1.Name = "gridColumn1";
this.gridColumn1.Visible = true;
this.gridColumn1.VisibleIndex = 0;
this.gridColumn1.Width = 201;
//
// gridColumn2
//
this.gridColumn2.Caption = "采购明细单号";
this.gridColumn2.FieldName = "buyerdetailcode";
this.gridColumn2.Name = "gridColumn2";
this.gridColumn2.Visible = true;
this.gridColumn2.VisibleIndex = 1;
this.gridColumn2.Width = 201;
//
// gridColumn3
//
this.gridColumn3.Caption = "采购单号";
this.gridColumn3.FieldName = "buyercode";
this.gridColumn3.Name = "gridColumn3";
this.gridColumn3.Visible = true;
this.gridColumn3.VisibleIndex = 2;
this.gridColumn3.Width = 201;
//
// gridColumn4
//
this.gridColumn4.Caption = "物料编码";
this.gridColumn4.FieldName = "materialcode";
this.gridColumn4.Name = "gridColumn4";
this.gridColumn4.Visible = true;
this.gridColumn4.VisibleIndex = 3;
this.gridColumn4.Width = 201;
//
// gridColumn5
//
this.gridColumn5.Caption = "物料名称";
this.gridColumn5.FieldName = "materialid";
this.gridColumn5.Name = "gridColumn5";
this.gridColumn5.Visible = true;
this.gridColumn5.VisibleIndex = 4;
this.gridColumn5.Width = 201;
//
// gridColumn6
//
this.gridColumn6.Caption = "规格型号";
this.gridColumn6.FieldName = "materialspec";
this.gridColumn6.Name = "gridColumn6";
this.gridColumn6.Visible = true;
this.gridColumn6.VisibleIndex = 5;
this.gridColumn6.Width = 201;
//
// gridColumn7
//
this.gridColumn7.Caption = "退货数量";
this.gridColumn7.FieldName = "returnnumber";
this.gridColumn7.Name = "gridColumn7";
this.gridColumn7.Visible = true;
this.gridColumn7.VisibleIndex = 6;
this.gridColumn7.Width = 201;
//
// gridColumn8
//
this.gridColumn8.Caption = "计量单位";
this.gridColumn8.FieldName = "unit";
this.gridColumn8.Name = "gridColumn8";
this.gridColumn8.Visible = true;
this.gridColumn8.VisibleIndex = 7;
this.gridColumn8.Width = 201;
//
// gridColumn9
//
this.gridColumn9.Caption = "采购单价";
this.gridColumn9.FieldName = "unitprice";
this.gridColumn9.Name = "gridColumn9";
this.gridColumn9.Visible = true;
this.gridColumn9.VisibleIndex = 8;
this.gridColumn9.Width = 201;
//
// gridColumn10
//
this.gridColumn10.Caption = "金额";
this.gridColumn10.FieldName = "money";
this.gridColumn10.Name = "gridColumn10";
this.gridColumn10.Visible = true;
this.gridColumn10.VisibleIndex = 9;
this.gridColumn10.Width = 201;
//
// gridColumn11
//
this.gridColumn11.Caption = "仓库";
this.gridColumn11.FieldName = "warehouse";
this.gridColumn11.Name = "gridColumn11";
this.gridColumn11.Visible = true;
this.gridColumn11.VisibleIndex = 10;
this.gridColumn11.Width = 201;
//
// gridColumn12
//
this.gridColumn12.Caption = "退货单号";
this.gridColumn12.FieldName = "returnbuyercode";
this.gridColumn12.Name = "gridColumn12";
this.gridColumn12.Visible = true;
this.gridColumn12.VisibleIndex = 11;
this.gridColumn12.Width = 201;
//
// gridColumn13
//
this.gridColumn13.Caption = "退货明细单号";
this.gridColumn13.FieldName = "returnbuyerdetailcode";
this.gridColumn13.Name = "gridColumn13";
this.gridColumn13.Visible = true;
this.gridColumn13.VisibleIndex = 12;
this.gridColumn13.Width = 201;
//
// gridColumn14
//
this.gridColumn14.Caption = "备注";
this.gridColumn14.FieldName = "remark";
this.gridColumn14.Name = "gridColumn14";
this.gridColumn14.Visible = true;
this.gridColumn14.VisibleIndex = 13;
this.gridColumn14.Width = 201;
//
// xtraTabControl1
//
this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.xtraTabControl1.Location = new System.Drawing.Point(0, 34);
this.xtraTabControl1.Name = "xtraTabControl1";
this.xtraTabControl1.SelectedTabPage = this.tabDataList;
this.xtraTabControl1.Size = new System.Drawing.Size(1300, 766);
this.xtraTabControl1.TabIndex = 1;
this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
this.tabDataList,
this.tabDataDetail});
//
// tabDataList
//
this.tabDataList.Controls.Add(this.grdList);
this.tabDataList.Name = "tabDataList";
this.tabDataList.Size = new System.Drawing.Size(1294, 737);
this.tabDataList.Text = "数据列表";
//
// grdList
//
this.grdList.Dock = System.Windows.Forms.DockStyle.Fill;
this.grdList.Location = new System.Drawing.Point(0, 0);
this.grdList.MainView = this.grdListView;
this.grdList.Name = "grdList";
this.grdList.Size = new System.Drawing.Size(1294, 737);
this.grdList.TabIndex = 0;
this.grdList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.grdListView});
//
// grdListView
//
this.grdListView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
this.gridColumn1,
this.gridColumn2,
this.gridColumn3,
this.gridColumn4,
this.gridColumn5,
this.gridColumn6,
this.gridColumn7,
this.gridColumn8,
this.gridColumn9,
this.gridColumn10,
this.gridColumn11,
this.gridColumn12,
this.gridColumn13,
this.gridColumn14});
this.grdListView.GridControl = this.grdList;
this.grdListView.Name = "grdListView";
this.grdListView.OptionsBehavior.Editable = false;
this.grdListView.OptionsView.ColumnAutoWidth = false;
//
// tabDataDetail
//
this.tabDataDetail.Controls.Add(this.panelControl2);
this.tabDataDetail.Name = "tabDataDetail";
this.tabDataDetail.Size = new System.Drawing.Size(1294, 737);
this.tabDataDetail.Text = "数据编辑";
//
// panelControl2
//
this.panelControl2.Controls.Add(this.layoutControl1);
this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelControl2.Location = new System.Drawing.Point(0, 0);
this.panelControl2.Name = "panelControl2";
this.panelControl2.Size = new System.Drawing.Size(1294, 737);
this.panelControl2.TabIndex = 0;
//
// layoutControl1
//
this.layoutControl1.Controls.Add(this.txtid);
this.layoutControl1.Controls.Add(this.txtbuyerdetailcode);
this.layoutControl1.Controls.Add(this.txtbuyercode);
this.layoutControl1.Controls.Add(this.txtmaterialcode);
this.layoutControl1.Controls.Add(this.txtmaterialid);
this.layoutControl1.Controls.Add(this.txtmaterialspec);
this.layoutControl1.Controls.Add(this.txtreturnnumber);
this.layoutControl1.Controls.Add(this.txtunit);
this.layoutControl1.Controls.Add(this.txtunitprice);
this.layoutControl1.Controls.Add(this.txtmoney);
this.layoutControl1.Controls.Add(this.txtwarehouse);
this.layoutControl1.Controls.Add(this.txtreturnbuyercode);
this.layoutControl1.Controls.Add(this.txtreturnbuyerdetailcode);
this.layoutControl1.Controls.Add(this.txtremark);
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutControl1.Location = new System.Drawing.Point(2, 2);
this.layoutControl1.Name = "layoutControl1";
this.layoutControl1.Root = this.layoutControlGroup1;
this.layoutControl1.Size = new System.Drawing.Size(1290, 733);
this.layoutControl1.TabIndex = 6;
this.layoutControl1.Text = "layoutControl1";
//
// layoutControlGroup1
//
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
this.layoutControlItem1,
this.layoutControlItem2,
this.layoutControlItem3,
this.layoutControlItem4,
this.layoutControlItem5,
this.layoutControlItem6,
this.layoutControlItem7,
this.layoutControlItem8,
this.layoutControlItem9,
this.layoutControlItem10,
this.layoutControlItem11,
this.layoutControlItem12,
this.layoutControlItem13,
this.layoutControlItem14});
this.layoutControlGroup1.Name = "layoutControlGroup1";
this.layoutControlGroup1.Size = new System.Drawing.Size(1290, 733);
this.layoutControlGroup1.TextVisible = false;
//
// layoutControlItem1
//
this.layoutControlItem1.Control = this.txtid;
this.layoutControlItem1.CustomizationFormText = "id";
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
this.layoutControlItem1.Name = "layoutControlItem1";
this.layoutControlItem1.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem1.Text = "id";
this.layoutControlItem1.TextSize = new System.Drawing.Size(72, 14);
//
// txtid
//
this.txtid.Location = new System.Drawing.Point(87, 12);
this.txtid.Name = "txtid";
this.txtid.Size = new System.Drawing.Size(1191, 20);
this.txtid.StyleController = this.layoutControl1;
this.txtid.TabIndex = 1;
//
// layoutControlItem2
//
this.layoutControlItem2.Control = this.txtbuyerdetailcode;
this.layoutControlItem2.CustomizationFormText = "采购明细单号";
this.layoutControlItem2.Location = new System.Drawing.Point(0, 24);
this.layoutControlItem2.Name = "layoutControlItem2";
this.layoutControlItem2.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem2.Text = "采购明细单号";
this.layoutControlItem2.TextSize = new System.Drawing.Size(72, 14);
//
// txtbuyerdetailcode
//
this.txtbuyerdetailcode.Location = new System.Drawing.Point(87, 36);
this.txtbuyerdetailcode.Name = "txtbuyerdetailcode";
this.txtbuyerdetailcode.Size = new System.Drawing.Size(1191, 20);
this.txtbuyerdetailcode.StyleController = this.layoutControl1;
this.txtbuyerdetailcode.TabIndex = 2;
//
// layoutControlItem3
//
this.layoutControlItem3.Control = this.txtbuyercode;
this.layoutControlItem3.CustomizationFormText = "采购单号";
this.layoutControlItem3.Location = new System.Drawing.Point(0, 48);
this.layoutControlItem3.Name = "layoutControlItem3";
this.layoutControlItem3.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem3.Text = "采购单号";
this.layoutControlItem3.TextSize = new System.Drawing.Size(72, 14);
//
// txtbuyercode
//
this.txtbuyercode.Location = new System.Drawing.Point(87, 60);
this.txtbuyercode.Name = "txtbuyercode";
this.txtbuyercode.Size = new System.Drawing.Size(1191, 20);
this.txtbuyercode.StyleController = this.layoutControl1;
this.txtbuyercode.TabIndex = 3;
//
// layoutControlItem4
//
this.layoutControlItem4.Control = this.txtmaterialcode;
this.layoutControlItem4.CustomizationFormText = "物料编码";
this.layoutControlItem4.Location = new System.Drawing.Point(0, 72);
this.layoutControlItem4.Name = "layoutControlItem4";
this.layoutControlItem4.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem4.Text = "物料编码";
this.layoutControlItem4.TextSize = new System.Drawing.Size(72, 14);
//
// txtmaterialcode
//
this.txtmaterialcode.Location = new System.Drawing.Point(87, 84);
this.txtmaterialcode.Name = "txtmaterialcode";
this.txtmaterialcode.Size = new System.Drawing.Size(1191, 20);
this.txtmaterialcode.StyleController = this.layoutControl1;
this.txtmaterialcode.TabIndex = 4;
//
// layoutControlItem5
//
this.layoutControlItem5.Control = this.txtmaterialid;
this.layoutControlItem5.CustomizationFormText = "物料名称";
this.layoutControlItem5.Location = new System.Drawing.Point(0, 96);
this.layoutControlItem5.Name = "layoutControlItem5";
this.layoutControlItem5.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem5.Text = "物料名称";
this.layoutControlItem5.TextSize = new System.Drawing.Size(72, 14);
//
// txtmaterialid
//
this.txtmaterialid.Location = new System.Drawing.Point(87, 108);
this.txtmaterialid.Name = "txtmaterialid";
this.txtmaterialid.Size = new System.Drawing.Size(1191, 20);
this.txtmaterialid.StyleController = this.layoutControl1;
this.txtmaterialid.TabIndex = 5;
//
// layoutControlItem6
//
this.layoutControlItem6.Control = this.txtmaterialspec;
this.layoutControlItem6.CustomizationFormText = "规格型号";
this.layoutControlItem6.Location = new System.Drawing.Point(0, 120);
this.layoutControlItem6.Name = "layoutControlItem6";
this.layoutControlItem6.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem6.Text = "规格型号";
this.layoutControlItem6.TextSize = new System.Drawing.Size(72, 14);
//
// txtmaterialspec
//
this.txtmaterialspec.Location = new System.Drawing.Point(87, 132);
this.txtmaterialspec.Name = "txtmaterialspec";
this.txtmaterialspec.Size = new System.Drawing.Size(1191, 20);
this.txtmaterialspec.StyleController = this.layoutControl1;
this.txtmaterialspec.TabIndex = 6;
//
// layoutControlItem7
//
this.layoutControlItem7.Control = this.txtreturnnumber;
this.layoutControlItem7.CustomizationFormText = "退货数量";
this.layoutControlItem7.Location = new System.Drawing.Point(0, 144);
this.layoutControlItem7.Name = "layoutControlItem7";
this.layoutControlItem7.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem7.Text = "退货数量";
this.layoutControlItem7.TextSize = new System.Drawing.Size(72, 14);
//
// txtreturnnumber
//
this.txtreturnnumber.Location = new System.Drawing.Point(87, 156);
this.txtreturnnumber.Name = "txtreturnnumber";
this.txtreturnnumber.Size = new System.Drawing.Size(1191, 20);
this.txtreturnnumber.StyleController = this.layoutControl1;
this.txtreturnnumber.TabIndex = 7;
//
// layoutControlItem8
//
this.layoutControlItem8.Control = this.txtunit;
this.layoutControlItem8.CustomizationFormText = "计量单位";
this.layoutControlItem8.Location = new System.Drawing.Point(0, 168);
this.layoutControlItem8.Name = "layoutControlItem8";
this.layoutControlItem8.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem8.Text = "计量单位";
this.layoutControlItem8.TextSize = new System.Drawing.Size(72, 14);
//
// txtunit
//
this.txtunit.Location = new System.Drawing.Point(87, 180);
this.txtunit.Name = "txtunit";
this.txtunit.Size = new System.Drawing.Size(1191, 20);
this.txtunit.StyleController = this.layoutControl1;
this.txtunit.TabIndex = 8;
//
// layoutControlItem9
//
this.layoutControlItem9.Control = this.txtunitprice;
this.layoutControlItem9.CustomizationFormText = "采购单价";
this.layoutControlItem9.Location = new System.Drawing.Point(0, 192);
this.layoutControlItem9.Name = "layoutControlItem9";
this.layoutControlItem9.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem9.Text = "采购单价";
this.layoutControlItem9.TextSize = new System.Drawing.Size(72, 14);
//
// txtunitprice
//
this.txtunitprice.Location = new System.Drawing.Point(87, 204);
this.txtunitprice.Name = "txtunitprice";
this.txtunitprice.Size = new System.Drawing.Size(1191, 20);
this.txtunitprice.StyleController = this.layoutControl1;
this.txtunitprice.TabIndex = 9;
//
// layoutControlItem10
//
this.layoutControlItem10.Control = this.txtmoney;
this.layoutControlItem10.CustomizationFormText = "金额";
this.layoutControlItem10.Location = new System.Drawing.Point(0, 216);
this.layoutControlItem10.Name = "layoutControlItem10";
this.layoutControlItem10.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem10.Text = "金额";
this.layoutControlItem10.TextSize = new System.Drawing.Size(72, 14);
//
// txtmoney
//
this.txtmoney.Location = new System.Drawing.Point(87, 228);
this.txtmoney.Name = "txtmoney";
this.txtmoney.Size = new System.Drawing.Size(1191, 20);
this.txtmoney.StyleController = this.layoutControl1;
this.txtmoney.TabIndex = 10;
//
// layoutControlItem11
//
this.layoutControlItem11.Control = this.txtwarehouse;
this.layoutControlItem11.CustomizationFormText = "仓库";
this.layoutControlItem11.Location = new System.Drawing.Point(0, 240);
this.layoutControlItem11.Name = "layoutControlItem11";
this.layoutControlItem11.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem11.Text = "仓库";
this.layoutControlItem11.TextSize = new System.Drawing.Size(72, 14);
//
// txtwarehouse
//
this.txtwarehouse.Location = new System.Drawing.Point(87, 252);
this.txtwarehouse.Name = "txtwarehouse";
this.txtwarehouse.Size = new System.Drawing.Size(1191, 20);
this.txtwarehouse.StyleController = this.layoutControl1;
this.txtwarehouse.TabIndex = 11;
//
// layoutControlItem12
//
this.layoutControlItem12.Control = this.txtreturnbuyercode;
this.layoutControlItem12.CustomizationFormText = "退货单号";
this.layoutControlItem12.Location = new System.Drawing.Point(0, 264);
this.layoutControlItem12.Name = "layoutControlItem12";
this.layoutControlItem12.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem12.Text = "退货单号";
this.layoutControlItem12.TextSize = new System.Drawing.Size(72, 14);
//
// txtreturnbuyercode
//
this.txtreturnbuyercode.Location = new System.Drawing.Point(87, 276);
this.txtreturnbuyercode.Name = "txtreturnbuyercode";
this.txtreturnbuyercode.Size = new System.Drawing.Size(1191, 20);
this.txtreturnbuyercode.StyleController = this.layoutControl1;
this.txtreturnbuyercode.TabIndex = 12;
//
// layoutControlItem13
//
this.layoutControlItem13.Control = this.txtreturnbuyerdetailcode;
this.layoutControlItem13.CustomizationFormText = "退货明细单号";
this.layoutControlItem13.Location = new System.Drawing.Point(0, 288);
this.layoutControlItem13.Name = "layoutControlItem13";
this.layoutControlItem13.Size = new System.Drawing.Size(1270, 24);
this.layoutControlItem13.Text = "退货明细单号";
this.layoutControlItem13.TextSize = new System.Drawing.Size(72, 14);
//
// txtreturnbuyerdetailcode
//
this.txtreturnbuyerdetailcode.Location = new System.Drawing.Point(87, 300);
this.txtreturnbuyerdetailcode.Name = "txtreturnbuyerdetailcode";
this.txtreturnbuyerdetailcode.Size = new System.Drawing.Size(1191, 20);
this.txtreturnbuyerdetailcode.StyleController = this.layoutControl1;
this.txtreturnbuyerdetailcode.TabIndex = 13;
//
// layoutControlItem14
//
this.layoutControlItem14.Control = this.txtremark;
this.layoutControlItem14.CustomizationFormText = "备注";
this.layoutControlItem14.Location = new System.Drawing.Point(0, 312);
this.layoutControlItem14.Name = "layoutControlItem14";
this.layoutControlItem14.Size = new System.Drawing.Size(1270, 401);
this.layoutControlItem14.Text = "备注";
this.layoutControlItem14.TextSize = new System.Drawing.Size(72, 14);
//
// txtremark
//
this.txtremark.Location = new System.Drawing.Point(87, 324);
this.txtremark.Name = "txtremark";
this.txtremark.Size = new System.Drawing.Size(1191, 20);
this.txtremark.StyleController = this.layoutControl1;
this.txtremark.TabIndex = 14;
//
// Frmbuyerreturndetail
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1300, 800);
this.Controls.Add(this.xtraTabControl1);
this.Name = "Frmbuyerreturndetail";
this.Text = "Frmbuyerreturndetail";
this.Load += new System.EventHandler(this.Frmbuyerreturndetail_Load);
this.Controls.SetChildIndex(this.xtraTabControl1, 0);
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit();
this.xtraTabControl1.ResumeLayout(false);
this.tabDataList.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.grdList)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.grdListView)).EndInit();
this.tabDataDetail.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit();
this.panelControl2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
this.layoutControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtid.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtbuyerdetailcode.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtbuyercode.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtmaterialcode.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtmaterialid.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtmaterialspec.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtreturnnumber.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtunit.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtunitprice.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtmoney.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtwarehouse.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtreturnbuyercode.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtreturnbuyerdetailcode.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtremark.Properties)).EndInit();
this.ResumeLayout(false);
}
#endregion
private XtraTabControl xtraTabControl1;
private XtraTabPage tabDataList;
private XtraTabPage tabDataDetail;
private DevExpress.XtraGrid.GridControl grdList;
private DevExpress.XtraGrid.Views.Grid.GridView grdListView;
private PanelControl panelControl2;
private DevExpress.XtraLayout.LayoutControl layoutControl1;
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn1;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn2;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn3;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn4;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn5;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn6;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn7;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn8;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn9;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn10;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn11;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn12;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn13;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn14;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtid;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtbuyerdetailcode;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtbuyercode;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtmaterialcode;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtmaterialid;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtmaterialspec;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtreturnnumber;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtunit;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtunitprice;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtmoney;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtwarehouse;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtreturnbuyercode;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtreturnbuyerdetailcode;
///////////////////////////////
private DevExpress.XtraEditors.TextEdit txtremark;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14;
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -374,6 +374,10 @@ namespace MES.Form
}
private void gridView1_RowUpdated(object sender, DevExpress.XtraGrid.Views.Base.RowObjectEventArgs e)
{
}
private void gridControl1_Validated(object sender, EventArgs e)
{
txttotalprice.Text = gridColumn17.SummaryItem.SummaryValue.ToString();
}

View File

@ -78,6 +78,7 @@ namespace MES.Form
this.gridColumn20 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn21 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn22 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn24 = new DevExpress.XtraGrid.Columns.GridColumn();
this.txtid = new DevExpress.XtraEditors.TextEdit();
this.txtcustomerid = new DevExpress.XtraEditors.LookUpEdit();
this.txtquotationdate = new DevExpress.XtraEditors.DateEdit();
@ -101,7 +102,6 @@ namespace MES.Form
this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
this.gridColumn24 = new DevExpress.XtraGrid.Columns.GridColumn();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcustomerid)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcustomertype)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemtxtcustomeruser)).BeginInit();
@ -394,6 +394,7 @@ namespace MES.Form
this.gridControl1.TabIndex = 11;
this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gridView1});
this.gridControl1.Validated += new System.EventHandler(this.gridControl1_Validated);
//
// contextMenuStrip1
//
@ -584,6 +585,15 @@ namespace MES.Form
this.gridColumn22.VisibleIndex = 10;
this.gridColumn22.Width = 201;
//
// gridColumn24
//
this.gridColumn24.Caption = "明细单号";
this.gridColumn24.FieldName = "quotationdetailcode";
this.gridColumn24.Name = "gridColumn24";
this.gridColumn24.OptionsColumn.AllowEdit = false;
this.gridColumn24.Visible = true;
this.gridColumn24.VisibleIndex = 0;
//
// txtid
//
this.txtid.Location = new System.Drawing.Point(63, 12);
@ -841,15 +851,6 @@ namespace MES.Form
this.layoutControlItem12.Text = "总价";
this.layoutControlItem12.TextSize = new System.Drawing.Size(48, 14);
//
// gridColumn24
//
this.gridColumn24.Caption = "明细单号";
this.gridColumn24.FieldName = "quotationdetailcode";
this.gridColumn24.Name = "gridColumn24";
this.gridColumn24.OptionsColumn.AllowEdit = false;
this.gridColumn24.Visible = true;
this.gridColumn24.VisibleIndex = 0;
//
// Frmquotation
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);

View File

@ -316,6 +316,10 @@ namespace MES.Form
;
}
gridView1.BestFitColumns();
}
private void gridControl1_Validated(object sender, EventArgs e)
{
txttotalprice.Text = gridColumn18.SummaryItem.SummaryValue.ToString();
}
}

View File

@ -366,6 +366,7 @@ namespace MES.Form
this.gridControl1.TabIndex = 1;
this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gridView1});
this.gridControl1.Validated += new System.EventHandler(this.gridControl1_Validated);
//
// contextMenuStrip1
//

View File

@ -0,0 +1,254 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WinformGeneralDeveloperFrame;
using WinformGeneralDeveloperFrame.Commons;
using DevExpress.XtraLayout;
using MES.Entity;
using System.Data.Entity.Migrations;
using System.Data.Entity;
namespace MES.Form
{
public partial class Frmworkorder : FrmBaseForm
{
private Dictionary<string, string> fieldDictionary = new Dictionary<string, string>();
public Frmworkorder()
{
InitializeComponent();
}
private void Frmworkorder_Load(object sender, EventArgs e)
{
InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new workorderInfo());
InitSearchDicData();
}
/// <summary>
/// 数据源初始化
/// </summary>
/// <returns></returns>
private void Init()
{
txtworkordertype.Properties.DataSource = GetDataTableUtils.SqlTable("部门");
repositoryItemtxtworkordertype.DataSource= GetDataTableUtils.SqlTable("部门");
txtproductdept.Properties.DataSource = GetDataTableUtils.SqlTable("部门");
repositoryItemtxtproductdept.DataSource= GetDataTableUtils.SqlTable("部门");
txtproductid.Properties.DataSource = GetDataTableUtils.SqlTable("产品");
repositoryItemtxtproductid.DataSource= GetDataTableUtils.SqlTable("产品");
txtunit.Properties.DataSource = GetDataTableUtils.SqlTable("计量单位");
repositoryItemtxtunit.DataSource= GetDataTableUtils.SqlTable("计量单位");
txtwarehouse.Properties.DataSource = GetDataTableUtils.SqlTable("仓库");
repositoryItemtxtwarehouse.DataSource= GetDataTableUtils.SqlTable("仓库");
txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户");
}
/// <summary>
/// 搜索字段
/// </summary>
/// <returns></returns>
private void InitSearchDicData()
{
fieldDictionary.Add("id","id");
fieldDictionary.Add("工单号","wordordercode");
fieldDictionary.Add("销售单号","salecode");
fieldDictionary.Add("销售明细单号","saledetailcode");
fieldDictionary.Add("工单类型","workordertype");
fieldDictionary.Add("生产日期","productdate");
fieldDictionary.Add("生产单位","productdept");
fieldDictionary.Add("产品编号","productcode");
fieldDictionary.Add("产品名称","productid");
fieldDictionary.Add("规格型号","spec");
fieldDictionary.Add("生产数量","productnumber");
fieldDictionary.Add("计量单位","unit");
fieldDictionary.Add("完工日期","finishdate");
fieldDictionary.Add("交货日期","deliverdate");
fieldDictionary.Add("仓库","warehouse");
fieldDictionary.Add("制单人","creatorId");
fieldDictionary.Add("制单日期","createTime");
fieldDictionary.Add("备注","remark");
}
public override void InitgrdListDataSource()
{
using (var con=new MESDB())///
{
grdList.DataSource=con.workorderInfo.ToList();
}
Init();
}
/// <summary>
/// 字段为空校验
/// </summary>
/// <returns></returns>
public override bool CheckInput()
{
if(string.IsNullOrEmpty(txtwordordercode.EditValue.ToString()))
{
"工单号不能为空".ShowWarning();
txtwordordercode.Focus();
return false;
}
if(string.IsNullOrEmpty(txtsalecode.EditValue.ToString()))
{
"销售单号不能为空".ShowWarning();
txtsalecode.Focus();
return false;
}
if(string.IsNullOrEmpty(txtsaledetailcode.EditValue.ToString()))
{
"销售明细单号不能为空".ShowWarning();
txtsaledetailcode.Focus();
return false;
}
if(string.IsNullOrEmpty(txtworkordertype.EditValue.ToString()))
{
"工单类型不能为空".ShowWarning();
txtworkordertype.Focus();
return false;
}
if(string.IsNullOrEmpty(txtproductdate.EditValue.ToString()))
{
"生产日期不能为空".ShowWarning();
txtproductdate.Focus();
return false;
}
if(string.IsNullOrEmpty(txtproductdept.EditValue.ToString()))
{
"生产单位不能为空".ShowWarning();
txtproductdept.Focus();
return false;
}
if(string.IsNullOrEmpty(txtproductcode.EditValue.ToString()))
{
"产品编号不能为空".ShowWarning();
txtproductcode.Focus();
return false;
}
if(string.IsNullOrEmpty(txtproductid.EditValue.ToString()))
{
"产品名称不能为空".ShowWarning();
txtproductid.Focus();
return false;
}
if(string.IsNullOrEmpty(txtspec.EditValue.ToString()))
{
"规格型号不能为空".ShowWarning();
txtspec.Focus();
return false;
}
if(string.IsNullOrEmpty(txtproductnumber.EditValue.ToString()))
{
"生产数量不能为空".ShowWarning();
txtproductnumber.Focus();
return false;
}
if(string.IsNullOrEmpty(txtunit.EditValue.ToString()))
{
"计量单位不能为空".ShowWarning();
txtunit.Focus();
return false;
}
if(string.IsNullOrEmpty(txtfinishdate.EditValue.ToString()))
{
"完工日期不能为空".ShowWarning();
txtfinishdate.Focus();
return false;
}
if(string.IsNullOrEmpty(txtdeliverdate.EditValue.ToString()))
{
"交货日期不能为空".ShowWarning();
txtdeliverdate.Focus();
return false;
}
if(string.IsNullOrEmpty(txtwarehouse.EditValue.ToString()))
{
"仓库不能为空".ShowWarning();
txtwarehouse.Focus();
return false;
}
if(string.IsNullOrEmpty(txtcreatorId.EditValue.ToString()))
{
"制单人不能为空".ShowWarning();
txtcreatorId.Focus();
return false;
}
if(string.IsNullOrEmpty(txtcreateTime.EditValue.ToString()))
{
"制单日期不能为空".ShowWarning();
txtcreateTime.Focus();
return false;
}
return true;
}
/// <summary>
/// 保存
/// </summary>
/// <returns></returns>
public override bool SaveFunction()
{
try
{
workorderInfo info= (workorderInfo)this.ControlDataToModel(new workorderInfo());
using (var db = new MESDB())
{
db.workorderInfo.AddOrUpdate(info);
db.SaveChanges();
}
}
catch (Exception ex)
{
ex.Message.ShowError();
return false;
}
return true;
}
/// <summary>
/// 删除
/// </summary>
/// <returns></returns>
public override bool DelFunction()
{
try
{
workorderInfo info = (workorderInfo)this.ControlDataToModel(new workorderInfo());
using (var db = new MESDB())
{
db.Entry(info).State=EntityState.Deleted;
db.SaveChanges();
}
}
catch (Exception ex)
{
ex.Message.ShowError();
return false;
}
return true;
}
/// <summary>
/// 搜索
/// </summary>
/// <returns></returns>
public override void SearchFunction()
{
FrmSearch frm = new FrmSearch(fieldDictionary);
if (frm.ShowDialog()==DialogResult.OK)
{
string sql = frm.sql;
using (var db = new MESDB())
{
if (string.IsNullOrEmpty(sql))
{
grdList.DataSource = db.workorderInfo.SqlQuery("select * from workorder").ToList();
}
else
{
grdList.DataSource = db.workorderInfo.SqlQuery($"select * from workorder where {sql}").ToList();
}
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -139,6 +139,8 @@
<Compile Include="EntityAdapter.cs" />
<Compile Include="Entity\buyerdetailInfo.cs" />
<Compile Include="Entity\buyerInfo.cs" />
<Compile Include="Entity\buyerreturndetailInfo.cs" />
<Compile Include="Entity\buyerreturnInfo.cs" />
<Compile Include="Entity\customerInfo.cs" />
<Compile Include="Entity\deliversaledetailInfo.cs" />
<Compile Include="Entity\deliversaleInfo.cs" />
@ -165,12 +167,25 @@
<Compile Include="Entity\sysRoleInfo.cs" />
<Compile Include="Entity\sysToolButtonInfo.cs" />
<Compile Include="Entity\sysUserInfo.cs" />
<Compile Include="Entity\workorderInfo.cs" />
<Compile Include="Form\Frmbuyer.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form\Frmbuyer.designer.cs">
<DependentUpon>Frmbuyer.cs</DependentUpon>
</Compile>
<Compile Include="Form\Frmbuyerreturn.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form\Frmbuyerreturn.designer.cs">
<DependentUpon>Frmbuyerreturn.cs</DependentUpon>
</Compile>
<Compile Include="Form\Frmbuyerreturndetail.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form\Frmbuyerreturndetail.designer.cs">
<DependentUpon>Frmbuyerreturndetail.cs</DependentUpon>
</Compile>
<Compile Include="Form\Frmcustomer.cs">
<SubType>Form</SubType>
</Compile>
@ -291,6 +306,12 @@
<Compile Include="Form\FrmsysUser.designer.cs">
<DependentUpon>FrmsysUser.cs</DependentUpon>
</Compile>
<Compile Include="Form\Frmworkorder.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form\Frmworkorder.designer.cs">
<DependentUpon>Frmworkorder.cs</DependentUpon>
</Compile>
<Compile Include="FrmBaseEdit.cs">
<SubType>Form</SubType>
</Compile>
@ -390,6 +411,12 @@
<EmbeddedResource Include="Form\Frmbuyer.resx">
<DependentUpon>Frmbuyer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form\Frmbuyerreturn.resx">
<DependentUpon>Frmbuyerreturn.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form\Frmbuyerreturndetail.resx">
<DependentUpon>Frmbuyerreturndetail.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form\Frmcustomer.resx">
<DependentUpon>Frmcustomer.cs</DependentUpon>
</EmbeddedResource>
@ -450,6 +477,9 @@
<EmbeddedResource Include="Form\FrmsysUser.resx">
<DependentUpon>FrmsysUser.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form\Frmworkorder.resx">
<DependentUpon>Frmworkorder.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmBaseEdit.resx">
<DependentUpon>FrmBaseEdit.cs</DependentUpon>
</EmbeddedResource>