Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCrtimplcoresttresults(ref DataRow row, Crtimplcoresttresults entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("custpo", entity.custpo);
     row.SetField("jobno", entity.jobno);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("stage", entity.stage);
     row.SetField("expiredt", entity.expiredt);
     row.SetField("qtysold", entity.qtysold);
     row.SetField("qtyavail", entity.qtyavail);
     row.SetField("corechg", entity.corechg);
     row.SetField("statuscd", entity.statuscd);
     row.SetField("transtype", entity.transtype);
     row.SetField("orderDisp", entity.orderDisp);
     row.SetField("suspend", entity.suspend);
     row.SetField("approvty", entity.approvty);
     row.SetField("custnotesfl", entity.custnotesfl);
     row.SetField("prodnotesfl", entity.prodnotesfl);
     row.SetField("ordernotesfl", entity.ordernotesfl);
     row.SetField("commentfl", entity.commentfl);
     row.SetField("saleswhse", entity.saleswhse);
     row.SetField("fulfillmentordfl", entity.fulfillmentordfl);
     row.SetField("fulfillmenttiedfl", entity.fulfillmenttiedfl);
     row.SetField("refer", entity.refer);
 }
Пример #2
0
        public static Crtimplcoresttresults BuildCrtimplcoresttresultsFromRow(DataRow row)
        {
            Crtimplcoresttresults entity = new Crtimplcoresttresults();

            entity.custno            = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.prod              = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse              = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.custpo            = row.IsNull("custpo") ? string.Empty : row.Field <string>("custpo");
            entity.jobno             = row.IsNull("jobno") ? string.Empty : row.Field <string>("jobno");
            entity.orderno           = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf          = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.lineno            = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.stage             = row.IsNull("stage") ? string.Empty : row.Field <string>("stage");
            entity.expiredt          = row.Field <DateTime?>("expiredt");
            entity.qtysold           = row.IsNull("qtysold") ? decimal.Zero : row.Field <decimal>("qtysold");
            entity.qtyavail          = row.IsNull("qtyavail") ? decimal.Zero : row.Field <decimal>("qtyavail");
            entity.corechg           = row.IsNull("corechg") ? decimal.Zero : row.Field <decimal>("corechg");
            entity.statuscd          = row.IsNull("statuscd") ? string.Empty : row.Field <string>("statuscd");
            entity.transtype         = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.orderDisp         = row.IsNull("orderDisp") ? string.Empty : row.Field <string>("orderDisp");
            entity.suspend           = row.IsNull("suspend") ? string.Empty : row.Field <string>("suspend");
            entity.approvty          = row.IsNull("approvty") ? string.Empty : row.Field <string>("approvty");
            entity.custnotesfl       = row.IsNull("custnotesfl") ? string.Empty : row.Field <string>("custnotesfl");
            entity.prodnotesfl       = row.IsNull("prodnotesfl") ? string.Empty : row.Field <string>("prodnotesfl");
            entity.ordernotesfl      = row.IsNull("ordernotesfl") ? string.Empty : row.Field <string>("ordernotesfl");
            entity.commentfl         = row.IsNull("commentfl") ? string.Empty : row.Field <string>("commentfl");
            entity.saleswhse         = row.IsNull("saleswhse") ? string.Empty : row.Field <string>("saleswhse");
            entity.fulfillmentordfl  = row.Field <bool>("fulfillmentordfl");
            entity.fulfillmenttiedfl = row.Field <bool>("fulfillmenttiedfl");
            entity.refer             = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            return(entity);
        }