Example #1
0
        public static Armanualterms BuildArmanualtermsFromRow(DataRow row)
        {
            Armanualterms entity = new Armanualterms();

            entity.transcd          = row.IsNull("transcd") ? 0 : row.Field <int>("transcd");
            entity.amount           = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.gstamt           = row.IsNull("gstamt") ? decimal.Zero : row.Field <decimal>("gstamt");
            entity.pstamt           = row.IsNull("pstamt") ? decimal.Zero : row.Field <decimal>("pstamt");
            entity.tAddon1label     = row.IsNull("t-addon1label") ? string.Empty : row.Field <string>("t-addon1label");
            entity.tAddon2label     = row.IsNull("t-addon2label") ? string.Empty : row.Field <string>("t-addon2label");
            entity.aTermstype       = row.IsNull("a-termstype") ? string.Empty : row.Field <string>("a-termstype");
            entity.tAddon1          = row.IsNull("t-addon1") ? decimal.Zero : row.Field <decimal>("t-addon1");
            entity.tAddon2          = row.IsNull("t-addon2") ? decimal.Zero : row.Field <decimal>("t-addon2");
            entity.tDiscamt         = row.IsNull("t-discamt") ? decimal.Zero : row.Field <decimal>("t-discamt");
            entity.tDiscdays        = row.IsNull("t-discdays") ? 0 : row.Field <int>("t-discdays");
            entity.tDiscdt          = row.Field <DateTime?>("t-discdt");
            entity.tDiscpct         = row.IsNull("t-discpct") ? decimal.Zero : row.Field <decimal>("t-discpct");
            entity.tDuedays         = row.IsNull("t-duedays") ? 0 : row.Field <int>("t-duedays");
            entity.tDuedt           = row.Field <DateTime?>("t-duedt");
            entity.tFreqdays        = row.IsNull("t-freqdays") ? 0 : row.Field <int>("t-freqdays");
            entity.tNopays          = row.IsNull("t-nopays") ? 0 : row.Field <int>("t-nopays");
            entity.user1            = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2            = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.user3            = row.IsNull("user3") ? string.Empty : row.Field <string>("user3");
            entity.user4            = row.IsNull("user4") ? string.Empty : row.Field <string>("user4");
            entity.user5            = row.IsNull("user5") ? string.Empty : row.Field <string>("user5");
            entity.user6            = row.Field <decimal?>("user6");
            entity.user7            = row.Field <decimal?>("user7");
            entity.user8            = row.Field <DateTime?>("user8");
            entity.user9            = row.Field <DateTime?>("user9");
            entity.vAddondist       = row.IsNull("v-addondist") ? decimal.Zero : row.Field <decimal>("v-addondist");
            entity.vExpaddfl        = row.Field <bool>("v-expaddfl");
            entity.vGrossnetfl      = row.Field <bool>("v-grossnetfl");
            entity.vImmedpyfl       = row.Field <bool>("v-immedpyfl");
            entity.vManamtfl        = row.Field <bool>("v-manamtfl");
            entity.vMandiscfl       = row.Field <bool>("v-mandiscfl");
            entity.vManduefl        = row.Field <bool>("v-manduefl");
            entity.vTermsfl         = row.Field <bool>("v-termsfl");
            entity.lInclAddonsFl    = row.Field <bool>("lInclAddonsFl");
            entity.vAddon1          = row.IsNull("v-addon1") ? 0 : row.Field <int>("v-addon1");
            entity.vAddon2          = row.IsNull("v-addon2") ? 0 : row.Field <int>("v-addon2");
            entity.vAddon3          = row.IsNull("v-addon3") ? 0 : row.Field <int>("v-addon3");
            entity.vAddon4          = row.IsNull("v-addon4") ? 0 : row.Field <int>("v-addon4");
            entity.vAddon5          = row.IsNull("v-addon5") ? 0 : row.Field <int>("v-addon5");
            entity.vAddon6          = row.IsNull("v-addon6") ? 0 : row.Field <int>("v-addon6");
            entity.vAddon7          = row.IsNull("v-addon7") ? 0 : row.Field <int>("v-addon7");
            entity.vAddon8          = row.IsNull("v-addon8") ? 0 : row.Field <int>("v-addon8");
            entity.oAddon1          = row.IsNull("o-addon1") ? decimal.Zero : row.Field <decimal>("o-addon1");
            entity.oAddon2          = row.IsNull("o-addon2") ? decimal.Zero : row.Field <decimal>("o-addon2");
            entity.oDiscdt          = row.Field <DateTime?>("o-discdt");
            entity.oDiscamt         = row.IsNull("o-discamt") ? decimal.Zero : row.Field <decimal>("o-discamt");
            entity.oDiscpct         = row.IsNull("o-discpct") ? decimal.Zero : row.Field <decimal>("o-discpct");
            entity.oDuedt           = row.Field <DateTime?>("o-duedt");
            entity.oNopays          = row.IsNull("o-nopays") ? 0 : row.Field <int>("o-nopays");
            entity.oFreqdays        = row.IsNull("o-freqdays") ? 0 : row.Field <int>("o-freqdays");
            entity.tAddonenabled    = row.Field <bool>("t-addonenabled");
            entity.tDiscdtenabled   = row.Field <bool>("t-discdtenabled");
            entity.tDuedtenabled    = row.Field <bool>("t-duedtenabled");
            entity.tFreqdaysenabled = row.Field <bool>("t-freqdaysenabled");
            entity.tNopaysenabled   = row.Field <bool>("t-nopaysenabled");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }