Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCoreserialscriteria(ref DataRow row, Coreserialscriteria entity)
 {
     row.SetField("cOurProc", entity.cOurProc);
     row.SetField("cType", entity.cType);
     row.SetField("iOrderno", entity.iOrderno);
     row.SetField("iOrdersuf", entity.iOrdersuf);
     row.SetField("iLineno", entity.iLineno);
     row.SetField("cProd", entity.cProd);
     row.SetField("dQty", entity.dQty);
     row.SetField("cWhse", entity.cWhse);
     row.SetField("iReporderno", entity.iReporderno);
     row.SetField("iRepordersuf", entity.iRepordersuf);
     row.SetField("iReplineno", entity.iReplineno);
     row.SetField("dCustno", entity.dCustno);
     row.SetField("dPrice", entity.dPrice);
     row.SetField("dProdcost", entity.dProdcost);
     row.SetField("iRetorderno", entity.iRetorderno);
     row.SetField("iRetordersuf", entity.iRetordersuf);
     row.SetField("iRetlineno", entity.iRetlineno);
     row.SetField("warrantycore", entity.warrantycore);
     row.SetField("vendclaimno", entity.vendclaimno);
     row.SetField("proof", entity.proof);
     row.SetField("cCustomParam", entity.cCustomParam);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Coreserialscriteria BuildCoreserialscriteriaFromRow(DataRow row)
        {
            Coreserialscriteria entity = new Coreserialscriteria();

            entity.cOurProc     = row.IsNull("cOurProc") ? string.Empty : row.Field <string>("cOurProc");
            entity.cType        = row.IsNull("cType") ? string.Empty : row.Field <string>("cType");
            entity.iOrderno     = row.IsNull("iOrderno") ? 0 : row.Field <int>("iOrderno");
            entity.iOrdersuf    = row.IsNull("iOrdersuf") ? 0 : row.Field <int>("iOrdersuf");
            entity.iLineno      = row.IsNull("iLineno") ? 0 : row.Field <int>("iLineno");
            entity.cProd        = row.IsNull("cProd") ? string.Empty : row.Field <string>("cProd");
            entity.dQty         = row.IsNull("dQty") ? decimal.Zero : row.Field <decimal>("dQty");
            entity.cWhse        = row.IsNull("cWhse") ? string.Empty : row.Field <string>("cWhse");
            entity.iReporderno  = row.IsNull("iReporderno") ? 0 : row.Field <int>("iReporderno");
            entity.iRepordersuf = row.IsNull("iRepordersuf") ? 0 : row.Field <int>("iRepordersuf");
            entity.iReplineno   = row.IsNull("iReplineno") ? 0 : row.Field <int>("iReplineno");
            entity.dCustno      = row.IsNull("dCustno") ? decimal.Zero : row.Field <decimal>("dCustno");
            entity.dPrice       = row.IsNull("dPrice") ? decimal.Zero : row.Field <decimal>("dPrice");
            entity.dProdcost    = row.IsNull("dProdcost") ? decimal.Zero : row.Field <decimal>("dProdcost");
            entity.iRetorderno  = row.IsNull("iRetorderno") ? 0 : row.Field <int>("iRetorderno");
            entity.iRetordersuf = row.IsNull("iRetordersuf") ? 0 : row.Field <int>("iRetordersuf");
            entity.iRetlineno   = row.IsNull("iRetlineno") ? 0 : row.Field <int>("iRetlineno");
            entity.warrantycore = row.Field <bool>("warrantycore");
            entity.vendclaimno  = row.IsNull("vendclaimno") ? string.Empty : row.Field <string>("vendclaimno");
            entity.proof        = row.IsNull("proof") ? decimal.Zero : row.Field <decimal>("proof");
            entity.cCustomParam = row.IsNull("cCustomParam") ? string.Empty : row.Field <string>("cCustomParam");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }