Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArshiptoagingresults(ref DataRow row, Arshiptoagingresults entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("dsplshipto", entity.dsplshipto);
     row.SetField("balance", entity.balance);
     row.SetField("period1", entity.period1);
     row.SetField("period2", entity.period2);
     row.SetField("period3", entity.period3);
     row.SetField("period4", entity.period4);
     row.SetField("period5", entity.period5);
     row.SetField("cod", entity.cod);
     row.SetField("uncash", entity.uncash);
     row.SetField("misccred", entity.misccred);
     row.SetField("futinvbal", entity.futinvbal);
     row.SetField("servchg", entity.servchg);
     row.SetField("transcd", entity.transcd);
     row.SetField("credlim", entity.credlim);
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("user3", entity.user3);
     row.SetField("user4", entity.user4);
     row.SetField("user5", entity.user5);
     row.SetField("user6", entity.user6);
     row.SetField("user7", entity.user7);
     row.SetField("user8", entity.user8);
     row.SetField("user9", entity.user9);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Arshiptoagingresults BuildArshiptoagingresultsFromRow(DataRow row)
        {
            Arshiptoagingresults entity = new Arshiptoagingresults();

            entity.custno     = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto     = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.dsplshipto = row.IsNull("dsplshipto") ? string.Empty : row.Field <string>("dsplshipto");
            entity.balance    = row.IsNull("balance") ? decimal.Zero : row.Field <decimal>("balance");
            entity.period1    = row.IsNull("period1") ? decimal.Zero : row.Field <decimal>("period1");
            entity.period2    = row.IsNull("period2") ? decimal.Zero : row.Field <decimal>("period2");
            entity.period3    = row.IsNull("period3") ? decimal.Zero : row.Field <decimal>("period3");
            entity.period4    = row.IsNull("period4") ? decimal.Zero : row.Field <decimal>("period4");
            entity.period5    = row.IsNull("period5") ? decimal.Zero : row.Field <decimal>("period5");
            entity.cod        = row.IsNull("cod") ? decimal.Zero : row.Field <decimal>("cod");
            entity.uncash     = row.IsNull("uncash") ? decimal.Zero : row.Field <decimal>("uncash");
            entity.misccred   = row.IsNull("misccred") ? decimal.Zero : row.Field <decimal>("misccred");
            entity.futinvbal  = row.IsNull("futinvbal") ? decimal.Zero : row.Field <decimal>("futinvbal");
            entity.servchg    = row.IsNull("servchg") ? decimal.Zero : row.Field <decimal>("servchg");
            entity.transcd    = row.IsNull("transcd") ? 0 : row.Field <int>("transcd");
            entity.credlim    = row.IsNull("credlim") ? decimal.Zero : row.Field <decimal>("credlim");
            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.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }