public void TestGetDateName() { Assert.AreEqual("ok", Pro2Col.GetColName4Pro(this.GetType(), "HaveAttribute")); Assert.AreEqual(string.Empty, Pro2Col.GetColName4Pro(this.GetType(), "HavenotAttribute")); Assert.AreEqual("ok", Pro2Col.GetColName4Pro(new DataNameAttributeTest(), "HaveAttribute")); Assert.AreEqual(string.Empty, Pro2Col.GetColName4Pro(new DataNameAttributeTest(), "HavenotAttribute")); }
private void CreateDiskDataTable() { diskDataSource = new DataTable(); Disk d = new Disk(); Pro2Col.AddColumns4Obj(d, diskDataSource, Types.ActionType.ASN); }
private void CreateLokDataTable() { lokDataSource = new DataTable(); SKU s = new SKU(); LOC l = new LOC(); Pro2Col.AddColumns4Obj(s, lokDataSource, Types.ActionType.Loc); Pro2Col.AddColumns4Obj(l, lokDataSource, Types.ActionType.Loc); }
private void CreateDiskDataTable() { diskDataSource = new DataTable(); SKU s = new SKU(); LOC l = new LOC(); Pro2Col.AddColumns4Obj(s, diskDataSource, Types.ActionType.Part); Pro2Col.AddColumns4Obj(l, diskDataSource, Types.ActionType.Part); }
public Disk(SKU sku, DataRow dr) { this.sku = sku; if (!dr.Table.Columns.Contains(this.GetColName4Pro("Id"))) { throw new Exception("料盘号为空,初始化数据失败!"); } Pro2Col.DataRow2Obj(this, dr); }
private void CreateDiskDataTable() { SKU s = new SKU(); Disk d = new Disk(); this.diskDataSource = new DataTable(); Pro2Col.AddColumns4Obj(d, diskDataSource, Types.ActionType.Common); Pro2Col.AddColumns4Obj(d, diskDataSource, Types.ActionType.Common); Common.DataSource.Tables.Add(this.diskDataSource); }
public DataTable UpdateDiskDataTable() { Disk d = new Disk(); foreach (DataRow dr in diskDataSource.Rows) { Pro2Col.Obj2DataRow(disks[dr[d.GetColName4Pro("Id")].ToString()], dr, Types.ActionType.Return); } return(diskDataSource); }
public DataTable UpdateSKUDataTable() { SKU s = new SKU(); foreach (DataRow dr in skuDataSource.Rows) { s = skus[s.GetKey(dr)]; Pro2Col.Obj2DataRow(s, dr, Types.ActionType.PutAway); } return(skuDataSource); }
public SKU(DataRow dr) { if (!dr.Table.Columns.Contains(GetColName4Pro("Id"))) { throw new Exception("物料P/N为空,初始化数据失败!"); } Pro2Col.DataRow2Obj(this, dr); if (this.scanCount == this.count) { this.scanFinish = true; } }
public DataTable UpdateDiskDataTable() { diskDataSource.Rows.Clear(); foreach (Disk d in disks.Values) { if (!d.IsScaned) { continue; } DataRow dr = diskDataSource.NewRow(); Pro2Col.Obj2DataRow(d, dr, Types.ActionType.ASN); diskDataSource.Rows.Add(dr); } return(diskDataSource); }
public DataTable UpdateDiskDataTable() { diskDataSource.Rows.Clear(); foreach (Disk d in disks.Values) { if (d.PartCount == 0) { continue; } DataRow dr = diskDataSource.NewRow(); Pro2Col.Obj2DataRow(d, dr, Types.ActionType.Part); Pro2Col.Obj2DataRow(d.Sku, dr, Types.ActionType.Part); diskDataSource.Rows.Add(dr); } return(diskDataSource); }
public DataTable UpdateLocDataTable() { lokDataSource.Rows.Clear(); foreach (SKU s in this.skus.Values) { foreach (LOC l in s.Locs.Values) { if (l.Count == 0) { continue; } DataRow dr = this.lokDataSource.NewRow(); Pro2Col.Obj2DataRow(s, dr, Types.ActionType.Loc); Pro2Col.Obj2DataRow(l, dr, Types.ActionType.Loc); this.lokDataSource.Rows.Add(dr); } } return(lokDataSource); }
public string GetColName4Pro(object o, string propertyName) { return(Pro2Col.GetColName4Pro(o, propertyName)); }
public string GetColName4Pro(string propertyName) { return(Pro2Col.GetColName4Pro(this.GetType(), propertyName)); }