Ejemplo n.º 1
0
        public static Icentryserialscriteria BuildIcentryserialscriteriaFromRow(DataRow row)
        {
            Icentryserialscriteria entity = new Icentryserialscriteria();

            entity.whse              = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prod              = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.type              = row.IsNull("type") ? string.Empty : row.Field <string>("type");
            entity.orderno           = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf          = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.lineno            = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.linenochar        = row.IsNull("linenochar") ? string.Empty : row.Field <string>("linenochar");
            entity.seqno             = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.seqnochar         = row.IsNull("seqnochar") ? string.Empty : row.Field <string>("seqnochar");
            entity.inquiryfl         = row.Field <bool>("inquiryfl");
            entity.actionty          = row.IsNull("actionty") ? string.Empty : row.Field <string>("actionty");
            entity.returnfl          = row.Field <bool>("returnfl");
            entity.origqty           = row.IsNull("origqty") ? decimal.Zero : row.Field <decimal>("origqty");
            entity.proofqty          = row.IsNull("proofqty") ? decimal.Zero : row.Field <decimal>("proofqty");
            entity.ordqty            = row.IsNull("ordqty") ? decimal.Zero : row.Field <decimal>("ordqty");
            entity.outqty            = row.IsNull("outqty") ? decimal.Zero : row.Field <decimal>("outqty");
            entity.ictype            = row.IsNull("ictype") ? string.Empty : row.Field <string>("ictype");
            entity.cost              = row.IsNull("cost") ? decimal.Zero : row.Field <decimal>("cost");
            entity.qtyunavail        = row.IsNull("qtyunavail") ? decimal.Zero : row.Field <decimal>("qtyunavail");
            entity.method            = row.IsNull("method") ? string.Empty : row.Field <string>("method");
            entity.retorderno        = row.IsNull("retorderno") ? 0 : row.Field <int>("retorderno");
            entity.retordersuf       = row.IsNull("retordersuf") ? 0 : row.Field <int>("retordersuf");
            entity.retlineno         = row.IsNull("retlineno") ? 0 : row.Field <int>("retlineno");
            entity.returnty          = row.IsNull("returnty") ? string.Empty : row.Field <string>("returnty");
            entity.reasunavty        = row.IsNull("reasunavty") ? string.Empty : row.Field <string>("reasunavty");
            entity.custno            = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto            = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.vendno            = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.wono              = row.IsNull("wono") ? 0 : row.Field <int>("wono");
            entity.wosuf             = row.IsNull("wosuf") ? 0 : row.Field <int>("wosuf");
            entity.cono2             = row.IsNull("cono2") ? 0 : row.Field <int>("cono2");
            entity.shipfmwhse        = row.IsNull("shipfmwhse") ? string.Empty : row.Field <string>("shipfmwhse");
            entity.shiptowhse        = row.IsNull("shiptowhse") ? string.Empty : row.Field <string>("shiptowhse");
            entity.jrnlno            = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.postdt            = row.Field <DateTime?>("postdt");
            entity.ourproc           = row.IsNull("ourproc") ? string.Empty : row.Field <string>("ourproc");
            entity.icspecrecno       = row.IsNull("icspecrecno") ? 0 : row.Field <int>("icspecrecno");
            entity.assignoldest      = row.Field <bool>("assignoldest");
            entity.currproc          = row.IsNull("currproc") ? string.Empty : row.Field <string>("currproc");
            entity.seqdash           = row.IsNull("seqdash") ? string.Empty : row.Field <string>("seqdash");
            entity.rettext           = row.IsNull("rettext") ? string.Empty : row.Field <string>("rettext");
            entity.kplabel           = row.IsNull("kplabel") ? string.Empty : row.Field <string>("kplabel");
            entity.wonosuf           = row.IsNull("wonosuf") ? string.Empty : row.Field <string>("wonosuf");
            entity.origqtylabel      = row.IsNull("origqtylabel") ? string.Empty : row.Field <string>("origqtylabel");
            entity.proddesc          = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.prodnotesfl       = row.IsNull("prodnotesfl") ? string.Empty : row.Field <string>("prodnotesfl");
            entity.frametitle        = row.IsNull("frametitle") ? string.Empty : row.Field <string>("frametitle");
            entity.btnoldesthidden   = row.Field <bool>("btnoldesthidden");
            entity.btnoldestenabled  = row.Field <bool>("btnoldestenabled");
            entity.btncreateenabled  = row.Field <bool>("btncreateenabled");
            entity.selectfieldhidden = row.Field <bool>("selectfieldhidden");
            entity.apeiRowid         = row.Field <byte[]>("apei-rowid").ToStringEncoded();
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcentryserialscriteria(ref DataRow row, Icentryserialscriteria entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("prod", entity.prod);
     row.SetField("type", entity.type);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("linenochar", entity.linenochar);
     row.SetField("seqno", entity.seqno);
     row.SetField("seqnochar", entity.seqnochar);
     row.SetField("inquiryfl", entity.inquiryfl);
     row.SetField("actionty", entity.actionty);
     row.SetField("returnfl", entity.returnfl);
     row.SetField("origqty", entity.origqty);
     row.SetField("proofqty", entity.proofqty);
     row.SetField("ordqty", entity.ordqty);
     row.SetField("outqty", entity.outqty);
     row.SetField("ictype", entity.ictype);
     row.SetField("cost", entity.cost);
     row.SetField("qtyunavail", entity.qtyunavail);
     row.SetField("method", entity.method);
     row.SetField("retorderno", entity.retorderno);
     row.SetField("retordersuf", entity.retordersuf);
     row.SetField("retlineno", entity.retlineno);
     row.SetField("returnty", entity.returnty);
     row.SetField("reasunavty", entity.reasunavty);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("vendno", entity.vendno);
     row.SetField("wono", entity.wono);
     row.SetField("wosuf", entity.wosuf);
     row.SetField("cono2", entity.cono2);
     row.SetField("shipfmwhse", entity.shipfmwhse);
     row.SetField("shiptowhse", entity.shiptowhse);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("postdt", entity.postdt);
     row.SetField("ourproc", entity.ourproc);
     row.SetField("icspecrecno", entity.icspecrecno);
     row.SetField("assignoldest", entity.assignoldest);
     row.SetField("currproc", entity.currproc);
     row.SetField("seqdash", entity.seqdash);
     row.SetField("rettext", entity.rettext);
     row.SetField("kplabel", entity.kplabel);
     row.SetField("wonosuf", entity.wonosuf);
     row.SetField("origqtylabel", entity.origqtylabel);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("prodnotesfl", entity.prodnotesfl);
     row.SetField("frametitle", entity.frametitle);
     row.SetField("btnoldesthidden", entity.btnoldesthidden);
     row.SetField("btnoldestenabled", entity.btnoldestenabled);
     row.SetField("btncreateenabled", entity.btncreateenabled);
     row.SetField("selectfieldhidden", entity.selectfieldhidden);
     row.SetField("apei-rowid", entity.apeiRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }