コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOewtbillingresults(ref DataRow row, Oewtbillingresults entity)
 {
     row.SetField("wtno", entity.wtno);
     row.SetField("wtsuf", entity.wtsuf);
     row.SetField("wtnotesfl", entity.wtnotesfl);
     row.SetField("receiptdt", entity.receiptdt);
     row.SetField("shiptowhse", entity.shiptowhse);
     row.SetField("shipfmwhse", entity.shipfmwhse);
     row.SetField("totqtyrcv", entity.totqtyrcv);
     row.SetField("billstat", entity.billstat);
     row.SetField("autoaltordno", entity.autoaltordno);
     row.SetField("autoaltordsuf", entity.autoaltordsuf);
     row.SetField("oenotesfl", entity.oenotesfl);
     row.SetField("custno", entity.custno);
     row.SetField("custnotesfl", entity.custnotesfl);
     row.SetField("shipto", entity.shipto);
     row.SetField("shiptonotesfl", entity.shiptonotesfl);
     row.SetField("custname", entity.custname);
     row.SetField("totqtyshp", entity.totqtyshp);
     row.SetField("invoicedt", entity.invoicedt);
     row.SetField("refer", entity.refer);
     row.SetField("qtyunavail", entity.qtyunavail);
     row.SetField("autoaltwhsecd", entity.autoaltwhsecd);
     row.SetField("invno", entity.invno);
     row.SetField("oestage", entity.oestage);
     row.SetField("nonstockfl", entity.nonstockfl);
     row.SetField("billablefl", entity.billablefl);
     row.SetField("shiptoname", entity.shiptoname);
     row.SetField("shipfmname", entity.shipfmname);
     row.SetField("shortenabledfl", entity.shortenabledfl);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Oewtbillingresults BuildOewtbillingresultsFromRow(DataRow row)
        {
            Oewtbillingresults entity = new Oewtbillingresults();

            entity.wtno           = row.IsNull("wtno") ? 0 : row.Field <int>("wtno");
            entity.wtsuf          = row.IsNull("wtsuf") ? 0 : row.Field <int>("wtsuf");
            entity.wtnotesfl      = row.IsNull("wtnotesfl") ? string.Empty : row.Field <string>("wtnotesfl");
            entity.receiptdt      = row.Field <DateTime?>("receiptdt");
            entity.shiptowhse     = row.IsNull("shiptowhse") ? string.Empty : row.Field <string>("shiptowhse");
            entity.shipfmwhse     = row.IsNull("shipfmwhse") ? string.Empty : row.Field <string>("shipfmwhse");
            entity.totqtyrcv      = row.IsNull("totqtyrcv") ? decimal.Zero : row.Field <decimal>("totqtyrcv");
            entity.billstat       = row.IsNull("billstat") ? string.Empty : row.Field <string>("billstat");
            entity.autoaltordno   = row.IsNull("autoaltordno") ? 0 : row.Field <int>("autoaltordno");
            entity.autoaltordsuf  = row.IsNull("autoaltordsuf") ? 0 : row.Field <int>("autoaltordsuf");
            entity.oenotesfl      = row.IsNull("oenotesfl") ? string.Empty : row.Field <string>("oenotesfl");
            entity.custno         = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custnotesfl    = row.IsNull("custnotesfl") ? string.Empty : row.Field <string>("custnotesfl");
            entity.shipto         = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.shiptonotesfl  = row.IsNull("shiptonotesfl") ? string.Empty : row.Field <string>("shiptonotesfl");
            entity.custname       = row.IsNull("custname") ? string.Empty : row.Field <string>("custname");
            entity.totqtyshp      = row.IsNull("totqtyshp") ? decimal.Zero : row.Field <decimal>("totqtyshp");
            entity.invoicedt      = row.Field <DateTime?>("invoicedt");
            entity.refer          = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.qtyunavail     = row.IsNull("qtyunavail") ? decimal.Zero : row.Field <decimal>("qtyunavail");
            entity.autoaltwhsecd  = row.IsNull("autoaltwhsecd") ? string.Empty : row.Field <string>("autoaltwhsecd");
            entity.invno          = row.IsNull("invno") ? 0 : row.Field <int>("invno");
            entity.oestage        = row.IsNull("oestage") ? string.Empty : row.Field <string>("oestage");
            entity.nonstockfl     = row.Field <bool>("nonstockfl");
            entity.billablefl     = row.Field <bool>("billablefl");
            entity.shiptoname     = row.IsNull("shiptoname") ? string.Empty : row.Field <string>("shiptoname");
            entity.shipfmname     = row.IsNull("shipfmname") ? string.Empty : row.Field <string>("shipfmname");
            entity.shortenabledfl = row.Field <bool>("shortenabledfl");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }