Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadwlinqdtlresults(ref DataRow row, Loadwlinqdtlresults entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("seqno", entity.seqno);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("wlqtyship", entity.wlqtyship);
     row.SetField("wlqtyord", entity.wlqtyord);
     row.SetField("unitconv", entity.unitconv);
     row.SetField("unit", entity.unit);
     row.SetField("stage", entity.stage);
     row.SetField("emp", entity.emp);
     row.SetField("lndt", entity.lndt);
     row.SetField("lntm", entity.lntm);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("sctntype", entity.sctntype);
 }
Exemplo n.º 2
0
        public static Loadwlinqdtlresults BuildLoadwlinqdtlresultsFromRow(DataRow row)
        {
            Loadwlinqdtlresults entity = new Loadwlinqdtlresults();

            entity.cono      = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            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.seqno     = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.shipprod  = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.qtyord    = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.wlqtyship = row.IsNull("wlqtyship") ? decimal.Zero : row.Field <decimal>("wlqtyship");
            entity.wlqtyord  = row.IsNull("wlqtyord") ? decimal.Zero : row.Field <decimal>("wlqtyord");
            entity.unitconv  = row.IsNull("unitconv") ? decimal.Zero : row.Field <decimal>("unitconv");
            entity.unit      = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.stage     = row.IsNull("stage") ? string.Empty : row.Field <string>("stage");
            entity.emp       = row.IsNull("emp") ? string.Empty : row.Field <string>("emp");
            entity.lndt      = row.Field <DateTime?>("lndt");
            entity.lntm      = row.IsNull("lntm") ? string.Empty : row.Field <string>("lntm");
            entity.proddesc  = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.sctntype  = row.IsNull("sctntype") ? string.Empty : row.Field <string>("sctntype");
            return(entity);
        }