Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcamrusagesensitivitysingle(ref DataRow row, Icamrusagesensitivitysingle entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("reportno", entity.reportno);
     row.SetField("whse", entity.whse);
     row.SetField("prod", entity.prod);
     row.SetField("secure", entity.secure);
     row.SetField("btnRefresh-visible", entity.btnRefreshVisible);
     row.SetField("btnRefresh-sensitive", entity.btnRefreshSensitive);
     row.SetField("btnUpdate-visible", entity.btnUpdateVisible);
     row.SetField("btnUpdate-sensitive", entity.btnUpdateSensitive);
     row.SetField("slBackWard-sensitive", entity.slBackWardSensitive);
     row.SetField("slForward-sensitive", entity.slForwardSensitive);
     row.SetField("slTrend-sensitive", entity.slTrendSensitive);
     row.SetField("slMonthRoll-sensitive", entity.slMonthRollSensitive);
     row.SetField("slExponSmooth-sensitive", entity.slExponSmoothSensitive);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Icamrusagesensitivitysingle BuildIcamrusagesensitivitysingleFromRow(DataRow row)
        {
            Icamrusagesensitivitysingle entity = new Icamrusagesensitivitysingle();

            entity.cono                   = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.reportno               = row.IsNull("reportno") ? 0 : row.Field <int>("reportno");
            entity.whse                   = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prod                   = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.secure                 = row.IsNull("secure") ? 0 : row.Field <int>("secure");
            entity.btnRefreshVisible      = row.Field <bool>("btnRefresh-visible");
            entity.btnRefreshSensitive    = row.Field <bool>("btnRefresh-sensitive");
            entity.btnUpdateVisible       = row.Field <bool>("btnUpdate-visible");
            entity.btnUpdateSensitive     = row.Field <bool>("btnUpdate-sensitive");
            entity.slBackWardSensitive    = row.Field <bool>("slBackWard-sensitive");
            entity.slForwardSensitive     = row.Field <bool>("slForward-sensitive");
            entity.slTrendSensitive       = row.Field <bool>("slTrend-sensitive");
            entity.slMonthRollSensitive   = row.Field <bool>("slMonthRoll-sensitive");
            entity.slExponSmoothSensitive = row.Field <bool>("slExponSmooth-sensitive");
            entity.userfield              = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }