示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGlsfsetupsvalid(ref DataRow row, Glsfsetupsvalid entity)
 {
     row.SetField("itemno", entity.itemno);
     row.SetField("conoSummary", entity.conoSummary);
     row.SetField("divnoSummary", entity.divnoSummary);
     row.SetField("deptnoSummary", entity.deptnoSummary);
     row.SetField("subnoSummary", entity.subnoSummary);
     row.SetField("validcombo", entity.validcombo);
     row.SetField("conoValid", entity.conoValid);
     row.SetField("divnoValid", entity.divnoValid);
     row.SetField("deptnoValid", entity.deptnoValid);
     row.SetField("subnoValid", entity.subnoValid);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Glsfsetupsvalid BuildGlsfsetupsvalidFromRow(DataRow row)
        {
            Glsfsetupsvalid entity = new Glsfsetupsvalid();

            entity.itemno        = row.IsNull("itemno") ? 0 : row.Field <int>("itemno");
            entity.conoSummary   = row.IsNull("conoSummary") ? string.Empty : row.Field <string>("conoSummary");
            entity.divnoSummary  = row.IsNull("divnoSummary") ? string.Empty : row.Field <string>("divnoSummary");
            entity.deptnoSummary = row.IsNull("deptnoSummary") ? string.Empty : row.Field <string>("deptnoSummary");
            entity.subnoSummary  = row.IsNull("subnoSummary") ? string.Empty : row.Field <string>("subnoSummary");
            entity.validcombo    = row.Field <bool>("validcombo");
            entity.conoValid     = row.IsNull("conoValid") ? string.Empty : row.Field <string>("conoValid");
            entity.divnoValid    = row.IsNull("divnoValid") ? string.Empty : row.Field <string>("divnoValid");
            entity.deptnoValid   = row.IsNull("deptnoValid") ? string.Empty : row.Field <string>("deptnoValid");
            entity.subnoValid    = row.IsNull("subnoValid") ? string.Empty : row.Field <string>("subnoValid");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }