Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPricesheetinqresults(ref DataRow row, Pricesheetinqresults entity)
 {
     row.SetField("msg", entity.msg);
     row.SetField("pricesheet", entity.pricesheet);
     row.SetField("effectivedt", entity.effectivedt);
     row.SetField("baseprice", entity.baseprice);
     row.SetField("listprice", entity.listprice);
     row.SetField("replcost", entity.replcost);
     row.SetField("rebatecost", entity.rebatecost);
     row.SetField("stndcost", entity.stndcost);
     row.SetField("custmatrix1", entity.custmatrix1);
     row.SetField("custmatrix2", entity.custmatrix2);
     row.SetField("custmatrix3", entity.custmatrix3);
     row.SetField("custmatrix4", entity.custmatrix4);
     row.SetField("custmatrix5", entity.custmatrix5);
     row.SetField("custmatrix6", entity.custmatrix6);
     row.SetField("custmatrix7", entity.custmatrix7);
     row.SetField("custmatrix8", entity.custmatrix8);
     row.SetField("custmatrix9", entity.custmatrix9);
     row.SetField("vendmatrix1", entity.vendmatrix1);
     row.SetField("vendmatrix2", entity.vendmatrix2);
     row.SetField("vendmatrix3", entity.vendmatrix3);
     row.SetField("vendmatrix4", entity.vendmatrix4);
     row.SetField("vendmatrix5", entity.vendmatrix5);
     row.SetField("vendmatrix6", entity.vendmatrix6);
     row.SetField("vendmatrix7", entity.vendmatrix7);
     row.SetField("vendmatrix8", entity.vendmatrix8);
     row.SetField("vendmatrix9", entity.vendmatrix9);
     row.SetField("costper", entity.costper);
 }
Exemplo n.º 2
0
        public static Pricesheetinqresults BuildPricesheetinqresultsFromRow(DataRow row)
        {
            Pricesheetinqresults entity = new Pricesheetinqresults();

            entity.msg         = row.IsNull("msg") ? string.Empty : row.Field <string>("msg");
            entity.pricesheet  = row.IsNull("pricesheet") ? string.Empty : row.Field <string>("pricesheet");
            entity.effectivedt = row.Field <DateTime?>("effectivedt");
            entity.baseprice   = row.IsNull("baseprice") ? decimal.Zero : row.Field <decimal>("baseprice");
            entity.listprice   = row.IsNull("listprice") ? decimal.Zero : row.Field <decimal>("listprice");
            entity.replcost    = row.IsNull("replcost") ? decimal.Zero : row.Field <decimal>("replcost");
            entity.rebatecost  = row.IsNull("rebatecost") ? decimal.Zero : row.Field <decimal>("rebatecost");
            entity.stndcost    = row.IsNull("stndcost") ? decimal.Zero : row.Field <decimal>("stndcost");
            entity.custmatrix1 = row.IsNull("custmatrix1") ? decimal.Zero : row.Field <decimal>("custmatrix1");
            entity.custmatrix2 = row.IsNull("custmatrix2") ? decimal.Zero : row.Field <decimal>("custmatrix2");
            entity.custmatrix3 = row.IsNull("custmatrix3") ? decimal.Zero : row.Field <decimal>("custmatrix3");
            entity.custmatrix4 = row.IsNull("custmatrix4") ? decimal.Zero : row.Field <decimal>("custmatrix4");
            entity.custmatrix5 = row.IsNull("custmatrix5") ? decimal.Zero : row.Field <decimal>("custmatrix5");
            entity.custmatrix6 = row.IsNull("custmatrix6") ? decimal.Zero : row.Field <decimal>("custmatrix6");
            entity.custmatrix7 = row.IsNull("custmatrix7") ? decimal.Zero : row.Field <decimal>("custmatrix7");
            entity.custmatrix8 = row.IsNull("custmatrix8") ? decimal.Zero : row.Field <decimal>("custmatrix8");
            entity.custmatrix9 = row.IsNull("custmatrix9") ? decimal.Zero : row.Field <decimal>("custmatrix9");
            entity.vendmatrix1 = row.IsNull("vendmatrix1") ? decimal.Zero : row.Field <decimal>("vendmatrix1");
            entity.vendmatrix2 = row.IsNull("vendmatrix2") ? decimal.Zero : row.Field <decimal>("vendmatrix2");
            entity.vendmatrix3 = row.IsNull("vendmatrix3") ? decimal.Zero : row.Field <decimal>("vendmatrix3");
            entity.vendmatrix4 = row.IsNull("vendmatrix4") ? decimal.Zero : row.Field <decimal>("vendmatrix4");
            entity.vendmatrix5 = row.IsNull("vendmatrix5") ? decimal.Zero : row.Field <decimal>("vendmatrix5");
            entity.vendmatrix6 = row.IsNull("vendmatrix6") ? decimal.Zero : row.Field <decimal>("vendmatrix6");
            entity.vendmatrix7 = row.IsNull("vendmatrix7") ? decimal.Zero : row.Field <decimal>("vendmatrix7");
            entity.vendmatrix8 = row.IsNull("vendmatrix8") ? decimal.Zero : row.Field <decimal>("vendmatrix8");
            entity.vendmatrix9 = row.IsNull("vendmatrix9") ? decimal.Zero : row.Field <decimal>("vendmatrix9");
            entity.costper     = row.IsNull("costper") ? string.Empty : row.Field <string>("costper");
            return(entity);
        }