示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOebundleslookupresults(ref DataRow row, Oebundleslookupresults entity)
 {
     row.SetField("bundleid", entity.bundleid);
     row.SetField("dispbundleid", entity.dispbundleid);
     row.SetField("totbf", entity.totbf);
     row.SetField("totlf", entity.totlf);
     row.SetField("qty1", entity.qty1);
     row.SetField("qty2", entity.qty2);
     row.SetField("qty3", entity.qty3);
     row.SetField("qty4", entity.qty4);
     row.SetField("qty5", entity.qty5);
     row.SetField("qty6", entity.qty6);
     row.SetField("qty7", entity.qty7);
     row.SetField("qty8", entity.qty8);
     row.SetField("qty9", entity.qty9);
     row.SetField("qty10", entity.qty10);
     row.SetField("qty11", entity.qty11);
     row.SetField("qty12", entity.qty12);
     row.SetField("qty13", entity.qty13);
     row.SetField("qty14", entity.qty14);
     row.SetField("qty15", entity.qty15);
     row.SetField("qty16", entity.qty16);
     row.SetField("qty17", entity.qty17);
     row.SetField("qty18", entity.qty18);
     row.SetField("qty19", entity.qty19);
     row.SetField("qty20", entity.qty20);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Oebundleslookupresults BuildOebundleslookupresultsFromRow(DataRow row)
        {
            Oebundleslookupresults entity = new Oebundleslookupresults();

            entity.bundleid     = row.IsNull("bundleid") ? string.Empty : row.Field <string>("bundleid");
            entity.dispbundleid = row.IsNull("dispbundleid") ? string.Empty : row.Field <string>("dispbundleid");
            entity.totbf        = row.IsNull("totbf") ? decimal.Zero : row.Field <decimal>("totbf");
            entity.totlf        = row.IsNull("totlf") ? decimal.Zero : row.Field <decimal>("totlf");
            entity.qty1         = row.IsNull("qty1") ? decimal.Zero : row.Field <decimal>("qty1");
            entity.qty2         = row.IsNull("qty2") ? decimal.Zero : row.Field <decimal>("qty2");
            entity.qty3         = row.IsNull("qty3") ? decimal.Zero : row.Field <decimal>("qty3");
            entity.qty4         = row.IsNull("qty4") ? decimal.Zero : row.Field <decimal>("qty4");
            entity.qty5         = row.IsNull("qty5") ? decimal.Zero : row.Field <decimal>("qty5");
            entity.qty6         = row.IsNull("qty6") ? decimal.Zero : row.Field <decimal>("qty6");
            entity.qty7         = row.IsNull("qty7") ? decimal.Zero : row.Field <decimal>("qty7");
            entity.qty8         = row.IsNull("qty8") ? decimal.Zero : row.Field <decimal>("qty8");
            entity.qty9         = row.IsNull("qty9") ? decimal.Zero : row.Field <decimal>("qty9");
            entity.qty10        = row.IsNull("qty10") ? decimal.Zero : row.Field <decimal>("qty10");
            entity.qty11        = row.IsNull("qty11") ? decimal.Zero : row.Field <decimal>("qty11");
            entity.qty12        = row.IsNull("qty12") ? decimal.Zero : row.Field <decimal>("qty12");
            entity.qty13        = row.IsNull("qty13") ? decimal.Zero : row.Field <decimal>("qty13");
            entity.qty14        = row.IsNull("qty14") ? decimal.Zero : row.Field <decimal>("qty14");
            entity.qty15        = row.IsNull("qty15") ? decimal.Zero : row.Field <decimal>("qty15");
            entity.qty16        = row.IsNull("qty16") ? decimal.Zero : row.Field <decimal>("qty16");
            entity.qty17        = row.IsNull("qty17") ? decimal.Zero : row.Field <decimal>("qty17");
            entity.qty18        = row.IsNull("qty18") ? decimal.Zero : row.Field <decimal>("qty18");
            entity.qty19        = row.IsNull("qty19") ? decimal.Zero : row.Field <decimal>("qty19");
            entity.qty20        = row.IsNull("qty20") ? decimal.Zero : row.Field <decimal>("qty20");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }