/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromResendtranscriteria(ref DataRow row, Resendtranscriteria entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("fromdate", entity.fromdate); row.SetField("todate", entity.todate); row.SetField("fromtime", entity.fromtime); row.SetField("totime", entity.totime); row.SetField("transtype", entity.transtype); row.SetField("absnum", entity.absnum); row.SetField("ponum", entity.ponum); row.SetField("posuf", entity.posuf); row.SetField("rowstatus", entity.rowstatus); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("resendtranscriteriauserfield", entity.resendtranscriteriauserfield); row.SetField("userfield", entity.userfield); }
public static Resendtranscriteria BuildResendtranscriteriaFromRow(DataRow row) { Resendtranscriteria entity = new Resendtranscriteria(); entity.coNum = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num"); entity.whNum = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num"); entity.fromdate = row.Field <DateTime?>("fromdate"); entity.todate = row.Field <DateTime?>("todate"); entity.fromtime = row.IsNull("fromtime") ? string.Empty : row.Field <string>("fromtime"); entity.totime = row.IsNull("totime") ? string.Empty : row.Field <string>("totime"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.absnum = row.IsNull("absnum") ? string.Empty : row.Field <string>("absnum"); entity.ponum = row.IsNull("ponum") ? string.Empty : row.Field <string>("ponum"); entity.posuf = row.IsNull("posuf") ? string.Empty : row.Field <string>("posuf"); entity.rowstatus = row.IsNull("rowstatus") ? string.Empty : row.Field <string>("rowstatus"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.resendtranscriteriauserfield = row.IsNull("resendtranscriteriauserfield") ? string.Empty : row.Field <string>("resendtranscriteriauserfield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }