Beispiel #1
0
        public static Arecewodisplay BuildArecewodisplayFromRow(DataRow row)
        {
            Arecewodisplay entity = new Arecewodisplay();

            entity.acctname                = row.IsNull("acctname") ? string.Empty : row.Field <string>("acctname");
            entity.acctnamevisible         = row.Field <bool>("acctnamevisible");
            entity.amount                  = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.btnaddlabel             = row.IsNull("btnaddlabel") ? string.Empty : row.Field <string>("btnaddlabel");
            entity.btnlookupaccountenabled = row.Field <bool>("btnlookupaccountenabled");
            entity.btnlookupaccountvisible = row.Field <bool>("btnlookupaccountvisible");
            entity.account                 = row.IsNull("account") ? string.Empty : row.Field <string>("account");
            entity.accountenabled          = row.Field <bool>("accountenabled");
            entity.accountvisible          = row.Field <bool>("accountvisible");
            entity.dashvisible             = row.Field <bool>("dashvisible");
            entity.amountenabled           = row.Field <bool>("amountenabled");
            entity.amountvisible           = row.Field <bool>("amountvisible");
            entity.adjbaseamt              = row.IsNull("adjbaseamt") ? decimal.Zero : row.Field <decimal>("adjbaseamt");
            entity.adjbaseamtenabled       = row.Field <bool>("adjbaseamtenabled");
            entity.adjbaseamtvisible       = row.Field <bool>("adjbaseamtvisible");
            entity.taxexemptamt            = row.IsNull("taxexemptamt") ? decimal.Zero : row.Field <decimal>("taxexemptamt");
            entity.taxexemptamtenabled     = row.Field <bool>("taxexemptamtenabled");
            entity.taxexemptamtvisible     = row.Field <bool>("taxexemptamtvisible");
            entity.invno                     = row.IsNull("invno") ? 0 : row.Field <int>("invno");
            entity.invnoenabled              = row.Field <bool>("invnoenabled");
            entity.invnovisible              = row.Field <bool>("invnovisible");
            entity.invsuf                    = row.IsNull("invsuf") ? 0 : row.Field <int>("invsuf");
            entity.invsufenabled             = row.Field <bool>("invsufenabled");
            entity.invsufvisible             = row.Field <bool>("invsufvisible");
            entity.glyear                    = row.IsNull("glyear") ? 0 : row.Field <int>("glyear");
            entity.proof                     = row.IsNull("proof") ? decimal.Zero : row.Field <decimal>("proof");
            entity.proofcolor                = row.IsNull("proofcolor") ? string.Empty : row.Field <string>("proofcolor");
            entity.seqno                     = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.seqnoenabled              = row.Field <bool>("seqnoenabled");
            entity.seqnovisible              = row.Field <bool>("seqnovisible");
            entity.writeofftaxamountsenabled = row.Field <bool>("writeofftaxamountsenabled");
            entity.vAmount                   = row.IsNull("v-amount") ? decimal.Zero : row.Field <decimal>("v-amount");
            entity.userfield                 = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Beispiel #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArecewodisplay(ref DataRow row, Arecewodisplay entity)
 {
     row.SetField("acctname", entity.acctname);
     row.SetField("acctnamevisible", entity.acctnamevisible);
     row.SetField("amount", entity.amount);
     row.SetField("btnaddlabel", entity.btnaddlabel);
     row.SetField("btnlookupaccountenabled", entity.btnlookupaccountenabled);
     row.SetField("btnlookupaccountvisible", entity.btnlookupaccountvisible);
     row.SetField("account", entity.account);
     row.SetField("accountenabled", entity.accountenabled);
     row.SetField("accountvisible", entity.accountvisible);
     row.SetField("dashvisible", entity.dashvisible);
     row.SetField("amountenabled", entity.amountenabled);
     row.SetField("amountvisible", entity.amountvisible);
     row.SetField("adjbaseamt", entity.adjbaseamt);
     row.SetField("adjbaseamtenabled", entity.adjbaseamtenabled);
     row.SetField("adjbaseamtvisible", entity.adjbaseamtvisible);
     row.SetField("taxexemptamt", entity.taxexemptamt);
     row.SetField("taxexemptamtenabled", entity.taxexemptamtenabled);
     row.SetField("taxexemptamtvisible", entity.taxexemptamtvisible);
     row.SetField("invno", entity.invno);
     row.SetField("invnoenabled", entity.invnoenabled);
     row.SetField("invnovisible", entity.invnovisible);
     row.SetField("invsuf", entity.invsuf);
     row.SetField("invsufenabled", entity.invsufenabled);
     row.SetField("invsufvisible", entity.invsufvisible);
     row.SetField("glyear", entity.glyear);
     row.SetField("proof", entity.proof);
     row.SetField("proofcolor", entity.proofcolor);
     row.SetField("seqno", entity.seqno);
     row.SetField("seqnoenabled", entity.seqnoenabled);
     row.SetField("seqnovisible", entity.seqnovisible);
     row.SetField("writeofftaxamountsenabled", entity.writeofftaxamountsenabled);
     row.SetField("v-amount", entity.vAmount);
     row.SetField("userfield", entity.userfield);
 }