示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSasttsasta(ref DataRow row, Sasttsasta entity)
 {
     row.SetField("actioncd", entity.actioncd);
     row.SetField("menujump", entity.menujump);
     row.SetField("menuchoice", entity.menuchoice);
     row.SetField("ionactivefl", entity.ionactivefl);
     row.SetField("ionname", entity.ionname);
     row.SetField("reporttovendorfl", entity.reporttovendorfl);
     row.SetField("vendno", entity.vendno);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("dochandler", entity.dochandler);
     row.SetField("allowdochandler", entity.allowdochandler);
     row.SetField("direction", entity.direction);
     row.SetField("allowdirection", entity.allowdirection);
     row.SetField("nodename", entity.nodename);
     row.SetField("allownodename", entity.allownodename);
     row.SetField("attrname", entity.attrname);
     row.SetField("allowattrname", entity.allowattrname);
     row.SetField("ruletype", entity.ruletype);
     row.SetField("allowruletype", entity.allowruletype);
     row.SetField("rulevalue", entity.rulevalue);
     row.SetField("allowglobal", entity.allowglobal);
     row.SetField("allowcompany", entity.allowcompany);
     row.SetField("allowcustomer", entity.allowcustomer);
     row.SetField("allowshipto", entity.allowshipto);
     row.SetField("allowvendor", entity.allowvendor);
     row.SetField("allowshipfrom", entity.allowshipfrom);
     row.SetField("extdescrip", entity.extdescrip);
     row.SetField("categorylist", entity.categorylist);
     row.SetField("whse", entity.whse);
     row.SetField("exclecomm", entity.exclecomm);
     row.SetField("exclmdd", entity.exclmdd);
     row.SetField("usesuppunitsfl", entity.usesuppunitsfl);
     row.SetField("lostbususagefl", entity.lostbususagefl);
     row.SetField("billacctcd", entity.billacctcd);
     row.SetField("pcatdiscfl", entity.pcatdiscfl);
     row.SetField("termsfreq", entity.termsfreq);
     row.SetField("schedmm", entity.schedmm);
     row.SetField("schedyy", entity.schedyy);
     row.SetField("scheddd", entity.scheddd);
     row.SetField("schedwd", entity.schedwd);
     row.SetField("returnty", entity.returnty);
     row.SetField("starttm", entity.starttm);
     row.SetField("stoptm", entity.stoptm);
     row.SetField("timezoneclient", entity.timezoneclient);
     row.SetField("timezoneserver", entity.timezoneserver);
     row.SetField("minmarpct", entity.minmarpct);
     row.SetField("maxmarpct", entity.maxmarpct);
     row.SetField("jmdescrip", entity.jmdescrip);
     row.SetField("jmunit", entity.jmunit);
     row.SetField("ediunavty", entity.ediunavty);
     row.SetField("unavailtype", entity.unavailtype);
     row.SetField("reqauthfl", entity.reqauthfl);
     row.SetField("reqinvfl", entity.reqinvfl);
     row.SetField("reqwarrfl", entity.reqwarrfl);
     row.SetField("warrexchgfl", entity.warrexchgfl);
     row.SetField("reasunavty", entity.reasunavty);
     row.SetField("restockamt", entity.restockamt);
     row.SetField("restockfl", entity.restockfl);
     row.SetField("usagefl", entity.usagefl);
     row.SetField("restktaxgrp", entity.restktaxgrp);
     row.SetField("scrapacct", entity.scrapacct);
     row.SetField("reqinvcrfl", entity.reqinvcrfl);
     row.SetField("creditrebillfl", entity.creditrebillfl);
     row.SetField("crserialfl", entity.crserialfl);
     row.SetField("crrebatesfl", entity.crrebatesfl);
     row.SetField("displayfl", entity.displayfl);
     row.SetField("editablefl", entity.editablefl);
     row.SetField("function", entity.function);
     row.SetField("priority", entity.priority);
     row.SetField("unitediuom", entity.unitediuom);
     row.SetField("unitconv", entity.unitconv);
     row.SetField("unittype", entity.unittype);
     row.SetField("unitdec", entity.unitdec);
     row.SetField("unitlabel", entity.unitlabel);
     row.SetField("vendprodgrouptype", entity.vendprodgrouptype);
     row.SetField("rebatetype", entity.rebatetype);
     row.SetField("rebatesubtype", entity.rebatesubtype);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("pricetype", entity.pricetype);
     row.SetField("prodline", entity.prodline);
     row.SetField("edistkprccd", entity.edistkprccd);
     row.SetField("edistkprcadj", entity.edistkprcadj);
     row.SetField("intracountrycd", entity.intracountrycd);
     row.SetField("intraeslrptfl", entity.intraeslrptfl);
     row.SetField("dnbiinterfacefl", entity.dnbiinterfacefl);
     row.SetField("trmgrlang", entity.trmgrlang);
     row.SetField("splitfl", entity.splitfl);
     row.SetField("editsplitfl", entity.editsplitfl);
     row.SetField("IPAddress", entity.iPAddress);
     row.SetField("pk1", entity.pk1);
     row.SetField("pk2", entity.pk2);
     row.SetField("pk3", entity.pk3);
     row.SetField("pk4", entity.pk4);
     row.SetField("trstdcarriercd", entity.trstdcarriercd);
     row.SetField("trservlevlcd", entity.trservlevlcd);
     row.SetField("trmethodcd", entity.trmethodcd);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Sasttsasta BuildSasttsastaFromRow(DataRow row)
        {
            Sasttsasta entity = new Sasttsasta();

            entity.actioncd          = row.IsNull("actioncd") ? string.Empty : row.Field <string>("actioncd");
            entity.menujump          = row.IsNull("menujump") ? string.Empty : row.Field <string>("menujump");
            entity.menuchoice        = row.IsNull("menuchoice") ? string.Empty : row.Field <string>("menuchoice");
            entity.ionactivefl       = row.Field <bool>("ionactivefl");
            entity.ionname           = row.IsNull("ionname") ? string.Empty : row.Field <string>("ionname");
            entity.reporttovendorfl  = row.Field <bool>("reporttovendorfl");
            entity.vendno            = row.IsNull("vendno") ? 0 : row.Field <int>("vendno");
            entity.shipfmno          = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.dochandler        = row.IsNull("dochandler") ? string.Empty : row.Field <string>("dochandler");
            entity.allowdochandler   = row.IsNull("allowdochandler") ? string.Empty : row.Field <string>("allowdochandler");
            entity.direction         = row.IsNull("direction") ? string.Empty : row.Field <string>("direction");
            entity.allowdirection    = row.IsNull("allowdirection") ? string.Empty : row.Field <string>("allowdirection");
            entity.nodename          = row.IsNull("nodename") ? string.Empty : row.Field <string>("nodename");
            entity.allownodename     = row.IsNull("allownodename") ? string.Empty : row.Field <string>("allownodename");
            entity.attrname          = row.IsNull("attrname") ? string.Empty : row.Field <string>("attrname");
            entity.allowattrname     = row.IsNull("allowattrname") ? string.Empty : row.Field <string>("allowattrname");
            entity.ruletype          = row.IsNull("ruletype") ? string.Empty : row.Field <string>("ruletype");
            entity.allowruletype     = row.IsNull("allowruletype") ? string.Empty : row.Field <string>("allowruletype");
            entity.rulevalue         = row.IsNull("rulevalue") ? string.Empty : row.Field <string>("rulevalue");
            entity.allowglobal       = row.IsNull("allowglobal") ? string.Empty : row.Field <string>("allowglobal");
            entity.allowcompany      = row.IsNull("allowcompany") ? string.Empty : row.Field <string>("allowcompany");
            entity.allowcustomer     = row.IsNull("allowcustomer") ? string.Empty : row.Field <string>("allowcustomer");
            entity.allowshipto       = row.IsNull("allowshipto") ? string.Empty : row.Field <string>("allowshipto");
            entity.allowvendor       = row.IsNull("allowvendor") ? string.Empty : row.Field <string>("allowvendor");
            entity.allowshipfrom     = row.IsNull("allowshipfrom") ? string.Empty : row.Field <string>("allowshipfrom");
            entity.extdescrip        = row.IsNull("extdescrip") ? string.Empty : row.Field <string>("extdescrip");
            entity.categorylist      = row.IsNull("categorylist") ? string.Empty : row.Field <string>("categorylist");
            entity.whse              = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.exclecomm         = row.IsNull("exclecomm") ? string.Empty : row.Field <string>("exclecomm");
            entity.exclmdd           = row.IsNull("exclmdd") ? string.Empty : row.Field <string>("exclmdd");
            entity.usesuppunitsfl    = row.IsNull("usesuppunitsfl") ? string.Empty : row.Field <string>("usesuppunitsfl");
            entity.lostbususagefl    = row.IsNull("lostbususagefl") ? string.Empty : row.Field <string>("lostbususagefl");
            entity.billacctcd        = row.IsNull("billacctcd") ? string.Empty : row.Field <string>("billacctcd");
            entity.pcatdiscfl        = row.IsNull("pcatdiscfl") ? string.Empty : row.Field <string>("pcatdiscfl");
            entity.termsfreq         = row.IsNull("termsfreq") ? 0 : row.Field <int>("termsfreq");
            entity.schedmm           = row.IsNull("schedmm") ? string.Empty : row.Field <string>("schedmm");
            entity.schedyy           = row.IsNull("schedyy") ? string.Empty : row.Field <string>("schedyy");
            entity.scheddd           = row.IsNull("scheddd") ? string.Empty : row.Field <string>("scheddd");
            entity.schedwd           = row.IsNull("schedwd") ? string.Empty : row.Field <string>("schedwd");
            entity.returnty          = row.IsNull("returnty") ? string.Empty : row.Field <string>("returnty");
            entity.starttm           = row.IsNull("starttm") ? 0 : row.Field <int>("starttm");
            entity.stoptm            = row.IsNull("stoptm") ? 0 : row.Field <int>("stoptm");
            entity.timezoneclient    = row.IsNull("timezoneclient") ? 0 : row.Field <int>("timezoneclient");
            entity.timezoneserver    = row.IsNull("timezoneserver") ? 0 : row.Field <int>("timezoneserver");
            entity.minmarpct         = row.IsNull("minmarpct") ? decimal.Zero : row.Field <decimal>("minmarpct");
            entity.maxmarpct         = row.IsNull("maxmarpct") ? decimal.Zero : row.Field <decimal>("maxmarpct");
            entity.jmdescrip         = row.IsNull("jmdescrip") ? string.Empty : row.Field <string>("jmdescrip");
            entity.jmunit            = row.IsNull("jmunit") ? string.Empty : row.Field <string>("jmunit");
            entity.ediunavty         = row.IsNull("ediunavty") ? string.Empty : row.Field <string>("ediunavty");
            entity.unavailtype       = row.IsNull("unavailtype") ? string.Empty : row.Field <string>("unavailtype");
            entity.reqauthfl         = row.IsNull("reqauthfl") ? string.Empty : row.Field <string>("reqauthfl");
            entity.reqinvfl          = row.IsNull("reqinvfl") ? string.Empty : row.Field <string>("reqinvfl");
            entity.reqwarrfl         = row.IsNull("reqwarrfl") ? string.Empty : row.Field <string>("reqwarrfl");
            entity.warrexchgfl       = row.IsNull("warrexchgfl") ? string.Empty : row.Field <string>("warrexchgfl");
            entity.reasunavty        = row.IsNull("reasunavty") ? string.Empty : row.Field <string>("reasunavty");
            entity.restockamt        = row.IsNull("restockamt") ? decimal.Zero : row.Field <decimal>("restockamt");
            entity.restockfl         = row.IsNull("restockfl") ? string.Empty : row.Field <string>("restockfl");
            entity.usagefl           = row.IsNull("usagefl") ? string.Empty : row.Field <string>("usagefl");
            entity.restktaxgrp       = row.IsNull("restktaxgrp") ? 0 : row.Field <int>("restktaxgrp");
            entity.scrapacct         = row.IsNull("scrapacct") ? string.Empty : row.Field <string>("scrapacct");
            entity.reqinvcrfl        = row.IsNull("reqinvcrfl") ? string.Empty : row.Field <string>("reqinvcrfl");
            entity.creditrebillfl    = row.IsNull("creditrebillfl") ? string.Empty : row.Field <string>("creditrebillfl");
            entity.crserialfl        = row.IsNull("crserialfl") ? string.Empty : row.Field <string>("crserialfl");
            entity.crrebatesfl       = row.IsNull("crrebatesfl") ? string.Empty : row.Field <string>("crrebatesfl");
            entity.displayfl         = row.Field <bool>("displayfl");
            entity.editablefl        = row.Field <bool>("editablefl");
            entity.function          = row.IsNull("function") ? string.Empty : row.Field <string>("function");
            entity.priority          = row.IsNull("priority") ? 0 : row.Field <int>("priority");
            entity.unitediuom        = row.IsNull("unitediuom") ? string.Empty : row.Field <string>("unitediuom");
            entity.unitconv          = row.IsNull("unitconv") ? decimal.Zero : row.Field <decimal>("unitconv");
            entity.unittype          = row.IsNull("unittype") ? string.Empty : row.Field <string>("unittype");
            entity.unitdec           = row.IsNull("unitdec") ? decimal.Zero : row.Field <decimal>("unitdec");
            entity.unitlabel         = row.IsNull("unitlabel") ? string.Empty : row.Field <string>("unitlabel");
            entity.vendprodgrouptype = row.IsNull("vendprodgrouptype") ? string.Empty : row.Field <string>("vendprodgrouptype");
            entity.rebatetype        = row.IsNull("rebatetype") ? string.Empty : row.Field <string>("rebatetype");
            entity.rebatesubtype     = row.IsNull("rebatesubtype") ? string.Empty : row.Field <string>("rebatesubtype");
            entity.prodcat           = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.pricetype         = row.IsNull("pricetype") ? string.Empty : row.Field <string>("pricetype");
            entity.prodline          = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.edistkprccd       = row.IsNull("edistkprccd") ? string.Empty : row.Field <string>("edistkprccd");
            entity.edistkprcadj      = row.IsNull("edistkprcadj") ? decimal.Zero : row.Field <decimal>("edistkprcadj");
            entity.intracountrycd    = row.IsNull("intracountrycd") ? string.Empty : row.Field <string>("intracountrycd");
            entity.intraeslrptfl     = row.IsNull("intraeslrptfl") ? string.Empty : row.Field <string>("intraeslrptfl");
            entity.dnbiinterfacefl   = row.IsNull("dnbiinterfacefl") ? string.Empty : row.Field <string>("dnbiinterfacefl");
            entity.trmgrlang         = row.IsNull("trmgrlang") ? string.Empty : row.Field <string>("trmgrlang");
            entity.splitfl           = row.Field <bool>("splitfl");
            entity.editsplitfl       = row.Field <bool>("editsplitfl");
            entity.iPAddress         = row.IsNull("IPAddress") ? string.Empty : row.Field <string>("IPAddress");
            entity.pk1            = row.IsNull("pk1") ? string.Empty : row.Field <string>("pk1");
            entity.pk2            = row.IsNull("pk2") ? string.Empty : row.Field <string>("pk2");
            entity.pk3            = row.IsNull("pk3") ? string.Empty : row.Field <string>("pk3");
            entity.pk4            = row.IsNull("pk4") ? string.Empty : row.Field <string>("pk4");
            entity.trstdcarriercd = row.IsNull("trstdcarriercd") ? string.Empty : row.Field <string>("trstdcarriercd");
            entity.trservlevlcd   = row.IsNull("trservlevlcd") ? string.Empty : row.Field <string>("trservlevlcd");
            entity.trmethodcd     = row.IsNull("trmethodcd") ? string.Empty : row.Field <string>("trmethodcd");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }