Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcipfetchpricingresults(ref DataRow row, Icipfetchpricingresults entity)
 {
     row.SetField("prodstat", entity.prodstat);
     row.SetField("col1label", entity.col1label);
     row.SetField("col2label", entity.col2label);
     row.SetField("col3label", entity.col3label);
     row.SetField("col4label", entity.col4label);
     row.SetField("col5label", entity.col5label);
     row.SetField("startdt", entity.startdt);
     row.SetField("pricepct1", entity.pricepct1);
     row.SetField("priceamt1", entity.priceamt1);
     row.SetField("discpct1", entity.discpct1);
     row.SetField("net1", entity.net1);
     row.SetField("qtybrk1", entity.qtybrk1);
     row.SetField("enddt", entity.enddt);
     row.SetField("pricepct2", entity.pricepct2);
     row.SetField("priceamt2", entity.priceamt2);
     row.SetField("discpct2", entity.discpct2);
     row.SetField("net2", entity.net2);
     row.SetField("qtybrk2", entity.qtybrk2);
     row.SetField("minqty", entity.minqty);
     row.SetField("pricepct3", entity.pricepct3);
     row.SetField("priceamt3", entity.priceamt3);
     row.SetField("discpct3", entity.discpct3);
     row.SetField("net3", entity.net3);
     row.SetField("qtybrk3", entity.qtybrk3);
     row.SetField("pricepct4", entity.pricepct4);
     row.SetField("priceamt4", entity.priceamt4);
     row.SetField("discpct4", entity.discpct4);
     row.SetField("net4", entity.net4);
     row.SetField("qtybrk4", entity.qtybrk4);
     row.SetField("pricepct5", entity.pricepct5);
     row.SetField("priceamt5", entity.priceamt5);
     row.SetField("discpct5", entity.discpct5);
     row.SetField("net5", entity.net5);
     row.SetField("qtybrk5", entity.qtybrk5);
     row.SetField("pdrecno", entity.pdrecno);
     row.SetField("commtype", entity.commtype);
     row.SetField("pricepct6", entity.pricepct6);
     row.SetField("priceamt6", entity.priceamt6);
     row.SetField("discpct6", entity.discpct6);
     row.SetField("net6", entity.net6);
     row.SetField("qtybrk6", entity.qtybrk6);
     row.SetField("pricetype", entity.pricetype);
     row.SetField("pricepct7", entity.pricepct7);
     row.SetField("priceamt7", entity.priceamt7);
     row.SetField("discpct7", entity.discpct7);
     row.SetField("net7", entity.net7);
     row.SetField("qtybrk7", entity.qtybrk7);
     row.SetField("pricepct8", entity.pricepct8);
     row.SetField("priceamt8", entity.priceamt8);
     row.SetField("discpct8", entity.discpct8);
     row.SetField("net8", entity.net8);
     row.SetField("qtybrk8", entity.qtybrk8);
     row.SetField("listprice", entity.listprice);
     row.SetField("pricepct9", entity.pricepct9);
     row.SetField("priceamt9", entity.priceamt9);
     row.SetField("discpct9", entity.discpct9);
     row.SetField("net9", entity.net9);
     row.SetField("baseprice", entity.baseprice);
     row.SetField("qtybreakmsg", entity.qtybreakmsg);
     row.SetField("pricingcost", entity.pricingcost);
     row.SetField("costtxt", entity.costtxt);
     row.SetField("reference", entity.reference);
     row.SetField("rebatemsg", entity.rebatemsg);
     row.SetField("pricemsg", entity.pricemsg);
     row.SetField("methodmsg", entity.methodmsg);
     row.SetField("btnpricesheethidden", entity.btnpricesheethidden);
     row.SetField("unit", entity.unit);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Icipfetchpricingresults BuildIcipfetchpricingresultsFromRow(DataRow row)
        {
            Icipfetchpricingresults entity = new Icipfetchpricingresults();

            entity.prodstat            = row.IsNull("prodstat") ? string.Empty : row.Field <string>("prodstat");
            entity.col1label           = row.IsNull("col1label") ? string.Empty : row.Field <string>("col1label");
            entity.col2label           = row.IsNull("col2label") ? string.Empty : row.Field <string>("col2label");
            entity.col3label           = row.IsNull("col3label") ? string.Empty : row.Field <string>("col3label");
            entity.col4label           = row.IsNull("col4label") ? string.Empty : row.Field <string>("col4label");
            entity.col5label           = row.IsNull("col5label") ? string.Empty : row.Field <string>("col5label");
            entity.startdt             = row.Field <DateTime?>("startdt");
            entity.pricepct1           = row.IsNull("pricepct1") ? decimal.Zero : row.Field <decimal>("pricepct1");
            entity.priceamt1           = row.IsNull("priceamt1") ? decimal.Zero : row.Field <decimal>("priceamt1");
            entity.discpct1            = row.IsNull("discpct1") ? decimal.Zero : row.Field <decimal>("discpct1");
            entity.net1                = row.IsNull("net1") ? decimal.Zero : row.Field <decimal>("net1");
            entity.qtybrk1             = row.IsNull("qtybrk1") ? decimal.Zero : row.Field <decimal>("qtybrk1");
            entity.enddt               = row.Field <DateTime?>("enddt");
            entity.pricepct2           = row.IsNull("pricepct2") ? decimal.Zero : row.Field <decimal>("pricepct2");
            entity.priceamt2           = row.IsNull("priceamt2") ? decimal.Zero : row.Field <decimal>("priceamt2");
            entity.discpct2            = row.IsNull("discpct2") ? decimal.Zero : row.Field <decimal>("discpct2");
            entity.net2                = row.IsNull("net2") ? decimal.Zero : row.Field <decimal>("net2");
            entity.qtybrk2             = row.IsNull("qtybrk2") ? decimal.Zero : row.Field <decimal>("qtybrk2");
            entity.minqty              = row.IsNull("minqty") ? decimal.Zero : row.Field <decimal>("minqty");
            entity.pricepct3           = row.IsNull("pricepct3") ? decimal.Zero : row.Field <decimal>("pricepct3");
            entity.priceamt3           = row.IsNull("priceamt3") ? decimal.Zero : row.Field <decimal>("priceamt3");
            entity.discpct3            = row.IsNull("discpct3") ? decimal.Zero : row.Field <decimal>("discpct3");
            entity.net3                = row.IsNull("net3") ? decimal.Zero : row.Field <decimal>("net3");
            entity.qtybrk3             = row.IsNull("qtybrk3") ? decimal.Zero : row.Field <decimal>("qtybrk3");
            entity.pricepct4           = row.IsNull("pricepct4") ? decimal.Zero : row.Field <decimal>("pricepct4");
            entity.priceamt4           = row.IsNull("priceamt4") ? decimal.Zero : row.Field <decimal>("priceamt4");
            entity.discpct4            = row.IsNull("discpct4") ? decimal.Zero : row.Field <decimal>("discpct4");
            entity.net4                = row.IsNull("net4") ? decimal.Zero : row.Field <decimal>("net4");
            entity.qtybrk4             = row.IsNull("qtybrk4") ? decimal.Zero : row.Field <decimal>("qtybrk4");
            entity.pricepct5           = row.IsNull("pricepct5") ? decimal.Zero : row.Field <decimal>("pricepct5");
            entity.priceamt5           = row.IsNull("priceamt5") ? decimal.Zero : row.Field <decimal>("priceamt5");
            entity.discpct5            = row.IsNull("discpct5") ? decimal.Zero : row.Field <decimal>("discpct5");
            entity.net5                = row.IsNull("net5") ? decimal.Zero : row.Field <decimal>("net5");
            entity.qtybrk5             = row.IsNull("qtybrk5") ? decimal.Zero : row.Field <decimal>("qtybrk5");
            entity.pdrecno             = row.IsNull("pdrecno") ? 0 : row.Field <int>("pdrecno");
            entity.commtype            = row.IsNull("commtype") ? string.Empty : row.Field <string>("commtype");
            entity.pricepct6           = row.IsNull("pricepct6") ? decimal.Zero : row.Field <decimal>("pricepct6");
            entity.priceamt6           = row.IsNull("priceamt6") ? decimal.Zero : row.Field <decimal>("priceamt6");
            entity.discpct6            = row.IsNull("discpct6") ? decimal.Zero : row.Field <decimal>("discpct6");
            entity.net6                = row.IsNull("net6") ? decimal.Zero : row.Field <decimal>("net6");
            entity.qtybrk6             = row.IsNull("qtybrk6") ? decimal.Zero : row.Field <decimal>("qtybrk6");
            entity.pricetype           = row.IsNull("pricetype") ? string.Empty : row.Field <string>("pricetype");
            entity.pricepct7           = row.IsNull("pricepct7") ? decimal.Zero : row.Field <decimal>("pricepct7");
            entity.priceamt7           = row.IsNull("priceamt7") ? decimal.Zero : row.Field <decimal>("priceamt7");
            entity.discpct7            = row.IsNull("discpct7") ? decimal.Zero : row.Field <decimal>("discpct7");
            entity.net7                = row.IsNull("net7") ? decimal.Zero : row.Field <decimal>("net7");
            entity.qtybrk7             = row.IsNull("qtybrk7") ? decimal.Zero : row.Field <decimal>("qtybrk7");
            entity.pricepct8           = row.IsNull("pricepct8") ? decimal.Zero : row.Field <decimal>("pricepct8");
            entity.priceamt8           = row.IsNull("priceamt8") ? decimal.Zero : row.Field <decimal>("priceamt8");
            entity.discpct8            = row.IsNull("discpct8") ? decimal.Zero : row.Field <decimal>("discpct8");
            entity.net8                = row.IsNull("net8") ? decimal.Zero : row.Field <decimal>("net8");
            entity.qtybrk8             = row.IsNull("qtybrk8") ? decimal.Zero : row.Field <decimal>("qtybrk8");
            entity.listprice           = row.IsNull("listprice") ? decimal.Zero : row.Field <decimal>("listprice");
            entity.pricepct9           = row.IsNull("pricepct9") ? decimal.Zero : row.Field <decimal>("pricepct9");
            entity.priceamt9           = row.IsNull("priceamt9") ? decimal.Zero : row.Field <decimal>("priceamt9");
            entity.discpct9            = row.IsNull("discpct9") ? decimal.Zero : row.Field <decimal>("discpct9");
            entity.net9                = row.IsNull("net9") ? decimal.Zero : row.Field <decimal>("net9");
            entity.baseprice           = row.IsNull("baseprice") ? decimal.Zero : row.Field <decimal>("baseprice");
            entity.qtybreakmsg         = row.IsNull("qtybreakmsg") ? string.Empty : row.Field <string>("qtybreakmsg");
            entity.pricingcost         = row.IsNull("pricingcost") ? decimal.Zero : row.Field <decimal>("pricingcost");
            entity.costtxt             = row.IsNull("costtxt") ? string.Empty : row.Field <string>("costtxt");
            entity.reference           = row.IsNull("reference") ? string.Empty : row.Field <string>("reference");
            entity.rebatemsg           = row.IsNull("rebatemsg") ? string.Empty : row.Field <string>("rebatemsg");
            entity.pricemsg            = row.IsNull("pricemsg") ? string.Empty : row.Field <string>("pricemsg");
            entity.methodmsg           = row.IsNull("methodmsg") ? string.Empty : row.Field <string>("methodmsg");
            entity.btnpricesheethidden = row.Field <bool>("btnpricesheethidden");
            entity.unit                = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.userfield           = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }