Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGlsfsetupf(ref DataRow row, Glsfsetupf entity)
 {
     row.SetField("conoType", entity.conoType);
     row.SetField("conoSumm", entity.conoSumm);
     row.SetField("conoHV", entity.conoHV);
     row.SetField("conoFrom", entity.conoFrom);
     row.SetField("conoTo", entity.conoTo);
     row.SetField("divnoType", entity.divnoType);
     row.SetField("divnoSumm", entity.divnoSumm);
     row.SetField("divnoHV", entity.divnoHV);
     row.SetField("divnoFrom", entity.divnoFrom);
     row.SetField("divnoTo", entity.divnoTo);
     row.SetField("deptnoType", entity.deptnoType);
     row.SetField("deptnoSumm", entity.deptnoSumm);
     row.SetField("deptnoHV", entity.deptnoHV);
     row.SetField("deptnoFrom", entity.deptnoFrom);
     row.SetField("deptnoTo", entity.deptnoTo);
     row.SetField("comment", entity.comment);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Glsfsetupf BuildGlsfsetupfFromRow(DataRow row)
        {
            Glsfsetupf entity = new Glsfsetupf();

            entity.conoType   = row.IsNull("conoType") ? string.Empty : row.Field <string>("conoType");
            entity.conoSumm   = row.IsNull("conoSumm") ? string.Empty : row.Field <string>("conoSumm");
            entity.conoHV     = row.IsNull("conoHV") ? string.Empty : row.Field <string>("conoHV");
            entity.conoFrom   = row.IsNull("conoFrom") ? 0 : row.Field <int>("conoFrom");
            entity.conoTo     = row.IsNull("conoTo") ? 0 : row.Field <int>("conoTo");
            entity.divnoType  = row.IsNull("divnoType") ? string.Empty : row.Field <string>("divnoType");
            entity.divnoSumm  = row.IsNull("divnoSumm") ? string.Empty : row.Field <string>("divnoSumm");
            entity.divnoHV    = row.IsNull("divnoHV") ? string.Empty : row.Field <string>("divnoHV");
            entity.divnoFrom  = row.IsNull("divnoFrom") ? 0 : row.Field <int>("divnoFrom");
            entity.divnoTo    = row.IsNull("divnoTo") ? 0 : row.Field <int>("divnoTo");
            entity.deptnoType = row.IsNull("deptnoType") ? string.Empty : row.Field <string>("deptnoType");
            entity.deptnoSumm = row.IsNull("deptnoSumm") ? string.Empty : row.Field <string>("deptnoSumm");
            entity.deptnoHV   = row.IsNull("deptnoHV") ? string.Empty : row.Field <string>("deptnoHV");
            entity.deptnoFrom = row.IsNull("deptnoFrom") ? 0 : row.Field <int>("deptnoFrom");
            entity.deptnoTo   = row.IsNull("deptnoTo") ? 0 : row.Field <int>("deptnoTo");
            entity.comment    = row.IsNull("comment") ? string.Empty : row.Field <string>("comment");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }