Пример #1
0
        public static Sasttsastn BuildSasttsastnFromRow(DataRow row)
        {
            Sasttsastn entity = new Sasttsastn();

            entity.addtaxfl      = row.IsNull("addtaxfl") ? string.Empty : row.Field <string>("addtaxfl");
            entity.preauthppt    = row.IsNull("preauthppt") ? string.Empty : row.Field <string>("preauthppt");
            entity.catppt        = row.IsNull("catppt") ? string.Empty : row.Field <string>("catppt");
            entity.ccidppt       = row.IsNull("ccidppt") ? string.Empty : row.Field <string>("ccidppt");
            entity.addveri       = row.IsNull("addveri") ? string.Empty : row.Field <string>("addveri");
            entity.cccust        = row.IsNull("cccust") ? decimal.Zero : row.Field <decimal>("cccust");
            entity.chgcat        = row.IsNull("chgcat") ? string.Empty : row.Field <string>("chgcat");
            entity.ccaddon       = row.IsNull("ccaddon") ? decimal.Zero : row.Field <decimal>("ccaddon");
            entity.addonmin      = row.IsNull("addonmin") ? decimal.Zero : row.Field <decimal>("addonmin");
            entity.arpost        = row.IsNull("arpost") ? string.Empty : row.Field <string>("arpost");
            entity.boappdays     = row.IsNull("boappdays") ? decimal.Zero : row.Field <decimal>("boappdays");
            entity.ccaddontype   = row.IsNull("ccaddontype") ? string.Empty : row.Field <string>("ccaddontype");
            entity.acct1         = row.IsNull("acct1") ? string.Empty : row.Field <string>("acct1");
            entity.ccedit        = row.IsNull("ccedit") ? 0 : row.Field <int>("ccedit");
            entity.processor     = row.IsNull("processor") ? string.Empty : row.Field <string>("processor");
            entity.refundtype    = row.IsNull("refundtype") ? 0 : row.Field <int>("refundtype");
            entity.bankno        = row.IsNull("bankno") ? 0 : row.Field <int>("bankno");
            entity.merchantid    = row.IsNull("merchantid") ? string.Empty : row.Field <string>("merchantid");
            entity.lccinstalled  = row.Field <bool>("lccinstalled");
            entity.lCenPos       = row.Field <bool>("lCenPos");
            entity.ehffl         = row.Field <bool>("ehffl");
            entity.name          = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.addr1         = row.IsNull("addr1") ? string.Empty : row.Field <string>("addr1");
            entity.addr2         = row.IsNull("addr2") ? string.Empty : row.Field <string>("addr2");
            entity.city          = row.IsNull("city") ? string.Empty : row.Field <string>("city");
            entity.state         = row.IsNull("state") ? string.Empty : row.Field <string>("state");
            entity.zipcd         = row.IsNull("zipcd") ? string.Empty : row.Field <string>("zipcd");
            entity.fedtaxid      = row.IsNull("fedtaxid") ? string.Empty : row.Field <string>("fedtaxid");
            entity.glacct        = row.IsNull("glacct") ? string.Empty : row.Field <string>("glacct");
            entity.inoutfl       = row.Field <bool>("inoutfl");
            entity.glpostfl      = row.Field <bool>("glpostfl");
            entity.eDIAddoncd    = row.IsNull("EDIAddoncd") ? string.Empty : row.Field <string>("EDIAddoncd");
            entity.frtaddonfl    = row.IsNull("frtaddonfl") ? string.Empty : row.Field <string>("frtaddonfl");
            entity.tiedoeaddonno = row.IsNull("tiedoeaddonno") ? 0 : row.Field <int>("tiedoeaddonno");
            entity.acct2         = row.IsNull("acct2") ? string.Empty : row.Field <string>("acct2");
            entity.chkauth       = row.IsNull("chkauth") ? string.Empty : row.Field <string>("chkauth");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Пример #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSasttsastn(ref DataRow row, Sasttsastn entity)
 {
     row.SetField("addtaxfl", entity.addtaxfl);
     row.SetField("preauthppt", entity.preauthppt);
     row.SetField("catppt", entity.catppt);
     row.SetField("ccidppt", entity.ccidppt);
     row.SetField("addveri", entity.addveri);
     row.SetField("cccust", entity.cccust);
     row.SetField("chgcat", entity.chgcat);
     row.SetField("ccaddon", entity.ccaddon);
     row.SetField("addonmin", entity.addonmin);
     row.SetField("arpost", entity.arpost);
     row.SetField("boappdays", entity.boappdays);
     row.SetField("ccaddontype", entity.ccaddontype);
     row.SetField("acct1", entity.acct1);
     row.SetField("ccedit", entity.ccedit);
     row.SetField("processor", entity.processor);
     row.SetField("refundtype", entity.refundtype);
     row.SetField("bankno", entity.bankno);
     row.SetField("merchantid", entity.merchantid);
     row.SetField("lccinstalled", entity.lccinstalled);
     row.SetField("lCenPos", entity.lCenPos);
     row.SetField("ehffl", entity.ehffl);
     row.SetField("name", entity.name);
     row.SetField("addr1", entity.addr1);
     row.SetField("addr2", entity.addr2);
     row.SetField("city", entity.city);
     row.SetField("state", entity.state);
     row.SetField("zipcd", entity.zipcd);
     row.SetField("fedtaxid", entity.fedtaxid);
     row.SetField("glacct", entity.glacct);
     row.SetField("inoutfl", entity.inoutfl);
     row.SetField("glpostfl", entity.glpostfl);
     row.SetField("EDIAddoncd", entity.eDIAddoncd);
     row.SetField("frtaddonfl", entity.frtaddonfl);
     row.SetField("tiedoeaddonno", entity.tiedoeaddonno);
     row.SetField("acct2", entity.acct2);
     row.SetField("chkauth", entity.chkauth);
     row.SetField("userfield", entity.userfield);
 }