public static Loadoeelallttcriteria BuildLoadoeelallttcriteriaFromRow(DataRow row) { Loadoeelallttcriteria entity = new Loadoeelallttcriteria(); entity.irecordcountlimit = row.IsNull("irecordcountlimit") ? 0 : row.Field <int>("irecordcountlimit"); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.shipto = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.vendprod = row.IsNull("vendprod") ? string.Empty : row.Field <string>("vendprod"); entity.slsrepin = row.IsNull("slsrepin") ? string.Empty : row.Field <string>("slsrepin"); entity.slsrepout = row.IsNull("slsrepout") ? string.Empty : row.Field <string>("slsrepout"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.custpo = row.IsNull("custpo") ? string.Empty : row.Field <string>("custpo"); entity.stagelist = row.IsNull("stagelist") ? string.Empty : row.Field <string>("stagelist"); entity.transtypelist = row.IsNull("transtypelist") ? string.Empty : row.Field <string>("transtypelist"); entity.botype = row.IsNull("botype") ? string.Empty : row.Field <string>("botype"); entity.prodstat = row.IsNull("prodstat") ? string.Empty : row.Field <string>("prodstat"); entity.takenby = row.IsNull("takenby") ? string.Empty : row.Field <string>("takenby"); entity.doonlyfl = row.IsNull("doonlyfl") ? string.Empty : row.Field <string>("doonlyfl"); entity.fromentered = row.Field <DateTime?>("fromentered"); entity.frompromised = row.Field <DateTime?>("frompromised"); entity.fromreqship = row.Field <DateTime?>("fromreqship"); entity.fromshipped = row.Field <DateTime?>("fromshipped"); entity.frominvoiced = row.Field <DateTime?>("frominvoiced"); entity.toEntered = row.Field <DateTime?>("ToEntered"); entity.toPromised = row.Field <DateTime?>("ToPromised"); entity.toReqShip = row.Field <DateTime?>("ToReqShip"); entity.toShipped = row.Field <DateTime?>("ToShipped"); entity.toInvoiced = row.Field <DateTime?>("ToInvoiced"); entity.trackerno = row.IsNull("trackerno") ? string.Empty : row.Field <string>("trackerno"); entity.orderdisp = row.IsNull("orderdisp") ? string.Empty : row.Field <string>("orderdisp"); entity.wtbilled = row.IsNull("wtbilled") ? string.Empty : row.Field <string>("wtbilled"); entity.approvty = row.IsNull("approvty") ? string.Empty : row.Field <string>("approvty"); entity.susponlyfl = row.Field <bool>("susponlyfl"); entity.refer = row.IsNull("refer") ? string.Empty : row.Field <string>("refer"); entity.restrictcd = row.IsNull("restrictcd") ? string.Empty : row.Field <string>("restrictcd"); entity.restrictovrfl = row.Field <bool>("restrictovrfl"); entity.certcode = row.IsNull("certcode") ? string.Empty : row.Field <string>("certcode"); entity.custreserveovrfl = row.Field <bool>("custreserveovrfl"); entity.custreservecontractno = row.IsNull("custreservecontractno") ? string.Empty : row.Field <string>("custreservecontractno"); entity.saleswhse = row.IsNull("saleswhse") ? string.Empty : row.Field <string>("saleswhse"); entity.fulfillmentordty = row.IsNull("fulfillmentordty") ? string.Empty : row.Field <string>("fulfillmentordty"); entity.fulfillmenttiedty = row.IsNull("fulfillmenttiedty") ? string.Empty : row.Field <string>("fulfillmenttiedty"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromLoadoeelallttcriteria(ref DataRow row, Loadoeelallttcriteria entity) { row.SetField("irecordcountlimit", entity.irecordcountlimit); row.SetField("custno", entity.custno); row.SetField("shipto", entity.shipto); row.SetField("prod", entity.prod); row.SetField("vendprod", entity.vendprod); row.SetField("slsrepin", entity.slsrepin); row.SetField("slsrepout", entity.slsrepout); row.SetField("whse", entity.whse); row.SetField("custpo", entity.custpo); row.SetField("stagelist", entity.stagelist); row.SetField("transtypelist", entity.transtypelist); row.SetField("botype", entity.botype); row.SetField("prodstat", entity.prodstat); row.SetField("takenby", entity.takenby); row.SetField("doonlyfl", entity.doonlyfl); row.SetField("fromentered", entity.fromentered); row.SetField("frompromised", entity.frompromised); row.SetField("fromreqship", entity.fromreqship); row.SetField("fromshipped", entity.fromshipped); row.SetField("frominvoiced", entity.frominvoiced); row.SetField("ToEntered", entity.toEntered); row.SetField("ToPromised", entity.toPromised); row.SetField("ToReqShip", entity.toReqShip); row.SetField("ToShipped", entity.toShipped); row.SetField("ToInvoiced", entity.toInvoiced); row.SetField("trackerno", entity.trackerno); row.SetField("orderdisp", entity.orderdisp); row.SetField("wtbilled", entity.wtbilled); row.SetField("approvty", entity.approvty); row.SetField("susponlyfl", entity.susponlyfl); row.SetField("refer", entity.refer); row.SetField("restrictcd", entity.restrictcd); row.SetField("restrictovrfl", entity.restrictovrfl); row.SetField("certcode", entity.certcode); row.SetField("custreserveovrfl", entity.custreserveovrfl); row.SetField("custreservecontractno", entity.custreservecontractno); row.SetField("saleswhse", entity.saleswhse); row.SetField("fulfillmentordty", entity.fulfillmentordty); row.SetField("fulfillmenttiedty", entity.fulfillmenttiedty); row.SetField("userfield", entity.userfield); }