Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdecgetpricecostresults(ref DataRow row, Pdecgetpricecostresults entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("descrip1", entity.descrip1);
     row.SetField("descrip2", entity.descrip2);
     row.SetField("whse", entity.whse);
     row.SetField("homewhsefl", entity.homewhsefl);
     row.SetField("homewhse", entity.homewhse);
     row.SetField("pricetxt", entity.pricetxt);
     row.SetField("effectdt", entity.effectdt);
     row.SetField("basetype", entity.basetype);
     row.SetField("basetypedesc", entity.basetypedesc);
     row.SetField("baseprice", entity.baseprice);
     row.SetField("basepricenew", entity.basepricenew);
     row.SetField("basepriceorig", entity.basepriceorig);
     row.SetField("basedt", entity.basedt);
     row.SetField("listtype", entity.listtype);
     row.SetField("listtypedesc", entity.listtypedesc);
     row.SetField("listprice", entity.listprice);
     row.SetField("listpricenew", entity.listpricenew);
     row.SetField("listpriceorig", entity.listpriceorig);
     row.SetField("listdt", entity.listdt);
     row.SetField("repltype", entity.repltype);
     row.SetField("repltypedesc", entity.repltypedesc);
     row.SetField("replcost", entity.replcost);
     row.SetField("replcostnew", entity.replcostnew);
     row.SetField("replcostorig", entity.replcostorig);
     row.SetField("repldt", entity.repldt);
     row.SetField("stndtype", entity.stndtype);
     row.SetField("stndtypedesc", entity.stndtypedesc);
     row.SetField("stndcost", entity.stndcost);
     row.SetField("stndcostnew", entity.stndcostnew);
     row.SetField("stndcostorig", entity.stndcostorig);
     row.SetField("stnddt", entity.stnddt);
     row.SetField("lastcost", entity.lastcost);
     row.SetField("th1", entity.th1);
     row.SetField("th2", entity.th2);
     row.SetField("th3", entity.th3);
     row.SetField("pround", entity.pround);
     row.SetField("prounddesc", entity.prounddesc);
     row.SetField("ptarget", entity.ptarget);
     row.SetField("ptargetdesc", entity.ptargetdesc);
     row.SetField("pexactrnd", entity.pexactrnd);
     row.SetField("pricetype", entity.pricetype);
     row.SetField("newdt", entity.newdt);
     row.SetField("icglcost", entity.icglcost);
     row.SetField("icglbsty", entity.icglbsty);
     row.SetField("updglty", entity.updglty);
     row.SetField("calcord1", entity.calcord1);
     row.SetField("calcord2", entity.calcord2);
     row.SetField("calcord3", entity.calcord3);
     row.SetField("msgtxt1", entity.msgtxt1);
     row.SetField("msgtxt2", entity.msgtxt2);
     row.SetField("msgtxt3", entity.msgtxt3);
     row.SetField("msgtxt4", entity.msgtxt4);
     row.SetField("ourproc", entity.ourproc);
     row.SetField("callproc", entity.callproc);
     row.SetField("secure", entity.secure);
     row.SetField("gldivfl", entity.gldivfl);
     row.SetField("divno", entity.divno);
     row.SetField("icincaddsm", entity.icincaddsm);
     row.SetField("icincaddgl", entity.icincaddgl);
     row.SetField("icscupdt", entity.icscupdt);
     row.SetField("effectivedt", entity.effectivedt);
     row.SetField("pricetypedesc", entity.pricetypedesc);
     row.SetField("lReplaceCostEnable", entity.lReplaceCostEnable);
     row.SetField("lStandardCostEnable", entity.lStandardCostEnable);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Pdecgetpricecostresults BuildPdecgetpricecostresultsFromRow(DataRow row)
        {
            Pdecgetpricecostresults entity = new Pdecgetpricecostresults();

            entity.prod                = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.notesfl             = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.descrip1            = row.IsNull("descrip1") ? string.Empty : row.Field <string>("descrip1");
            entity.descrip2            = row.IsNull("descrip2") ? string.Empty : row.Field <string>("descrip2");
            entity.whse                = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.homewhsefl          = row.Field <bool>("homewhsefl");
            entity.homewhse            = row.IsNull("homewhse") ? string.Empty : row.Field <string>("homewhse");
            entity.pricetxt            = row.IsNull("pricetxt") ? string.Empty : row.Field <string>("pricetxt");
            entity.effectdt            = row.Field <DateTime?>("effectdt");
            entity.basetype            = row.IsNull("basetype") ? string.Empty : row.Field <string>("basetype");
            entity.basetypedesc        = row.IsNull("basetypedesc") ? string.Empty : row.Field <string>("basetypedesc");
            entity.baseprice           = row.IsNull("baseprice") ? decimal.Zero : row.Field <decimal>("baseprice");
            entity.basepricenew        = row.IsNull("basepricenew") ? decimal.Zero : row.Field <decimal>("basepricenew");
            entity.basepriceorig       = row.IsNull("basepriceorig") ? decimal.Zero : row.Field <decimal>("basepriceorig");
            entity.basedt              = row.Field <DateTime?>("basedt");
            entity.listtype            = row.IsNull("listtype") ? string.Empty : row.Field <string>("listtype");
            entity.listtypedesc        = row.IsNull("listtypedesc") ? string.Empty : row.Field <string>("listtypedesc");
            entity.listprice           = row.IsNull("listprice") ? decimal.Zero : row.Field <decimal>("listprice");
            entity.listpricenew        = row.IsNull("listpricenew") ? decimal.Zero : row.Field <decimal>("listpricenew");
            entity.listpriceorig       = row.IsNull("listpriceorig") ? decimal.Zero : row.Field <decimal>("listpriceorig");
            entity.listdt              = row.Field <DateTime?>("listdt");
            entity.repltype            = row.IsNull("repltype") ? string.Empty : row.Field <string>("repltype");
            entity.repltypedesc        = row.IsNull("repltypedesc") ? string.Empty : row.Field <string>("repltypedesc");
            entity.replcost            = row.IsNull("replcost") ? decimal.Zero : row.Field <decimal>("replcost");
            entity.replcostnew         = row.IsNull("replcostnew") ? decimal.Zero : row.Field <decimal>("replcostnew");
            entity.replcostorig        = row.IsNull("replcostorig") ? decimal.Zero : row.Field <decimal>("replcostorig");
            entity.repldt              = row.Field <DateTime?>("repldt");
            entity.stndtype            = row.IsNull("stndtype") ? string.Empty : row.Field <string>("stndtype");
            entity.stndtypedesc        = row.IsNull("stndtypedesc") ? string.Empty : row.Field <string>("stndtypedesc");
            entity.stndcost            = row.IsNull("stndcost") ? decimal.Zero : row.Field <decimal>("stndcost");
            entity.stndcostnew         = row.IsNull("stndcostnew") ? decimal.Zero : row.Field <decimal>("stndcostnew");
            entity.stndcostorig        = row.IsNull("stndcostorig") ? decimal.Zero : row.Field <decimal>("stndcostorig");
            entity.stnddt              = row.Field <DateTime?>("stnddt");
            entity.lastcost            = row.IsNull("lastcost") ? decimal.Zero : row.Field <decimal>("lastcost");
            entity.th1                 = row.IsNull("th1") ? string.Empty : row.Field <string>("th1");
            entity.th2                 = row.IsNull("th2") ? string.Empty : row.Field <string>("th2");
            entity.th3                 = row.IsNull("th3") ? string.Empty : row.Field <string>("th3");
            entity.pround              = row.IsNull("pround") ? string.Empty : row.Field <string>("pround");
            entity.prounddesc          = row.IsNull("prounddesc") ? string.Empty : row.Field <string>("prounddesc");
            entity.ptarget             = row.IsNull("ptarget") ? 0 : row.Field <int>("ptarget");
            entity.ptargetdesc         = row.IsNull("ptargetdesc") ? string.Empty : row.Field <string>("ptargetdesc");
            entity.pexactrnd           = row.IsNull("pexactrnd") ? decimal.Zero : row.Field <decimal>("pexactrnd");
            entity.pricetype           = row.IsNull("pricetype") ? string.Empty : row.Field <string>("pricetype");
            entity.newdt               = row.Field <DateTime?>("newdt");
            entity.icglcost            = row.IsNull("icglcost") ? string.Empty : row.Field <string>("icglcost");
            entity.icglbsty            = row.IsNull("icglbsty") ? 0 : row.Field <int>("icglbsty");
            entity.updglty             = row.IsNull("updglty") ? string.Empty : row.Field <string>("updglty");
            entity.calcord1            = row.IsNull("calcord1") ? string.Empty : row.Field <string>("calcord1");
            entity.calcord2            = row.IsNull("calcord2") ? string.Empty : row.Field <string>("calcord2");
            entity.calcord3            = row.IsNull("calcord3") ? string.Empty : row.Field <string>("calcord3");
            entity.msgtxt1             = row.IsNull("msgtxt1") ? string.Empty : row.Field <string>("msgtxt1");
            entity.msgtxt2             = row.IsNull("msgtxt2") ? string.Empty : row.Field <string>("msgtxt2");
            entity.msgtxt3             = row.IsNull("msgtxt3") ? string.Empty : row.Field <string>("msgtxt3");
            entity.msgtxt4             = row.IsNull("msgtxt4") ? string.Empty : row.Field <string>("msgtxt4");
            entity.ourproc             = row.IsNull("ourproc") ? string.Empty : row.Field <string>("ourproc");
            entity.callproc            = row.IsNull("callproc") ? string.Empty : row.Field <string>("callproc");
            entity.secure              = row.IsNull("secure") ? 0 : row.Field <int>("secure");
            entity.gldivfl             = row.Field <bool>("gldivfl");
            entity.divno               = row.IsNull("divno") ? 0 : row.Field <int>("divno");
            entity.icincaddsm          = row.Field <bool>("icincaddsm");
            entity.icincaddgl          = row.Field <bool>("icincaddgl");
            entity.icscupdt            = row.Field <bool>("icscupdt");
            entity.effectivedt         = row.Field <DateTime?>("effectivedt");
            entity.pricetypedesc       = row.IsNull("pricetypedesc") ? string.Empty : row.Field <string>("pricetypedesc");
            entity.lReplaceCostEnable  = row.Field <bool>("lReplaceCostEnable");
            entity.lStandardCostEnable = row.Field <bool>("lStandardCostEnable");
            entity.userfield           = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }