Beispiel #1
0
        public static Oeiohdrlistcriteria BuildOeiohdrlistcriteriaFromRow(DataRow row)
        {
            Oeiohdrlistcriteria entity = new Oeiohdrlistcriteria();

            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.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.divno             = row.IsNull("divno") ? 0 : row.Field <int>("divno");
            entity.custpo            = row.IsNull("custpo") ? string.Empty : row.Field <string>("custpo");
            entity.transtypelist     = row.IsNull("transtypelist") ? string.Empty : row.Field <string>("transtypelist");
            entity.botype            = row.IsNull("botype") ? string.Empty : row.Field <string>("botype");
            entity.stagelist         = row.IsNull("stagelist") ? string.Empty : row.Field <string>("stagelist");
            entity.takenby           = row.IsNull("takenby") ? string.Empty : row.Field <string>("takenby");
            entity.doonlyflag        = row.IsNull("doonlyflag") ? string.Empty : row.Field <string>("doonlyflag");
            entity.frtoutreqonlyfl   = row.IsNull("frtoutreqonlyfl") ? string.Empty : row.Field <string>("frtoutreqonlyfl");
            entity.trackerno         = row.IsNull("trackerno") ? string.Empty : row.Field <string>("trackerno");
            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.fromccsubmitd     = row.Field <DateTime?>("fromccsubmitd");
            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.toccsubmitd       = row.Field <DateTime?>("toccsubmitd");
            entity.orderdisp         = row.IsNull("orderdisp") ? string.Empty : row.Field <string>("orderdisp");
            entity.wtbilled          = row.IsNull("wtbilled") ? string.Empty : row.Field <string>("wtbilled");
            entity.customfield       = row.IsNull("customfield") ? string.Empty : row.Field <string>("customfield");
            entity.recordlimit       = row.IsNull("recordlimit") ? 0 : row.Field <int>("recordlimit");
            entity.orderno           = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf          = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            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.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.lspinvregstatus   = row.IsNull("lspinvregstatus") ? string.Empty : row.Field <string>("lspinvregstatus");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Beispiel #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeiohdrlistcriteria(ref DataRow row, Oeiohdrlistcriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("prod", entity.prod);
     row.SetField("slsrepin", entity.slsrepin);
     row.SetField("slsrepout", entity.slsrepout);
     row.SetField("whse", entity.whse);
     row.SetField("divno", entity.divno);
     row.SetField("custpo", entity.custpo);
     row.SetField("transtypelist", entity.transtypelist);
     row.SetField("botype", entity.botype);
     row.SetField("stagelist", entity.stagelist);
     row.SetField("takenby", entity.takenby);
     row.SetField("doonlyflag", entity.doonlyflag);
     row.SetField("frtoutreqonlyfl", entity.frtoutreqonlyfl);
     row.SetField("trackerno", entity.trackerno);
     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("fromccsubmitd", entity.fromccsubmitd);
     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("toccsubmitd", entity.toccsubmitd);
     row.SetField("orderdisp", entity.orderdisp);
     row.SetField("wtbilled", entity.wtbilled);
     row.SetField("customfield", entity.customfield);
     row.SetField("recordlimit", entity.recordlimit);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("approvty", entity.approvty);
     row.SetField("susponlyfl", entity.susponlyfl);
     row.SetField("refer", entity.refer);
     row.SetField("saleswhse", entity.saleswhse);
     row.SetField("fulfillmentordty", entity.fulfillmentordty);
     row.SetField("fulfillmenttiedty", entity.fulfillmenttiedty);
     row.SetField("lspinvregstatus", entity.lspinvregstatus);
     row.SetField("userfield", entity.userfield);
 }