Example #1
0
        public static Crtimplcoresttcriteria BuildCrtimplcoresttcriteriaFromRow(DataRow row)
        {
            Crtimplcoresttcriteria entity = new Crtimplcoresttcriteria();

            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.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.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.coresselect       = row.IsNull("coresselect") ? string.Empty : row.Field <string>("coresselect");
            entity.coresmonths       = row.IsNull("coresmonths") ? 0 : row.Field <int>("coresmonths");
            entity.coreszerolines    = row.IsNull("coreszerolines") ? string.Empty : row.Field <string>("coreszerolines");
            entity.orderdisp         = row.IsNull("orderdisp") ? string.Empty : row.Field <string>("orderdisp");
            entity.wtbilled          = row.IsNull("wtbilled") ? string.Empty : row.Field <string>("wtbilled");
            entity.susponlyfl        = row.Field <bool>("susponlyfl");
            entity.approvty          = row.IsNull("approvty") ? string.Empty : row.Field <string>("approvty");
            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.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Example #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCrtimplcoresttcriteria(ref DataRow row, Crtimplcoresttcriteria entity)
 {
     row.SetField("irecordcountlimit", entity.irecordcountlimit);
     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("custpo", entity.custpo);
     row.SetField("stagelist", entity.stagelist);
     row.SetField("transtypelist", entity.transtypelist);
     row.SetField("botype", entity.botype);
     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("coresselect", entity.coresselect);
     row.SetField("coresmonths", entity.coresmonths);
     row.SetField("coreszerolines", entity.coreszerolines);
     row.SetField("orderdisp", entity.orderdisp);
     row.SetField("wtbilled", entity.wtbilled);
     row.SetField("susponlyfl", entity.susponlyfl);
     row.SetField("approvty", entity.approvty);
     row.SetField("refer", entity.refer);
     row.SetField("saleswhse", entity.saleswhse);
     row.SetField("fulfillmentordty", entity.fulfillmentordty);
     row.SetField("fulfillmenttiedty", entity.fulfillmenttiedty);
     row.SetField("userfield", entity.userfield);
 }