示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromAreceinvoicesdata(ref DataRow row, Areceinvoicesdata entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("oper", entity.oper);
     row.SetField("applysubcustasked", entity.applysubcustasked);
     row.SetField("applysubcustanswer", entity.applysubcustanswer);
     row.SetField("credorigdiscountenabled", entity.credorigdiscountenabled);
     row.SetField("dbtseqno", entity.dbtseqno);
     row.SetField("debitvalidaterowid", entity.debitvalidaterowid.ToByteArray());
     row.SetField("invfiltersort", entity.invfiltersort);
     row.SetField("invno", entity.invno);
     row.SetField("invshowfilteredonly", entity.invshowfilteredonly);
     row.SetField("invshowfilteredonlychecked", entity.invshowfilteredonlychecked);
     row.SetField("invsortby", entity.invsortby);
     row.SetField("invsortfilteredtotopchecked", entity.invsortfilteredtotopchecked);
     row.SetField("invsuf", entity.invsuf);
     row.SetField("isupdatescreenlaunched", entity.isupdatescreenlaunched);
     row.SetField("launchupdatescreen", entity.launchupdatescreen);
     row.SetField("launchvalidate", entity.launchvalidate);
     row.SetField("readytoupdtasked", entity.readytoupdtasked);
     row.SetField("readytoupdtanswer", entity.readytoupdtanswer);
     row.SetField("resetfl", entity.resetfl);
     row.SetField("selectorder", entity.selectorder);
     row.SetField("v-smiscamt", entity.vSmiscamt);
     row.SetField("validate-c-credit-refer", entity.validateCCreditRefer);
     row.SetField("validate-c-divamounts", entity.validateCDivamounts);
     row.SetField("validate-c-divnos", entity.validateCDivnos);
     row.SetField("validate-de-credit-amount", entity.validateDeCreditAmount);
     row.SetField("validatecomplete", entity.validatecomplete);
     row.SetField("validatecurrentcount", entity.validatecurrentcount);
     row.SetField("validatefirstpass", entity.validatefirstpass);
     row.SetField("validatesuccess", entity.validatesuccess);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Areceinvoicesdata BuildAreceinvoicesdataFromRow(DataRow row)
        {
            Areceinvoicesdata entity = new Areceinvoicesdata();

            entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.oper = row.IsNull("oper") ? string.Empty : row.Field <string>("oper");
            entity.applysubcustasked       = row.Field <bool>("applysubcustasked");
            entity.applysubcustanswer      = row.Field <bool>("applysubcustanswer");
            entity.credorigdiscountenabled = row.Field <bool>("credorigdiscountenabled");
            entity.dbtseqno           = row.IsNull("dbtseqno") ? 0 : row.Field <int>("dbtseqno");
            entity.debitvalidaterowid = row.Field <byte[]>("debitvalidaterowid").ToStringEncoded();
            entity.invfiltersort      = row.IsNull("invfiltersort") ? string.Empty : row.Field <string>("invfiltersort");
            entity.invno = row.IsNull("invno") ? 0 : row.Field <int>("invno");
            entity.invshowfilteredonly        = row.Field <bool>("invshowfilteredonly");
            entity.invshowfilteredonlychecked = row.Field <bool>("invshowfilteredonlychecked");
            entity.invsortby = row.IsNull("invsortby") ? string.Empty : row.Field <string>("invsortby");
            entity.invsortfilteredtotopchecked = row.Field <bool>("invsortfilteredtotopchecked");
            entity.invsuf = row.IsNull("invsuf") ? 0 : row.Field <int>("invsuf");
            entity.isupdatescreenlaunched = row.Field <bool>("isupdatescreenlaunched");
            entity.launchupdatescreen     = row.Field <bool>("launchupdatescreen");
            entity.launchvalidate         = row.Field <bool>("launchvalidate");
            entity.readytoupdtasked       = row.Field <bool>("readytoupdtasked");
            entity.readytoupdtanswer      = row.Field <bool>("readytoupdtanswer");
            entity.resetfl                = row.Field <bool>("resetfl");
            entity.selectorder            = row.IsNull("selectorder") ? 0 : row.Field <int>("selectorder");
            entity.vSmiscamt              = row.IsNull("v-smiscamt") ? decimal.Zero : row.Field <decimal>("v-smiscamt");
            entity.validateCCreditRefer   = row.IsNull("validate-c-credit-refer") ? string.Empty : row.Field <string>("validate-c-credit-refer");
            entity.validateCDivamounts    = row.IsNull("validate-c-divamounts") ? string.Empty : row.Field <string>("validate-c-divamounts");
            entity.validateCDivnos        = row.IsNull("validate-c-divnos") ? string.Empty : row.Field <string>("validate-c-divnos");
            entity.validateDeCreditAmount = row.IsNull("validate-de-credit-amount") ? decimal.Zero : row.Field <decimal>("validate-de-credit-amount");
            entity.validatecomplete       = row.Field <bool>("validatecomplete");
            entity.validatecurrentcount   = row.IsNull("validatecurrentcount") ? 0 : row.Field <int>("validatecurrentcount");
            entity.validatefirstpass      = row.Field <bool>("validatefirstpass");
            entity.validatesuccess        = row.Field <bool>("validatesuccess");
            entity.userfield              = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }