/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromCreateictransttcriteria(ref DataRow row, Createictransttcriteria entity) { row.SetField("prod", entity.prod); row.SetField("whse", entity.whse); row.SetField("datethrough", entity.datethrough); row.SetField("types", entity.types); row.SetField("modules", entity.modules); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("jrnlno", entity.jrnlno); row.SetField("setno", entity.setno); row.SetField("invty", entity.invty); row.SetField("unit", entity.unit); row.SetField("customparam", entity.customparam); row.SetField("userfield", entity.userfield); }
public static Createictransttcriteria BuildCreateictransttcriteriaFromRow(DataRow row) { Createictransttcriteria entity = new Createictransttcriteria(); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.datethrough = row.Field <DateTime?>("datethrough"); entity.types = row.IsNull("types") ? string.Empty : row.Field <string>("types"); entity.modules = row.IsNull("modules") ? string.Empty : row.Field <string>("modules"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.jrnlno = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno"); entity.setno = row.IsNull("setno") ? 0 : row.Field <int>("setno"); entity.invty = row.IsNull("invty") ? string.Empty : row.Field <string>("invty"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.customparam = row.IsNull("customparam") ? string.Empty : row.Field <string>("customparam"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }