Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSupaccessrequest(ref DataRow row, Supaccessrequest entity)
 {
     row.SetField("module", entity.module);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("whse", entity.whse);
     row.SetField("specnstype", entity.specnstype);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("stkqtyord", entity.stkqtyord);
     row.SetField("unit", entity.unit);
     row.SetField("unitconv", entity.unitconv);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Supaccessrequest BuildSupaccessrequestFromRow(DataRow row)
        {
            Supaccessrequest entity = new Supaccessrequest();

            entity.module     = row.IsNull("module") ? string.Empty : row.Field <string>("module");
            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.shipprod   = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.whse       = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.specnstype = row.IsNull("specnstype") ? string.Empty : row.Field <string>("specnstype");
            entity.qtyord     = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.stkqtyord  = row.IsNull("stkqtyord") ? decimal.Zero : row.Field <decimal>("stkqtyord");
            entity.unit       = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.unitconv   = row.IsNull("unitconv") ? decimal.Zero : row.Field <decimal>("unitconv");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }