示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdemnewset(ref DataRow row, Pdemnewset entity)
 {
     row.SetField("setid", entity.setid);
     row.SetField("destination", entity.destination);
     row.SetField("description", entity.description);
     row.SetField("shipto", entity.shipto);
     row.SetField("begshipto", entity.begshipto);
     row.SetField("endshipto", entity.endshipto);
     row.SetField("shiptohidden", entity.shiptohidden);
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("begwhse", entity.begwhse);
     row.SetField("endwhse", entity.endwhse);
     row.SetField("whsehidden", entity.whsehidden);
     row.SetField("begregion", entity.begregion);
     row.SetField("endregion", entity.endregion);
     row.SetField("custno", entity.custno);
     row.SetField("begcustno", entity.begcustno);
     row.SetField("endcustno", entity.endcustno);
     row.SetField("custnohidden", entity.custnohidden);
     row.SetField("vendno", entity.vendno);
     row.SetField("begvendno", entity.begvendno);
     row.SetField("endvendno", entity.endvendno);
     row.SetField("vendnohidden", entity.vendnohidden);
     row.SetField("startfrom", entity.startfrom);
     row.SetField("startto", entity.startto);
     row.SetField("endfrom", entity.endfrom);
     row.SetField("endto", entity.endto);
     row.SetField("begprod", entity.begprod);
     row.SetField("begprodhidden", entity.begprodhidden);
     row.SetField("endprod", entity.endprod);
     row.SetField("endprodhidden", entity.endprodhidden);
     row.SetField("levelty", entity.levelty);
     row.SetField("leveltycode", entity.leveltycode);
     row.SetField("leveltyhidden", entity.leveltyhidden);
     row.SetField("leveltylabel", entity.leveltylabel);
     row.SetField("prodline", entity.prodline);
     row.SetField("begprodline", entity.begprodline);
     row.SetField("endprodline", entity.endprodline);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("begprodcat", entity.begprodcat);
     row.SetField("endprodcat", entity.endprodcat);
     row.SetField("prodprcty", entity.prodprcty);
     row.SetField("begprodprcty", entity.begprodprcty);
     row.SetField("endprodprcty", entity.endprodprcty);
     row.SetField("rebatety", entity.rebatety);
     row.SetField("begrebatety", entity.begrebatety);
     row.SetField("endrebatety", entity.endrebatety);
     row.SetField("rebsubty", entity.rebsubty);
     row.SetField("begrebsubty", entity.begrebsubty);
     row.SetField("endrebsubty", entity.endrebsubty);
     row.SetField("rebsubtyhidden", entity.rebsubtyhidden);
     row.SetField("custtype", entity.custtype);
     row.SetField("begcusttype", entity.begcusttype);
     row.SetField("endcusttype", entity.endcusttype);
     row.SetField("custrebty", entity.custrebty);
     row.SetField("begcustrebty", entity.begcustrebty);
     row.SetField("endcustrebty", entity.endcustrebty);
     row.SetField("custrebtyhidden", entity.custrebtyhidden);
     row.SetField("contractno", entity.contractno);
     row.SetField("contracthidden", entity.contracthidden);
     row.SetField("begcontractno", entity.begcontractno);
     row.SetField("endcontractno", entity.endcontractno);
     row.SetField("dropshipty", entity.dropshipty);
     row.SetField("rebatecd", entity.rebatecd);
     row.SetField("updtype", entity.updtype);
     row.SetField("defstart", entity.defstart);
     row.SetField("defstartenabled", entity.defstartenabled);
     row.SetField("defend", entity.defend);
     row.SetField("defendenabled", entity.defendenabled);
     row.SetField("family", entity.family);
     row.SetField("class", entity.@class);
     row.SetField("manual", entity.manual);
     row.SetField("manualhidden", entity.manualhidden);
     row.SetField("pricerebfl", entity.pricerebfl);
     row.SetField("pricerebflhidden", entity.pricerebflhidden);
     row.SetField("sortselection", entity.sortselection);
     row.SetField("sortlist", entity.sortlist);
     row.SetField("immediatefl", entity.immediatefl);
     row.SetField("starttm", entity.starttm);
     row.SetField("hour", entity.hour);
     row.SetField("hourenabled", entity.hourenabled);
     row.SetField("minute", entity.minute);
     row.SetField("minuteenabled", entity.minuteenabled);
     row.SetField("ampmfl", entity.ampmfl);
     row.SetField("ampmenabled", entity.ampmenabled);
     row.SetField("startdt", entity.startdt);
     row.SetField("startdtenabled", entity.startdtenabled);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Pdemnewset BuildPdemnewsetFromRow(DataRow row)
        {
            Pdemnewset entity = new Pdemnewset();

            entity.setid            = row.IsNull("setid") ? string.Empty : row.Field <string>("setid");
            entity.destination      = row.IsNull("destination") ? string.Empty : row.Field <string>("destination");
            entity.description      = row.IsNull("description") ? string.Empty : row.Field <string>("description");
            entity.shipto           = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.begshipto        = row.IsNull("begshipto") ? string.Empty : row.Field <string>("begshipto");
            entity.endshipto        = row.IsNull("endshipto") ? string.Empty : row.Field <string>("endshipto");
            entity.shiptohidden     = row.Field <bool>("shiptohidden");
            entity.prod             = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse             = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.begwhse          = row.IsNull("begwhse") ? string.Empty : row.Field <string>("begwhse");
            entity.endwhse          = row.IsNull("endwhse") ? string.Empty : row.Field <string>("endwhse");
            entity.whsehidden       = row.Field <bool>("whsehidden");
            entity.begregion        = row.IsNull("begregion") ? string.Empty : row.Field <string>("begregion");
            entity.endregion        = row.IsNull("endregion") ? string.Empty : row.Field <string>("endregion");
            entity.custno           = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.begcustno        = row.IsNull("begcustno") ? decimal.Zero : row.Field <decimal>("begcustno");
            entity.endcustno        = row.IsNull("endcustno") ? decimal.Zero : row.Field <decimal>("endcustno");
            entity.custnohidden     = row.Field <bool>("custnohidden");
            entity.vendno           = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.begvendno        = row.IsNull("begvendno") ? decimal.Zero : row.Field <decimal>("begvendno");
            entity.endvendno        = row.IsNull("endvendno") ? decimal.Zero : row.Field <decimal>("endvendno");
            entity.vendnohidden     = row.Field <bool>("vendnohidden");
            entity.startfrom        = row.Field <DateTime?>("startfrom");
            entity.startto          = row.Field <DateTime?>("startto");
            entity.endfrom          = row.Field <DateTime?>("endfrom");
            entity.endto            = row.Field <DateTime?>("endto");
            entity.begprod          = row.IsNull("begprod") ? string.Empty : row.Field <string>("begprod");
            entity.begprodhidden    = row.Field <bool>("begprodhidden");
            entity.endprod          = row.IsNull("endprod") ? string.Empty : row.Field <string>("endprod");
            entity.endprodhidden    = row.Field <bool>("endprodhidden");
            entity.levelty          = row.IsNull("levelty") ? string.Empty : row.Field <string>("levelty");
            entity.leveltycode      = row.IsNull("leveltycode") ? string.Empty : row.Field <string>("leveltycode");
            entity.leveltyhidden    = row.Field <bool>("leveltyhidden");
            entity.leveltylabel     = row.IsNull("leveltylabel") ? string.Empty : row.Field <string>("leveltylabel");
            entity.prodline         = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.begprodline      = row.IsNull("begprodline") ? string.Empty : row.Field <string>("begprodline");
            entity.endprodline      = row.IsNull("endprodline") ? string.Empty : row.Field <string>("endprodline");
            entity.prodcat          = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.begprodcat       = row.IsNull("begprodcat") ? string.Empty : row.Field <string>("begprodcat");
            entity.endprodcat       = row.IsNull("endprodcat") ? string.Empty : row.Field <string>("endprodcat");
            entity.prodprcty        = row.IsNull("prodprcty") ? string.Empty : row.Field <string>("prodprcty");
            entity.begprodprcty     = row.IsNull("begprodprcty") ? string.Empty : row.Field <string>("begprodprcty");
            entity.endprodprcty     = row.IsNull("endprodprcty") ? string.Empty : row.Field <string>("endprodprcty");
            entity.rebatety         = row.IsNull("rebatety") ? string.Empty : row.Field <string>("rebatety");
            entity.begrebatety      = row.IsNull("begrebatety") ? string.Empty : row.Field <string>("begrebatety");
            entity.endrebatety      = row.IsNull("endrebatety") ? string.Empty : row.Field <string>("endrebatety");
            entity.rebsubty         = row.IsNull("rebsubty") ? string.Empty : row.Field <string>("rebsubty");
            entity.begrebsubty      = row.IsNull("begrebsubty") ? string.Empty : row.Field <string>("begrebsubty");
            entity.endrebsubty      = row.IsNull("endrebsubty") ? string.Empty : row.Field <string>("endrebsubty");
            entity.rebsubtyhidden   = row.Field <bool>("rebsubtyhidden");
            entity.custtype         = row.IsNull("custtype") ? string.Empty : row.Field <string>("custtype");
            entity.begcusttype      = row.IsNull("begcusttype") ? string.Empty : row.Field <string>("begcusttype");
            entity.endcusttype      = row.IsNull("endcusttype") ? string.Empty : row.Field <string>("endcusttype");
            entity.custrebty        = row.IsNull("custrebty") ? string.Empty : row.Field <string>("custrebty");
            entity.begcustrebty     = row.IsNull("begcustrebty") ? string.Empty : row.Field <string>("begcustrebty");
            entity.endcustrebty     = row.IsNull("endcustrebty") ? string.Empty : row.Field <string>("endcustrebty");
            entity.custrebtyhidden  = row.Field <bool>("custrebtyhidden");
            entity.contractno       = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno");
            entity.contracthidden   = row.Field <bool>("contracthidden");
            entity.begcontractno    = row.IsNull("begcontractno") ? string.Empty : row.Field <string>("begcontractno");
            entity.endcontractno    = row.IsNull("endcontractno") ? string.Empty : row.Field <string>("endcontractno");
            entity.dropshipty       = row.IsNull("dropshipty") ? string.Empty : row.Field <string>("dropshipty");
            entity.rebatecd         = row.IsNull("rebatecd") ? string.Empty : row.Field <string>("rebatecd");
            entity.updtype          = row.IsNull("updtype") ? 0 : row.Field <int>("updtype");
            entity.defstart         = row.Field <DateTime?>("defstart");
            entity.defstartenabled  = row.Field <bool>("defstartenabled");
            entity.defend           = row.Field <DateTime?>("defend");
            entity.defendenabled    = row.Field <bool>("defendenabled");
            entity.family           = row.IsNull("family") ? string.Empty : row.Field <string>("family");
            entity.@class           = row.IsNull("class") ? string.Empty : row.Field <string>("class");
            entity.manual           = row.IsNull("manual") ? string.Empty : row.Field <string>("manual");
            entity.manualhidden     = row.Field <bool>("manualhidden");
            entity.pricerebfl       = row.Field <bool>("pricerebfl");
            entity.pricerebflhidden = row.Field <bool>("pricerebflhidden");
            entity.sortselection    = row.IsNull("sortselection") ? string.Empty : row.Field <string>("sortselection");
            entity.sortlist         = row.IsNull("sortlist") ? string.Empty : row.Field <string>("sortlist");
            entity.immediatefl      = row.Field <bool>("immediatefl");
            entity.starttm          = row.IsNull("starttm") ? 0 : row.Field <int>("starttm");
            entity.hour             = row.IsNull("hour") ? 0 : row.Field <int>("hour");
            entity.hourenabled      = row.Field <bool>("hourenabled");
            entity.minute           = row.IsNull("minute") ? 0 : row.Field <int>("minute");
            entity.minuteenabled    = row.Field <bool>("minuteenabled");
            entity.ampmfl           = row.Field <bool>("ampmfl");
            entity.ampmenabled      = row.Field <bool>("ampmenabled");
            entity.startdt          = row.Field <DateTime?>("startdt");
            entity.startdtenabled   = row.Field <bool>("startdtenabled");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }