Exemple #1
0
        public static Loadleadtimehistcriteria BuildLoadleadtimehistcriteriaFromRow(DataRow row)
        {
            Loadleadtimehistcriteria entity = new Loadleadtimehistcriteria();

            entity.product          = row.IsNull("product") ? string.Empty : row.Field <string>("product");
            entity.whse             = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.leadtmavg        = row.IsNull("leadtmavg") ? 0 : row.Field <int>("leadtmavg");
            entity.avgltdt          = row.Field <DateTime?>("avgltdt");
            entity.frozenltty       = row.IsNull("frozenltty") ? 0 : row.Field <int>("frozenltty");
            entity.calcltavg        = row.IsNull("calcltavg") ? 0 : row.Field <int>("calcltavg");
            entity.ltmonths         = row.IsNull("ltmonths") ? 0 : row.Field <int>("ltmonths");
            entity.receiptdt        = row.Field <DateTime?>("receiptdt");
            entity.noreceipts       = row.IsNull("noreceipts") ? 0 : row.Field <int>("noreceipts");
            entity.inclrushfl       = row.Field <bool>("inclrushfl");
            entity.incldirectfl     = row.Field <bool>("incldirectfl");
            entity.inclreleasefl    = row.Field <bool>("inclreleasefl");
            entity.sortby           = row.IsNull("sortby") ? string.Empty : row.Field <string>("sortby");
            entity.frozenlttyskipfl = row.Field <bool>("frozenlttyskipfl");
            entity.frozenlttymsg    = row.IsNull("frozenlttymsg") ? string.Empty : row.Field <string>("frozenlttymsg");
            entity.calcltavgskipfl  = row.Field <bool>("calcltavgskipfl");
            entity.calcltavgmsg     = row.IsNull("calcltavgmsg") ? string.Empty : row.Field <string>("calcltavgmsg");
            entity.customparam      = row.IsNull("customparam") ? string.Empty : row.Field <string>("customparam");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Exemple #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadleadtimehistcriteria(ref DataRow row, Loadleadtimehistcriteria entity)
 {
     row.SetField("product", entity.product);
     row.SetField("whse", entity.whse);
     row.SetField("leadtmavg", entity.leadtmavg);
     row.SetField("avgltdt", entity.avgltdt);
     row.SetField("frozenltty", entity.frozenltty);
     row.SetField("calcltavg", entity.calcltavg);
     row.SetField("ltmonths", entity.ltmonths);
     row.SetField("receiptdt", entity.receiptdt);
     row.SetField("noreceipts", entity.noreceipts);
     row.SetField("inclrushfl", entity.inclrushfl);
     row.SetField("incldirectfl", entity.incldirectfl);
     row.SetField("inclreleasefl", entity.inclreleasefl);
     row.SetField("sortby", entity.sortby);
     row.SetField("frozenlttyskipfl", entity.frozenlttyskipfl);
     row.SetField("frozenlttymsg", entity.frozenlttymsg);
     row.SetField("calcltavgskipfl", entity.calcltavgskipfl);
     row.SetField("calcltavgmsg", entity.calcltavgmsg);
     row.SetField("customparam", entity.customparam);
     row.SetField("userfield", entity.userfield);
 }