Example #1
0
 /// <summary>
 /// 获取零配件信息
 /// </summary>
 /// <param name="dr">The dr.</param>
 public ReportAccessoryInfo(DataRow dr)
     : this()
 {
     this.ID = SQLUtil.ConvertInt(dr["ID"]);
     this.DispatchReportID = SQLUtil.ConvertInt(dr["DispatchReportID"]);
     this.Name             = SQLUtil.TrimNull(dr["Name"]);
     this.Source.ID        = SQLUtil.ConvertInt(dr["SourceID"]);
     this.Source.Name      = LookupManager.GetAccessorySourceTypeDesc(this.Source.ID);
     if (dr.Table.Columns.Contains("SupplierID"))
     {
         this.Supplier.ID   = SQLUtil.ConvertInt(dr["SupplierID"]);
         this.Supplier.Name = SQLUtil.TrimNull(dr["SupplierName"]);
     }
     this.NewSerialCode = SQLUtil.TrimNull(dr["NewSerialCode"]);
     this.OldSerialCode = SQLUtil.TrimNull(dr["OldSerialCode"]);
     this.Qty           = SQLUtil.ConvertInt(dr["Qty"]);
     this.Amount        = SQLUtil.ConvertDouble(dr["Amount"]);
 }