예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromReptwizarddefnranges(ref DataRow row, Reptwizarddefnranges entity)
 {
     row.SetField("rangenumber", entity.rangenumber);
     row.SetField("rangename", entity.rangename);
     row.SetField("rangetype", entity.rangetype);
     row.SetField("rangelength", entity.rangelength);
     row.SetField("rangerequired", entity.rangerequired);
     row.SetField("rangebegvalue", entity.rangebegvalue);
     row.SetField("rangeendvalue", entity.rangeendvalue);
 }
예제 #2
0
        public static Reptwizarddefnranges BuildReptwizarddefnrangesFromRow(DataRow row)
        {
            Reptwizarddefnranges entity = new Reptwizarddefnranges();

            entity.rangenumber   = row.IsNull("rangenumber") ? 0 : row.Field <int>("rangenumber");
            entity.rangename     = row.IsNull("rangename") ? string.Empty : row.Field <string>("rangename");
            entity.rangetype     = row.IsNull("rangetype") ? string.Empty : row.Field <string>("rangetype");
            entity.rangelength   = row.IsNull("rangelength") ? 0 : row.Field <int>("rangelength");
            entity.rangerequired = row.Field <bool>("rangerequired");
            entity.rangebegvalue = row.IsNull("rangebegvalue") ? string.Empty : row.Field <string>("rangebegvalue");
            entity.rangeendvalue = row.IsNull("rangeendvalue") ? string.Empty : row.Field <string>("rangeendvalue");
            return(entity);
        }