Ejemplo n.º 1
0
        public static Crttaxdispttresults BuildCrttaxdispttresultsFromRow(DataRow row)
        {
            Crttaxdispttresults entity = new Crttaxdispttresults();

            entity.clocalcode      = row.IsNull("clocalcode") ? string.Empty : row.Field <string>("clocalcode");
            entity.clocaldescrip   = row.IsNull("clocaldescrip") ? string.Empty : row.Field <string>("clocaldescrip");
            entity.clocallabel     = row.IsNull("clocallabel") ? string.Empty : row.Field <string>("clocallabel");
            entity.ctaxgroupnm     = row.IsNull("ctaxgroupnm") ? string.Empty : row.Field <string>("ctaxgroupnm");
            entity.dtaxamt         = row.IsNull("dtaxamt") ? decimal.Zero : row.Field <decimal>("dtaxamt");
            entity.ctaxamtdspl     = row.IsNull("ctaxamtdspl") ? string.Empty : row.Field <string>("ctaxamtdspl");
            entity.dtaxsaleamt     = row.IsNull("dtaxsaleamt") ? decimal.Zero : row.Field <decimal>("dtaxsaleamt");
            entity.ctaxsaleamtdspl = row.IsNull("ctaxsaleamtdspl") ? string.Empty : row.Field <string>("ctaxsaleamtdspl");
            entity.iseqno          = row.IsNull("iseqno") ? 0 : row.Field <int>("iseqno");
            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);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCrttaxdispttresults(ref DataRow row, Crttaxdispttresults entity)
 {
     row.SetField("clocalcode", entity.clocalcode);
     row.SetField("clocaldescrip", entity.clocaldescrip);
     row.SetField("clocallabel", entity.clocallabel);
     row.SetField("ctaxgroupnm", entity.ctaxgroupnm);
     row.SetField("dtaxamt", entity.dtaxamt);
     row.SetField("ctaxamtdspl", entity.ctaxamtdspl);
     row.SetField("dtaxsaleamt", entity.dtaxsaleamt);
     row.SetField("ctaxsaleamtdspl", entity.ctaxsaleamtdspl);
     row.SetField("iseqno", entity.iseqno);
     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);
 }