Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadoetallycriteria(ref DataRow row, Loadoetallycriteria entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("inquirefl", entity.inquirefl);
     row.SetField("functionname", entity.functionname);
     row.SetField("qtyreq", entity.qtyreq);
     row.SetField("prod", entity.prod);
     row.SetField("units", entity.units);
     row.SetField("whse", entity.whse);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("price", entity.price);
     row.SetField("bundleid", entity.bundleid);
     row.SetField("iSecurity", entity.iSecurity);
     row.SetField("setprevfl", entity.setprevfl);
     row.SetField("getbundlefl", entity.getbundlefl);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Loadoetallycriteria BuildLoadoetallycriteriaFromRow(DataRow row)
        {
            Loadoetallycriteria entity = new Loadoetallycriteria();

            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.ordertype    = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.inquirefl    = row.Field <bool>("inquirefl");
            entity.functionname = row.IsNull("functionname") ? string.Empty : row.Field <string>("functionname");
            entity.qtyreq       = row.IsNull("qtyreq") ? decimal.Zero : row.Field <decimal>("qtyreq");
            entity.prod         = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.units        = row.IsNull("units") ? string.Empty : row.Field <string>("units");
            entity.whse         = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.custno       = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto       = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.price        = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price");
            entity.bundleid     = row.IsNull("bundleid") ? string.Empty : row.Field <string>("bundleid");
            entity.iSecurity    = row.IsNull("iSecurity") ? 0 : row.Field <int>("iSecurity");
            entity.setprevfl    = row.Field <bool>("setprevfl");
            entity.getbundlefl  = row.Field <bool>("getbundlefl");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }