Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadpoquickviewresults(ref DataRow row, Loadpoquickviewresults entity)
 {
     row.SetField("lineno", entity.lineno);
     row.SetField("nonstockty", entity.nonstockty);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("cproddesc", entity.cproddesc);
     row.SetField("unit", entity.unit);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("dprice", entity.dprice);
     row.SetField("dnetamt", entity.dnetamt);
     row.SetField("isCancelled", entity.isCancelled);
     row.SetField("isLowStock", entity.isLowStock);
     row.SetField("tallyfl", entity.tallyfl);
     row.SetField("bundlefl", entity.bundlefl);
     row.SetField("userField", entity.userField);
 }
Esempio n. 2
0
        public static Loadpoquickviewresults BuildLoadpoquickviewresultsFromRow(DataRow row)
        {
            Loadpoquickviewresults entity = new Loadpoquickviewresults();

            entity.lineno      = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.nonstockty  = row.IsNull("nonstockty") ? string.Empty : row.Field <string>("nonstockty");
            entity.shipprod    = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.cproddesc   = row.IsNull("cproddesc") ? string.Empty : row.Field <string>("cproddesc");
            entity.unit        = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.qtyord      = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.dprice      = row.IsNull("dprice") ? decimal.Zero : row.Field <decimal>("dprice");
            entity.dnetamt     = row.IsNull("dnetamt") ? decimal.Zero : row.Field <decimal>("dnetamt");
            entity.isCancelled = row.Field <bool>("isCancelled");
            entity.isLowStock  = row.Field <bool>("isLowStock");
            entity.tallyfl     = row.Field <bool>("tallyfl");
            entity.bundlefl    = row.Field <bool>("bundlefl");
            entity.userField   = row.IsNull("userField") ? string.Empty : row.Field <string>("userField");
            return(entity);
        }