/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeirorderlistresults(ref DataRow row, Oeirorderlistresults entity) { row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("ordernox", entity.ordernox); row.SetField("ordernotes", entity.ordernotes); row.SetField("statuscd", entity.statuscd); row.SetField("approvty", entity.approvty); row.SetField("approvintlty", entity.approvintlty); row.SetField("transtype", entity.transtype); row.SetField("stagecd", entity.stagecd); row.SetField("stagecdx", entity.stagecdx); row.SetField("promisedt", entity.promisedt); row.SetField("createdt", entity.createdt); row.SetField("invamount", entity.invamount); row.SetField("takenby", entity.takenby); row.SetField("whse", entity.whse); row.SetField("creditmgr", entity.creditmgr); row.SetField("custno", entity.custno); row.SetField("custnox", entity.custnox); row.SetField("custnotes", entity.custnotes); row.SetField("name", entity.name); row.SetField("priority", entity.priority); row.SetField("shipviaty", entity.shipviaty); row.SetField("servicekey", entity.servicekey); row.SetField("cchistoryfl", entity.cchistoryfl); row.SetField("userfield", entity.userfield); }
public static Oeirorderlistresults BuildOeirorderlistresultsFromRow(DataRow row) { Oeirorderlistresults entity = new Oeirorderlistresults(); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.ordernox = row.IsNull("ordernox") ? string.Empty : row.Field <string>("ordernox"); entity.ordernotes = row.IsNull("ordernotes") ? string.Empty : row.Field <string>("ordernotes"); entity.statuscd = row.IsNull("statuscd") ? string.Empty : row.Field <string>("statuscd"); entity.approvty = row.IsNull("approvty") ? string.Empty : row.Field <string>("approvty"); entity.approvintlty = row.IsNull("approvintlty") ? string.Empty : row.Field <string>("approvintlty"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.stagecd = row.IsNull("stagecd") ? string.Empty : row.Field <string>("stagecd"); entity.stagecdx = row.IsNull("stagecdx") ? string.Empty : row.Field <string>("stagecdx"); entity.promisedt = row.Field <DateTime?>("promisedt"); entity.createdt = row.Field <DateTime?>("createdt"); entity.invamount = row.IsNull("invamount") ? decimal.Zero : row.Field <decimal>("invamount"); entity.takenby = row.IsNull("takenby") ? string.Empty : row.Field <string>("takenby"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.creditmgr = row.IsNull("creditmgr") ? string.Empty : row.Field <string>("creditmgr"); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.custnox = row.IsNull("custnox") ? string.Empty : row.Field <string>("custnox"); entity.custnotes = row.IsNull("custnotes") ? string.Empty : row.Field <string>("custnotes"); entity.name = row.IsNull("name") ? string.Empty : row.Field <string>("name"); entity.priority = row.IsNull("priority") ? 0 : row.Field <int>("priority"); entity.shipviaty = row.IsNull("shipviaty") ? string.Empty : row.Field <string>("shipviaty"); entity.servicekey = row.IsNull("servicekey") ? string.Empty : row.Field <string>("servicekey"); entity.cchistoryfl = row.Field <bool>("cchistoryfl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }