Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeeclines(ref DataRow row, Oeeclines entity)
 {
     row.SetField("lineno", entity.lineno);
     row.SetField("commentfl", entity.commentfl);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("prodnotes", entity.prodnotes);
     row.SetField("commtype", entity.commtype);
     row.SetField("commcost", entity.commcost);
     row.SetField("commmanfl", entity.commmanfl);
     row.SetField("slsrepout", entity.slsrepout);
     row.SetField("commamtout", entity.commamtout);
     row.SetField("commpaidfl", entity.commpaidfl);
     row.SetField("slsrepin", entity.slsrepin);
     row.SetField("commamtin", entity.commamtin);
     row.SetField("commpaidinfl", entity.commpaidinfl);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("transtype", entity.transtype);
     row.SetField("returntxt", entity.returntxt);
     row.SetField("custno", entity.custno);
     row.SetField("vendrebamt", entity.vendrebamt);
     row.SetField("postrebcst", entity.postrebcst);
     row.SetField("costper", entity.costper);
     row.SetField("commpaiddesc", entity.commpaiddesc);
     row.SetField("commpaidindesc", entity.commpaidindesc);
     row.SetField("custname", entity.custname);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Oeeclines BuildOeeclinesFromRow(DataRow row)
        {
            Oeeclines entity = new Oeeclines();

            entity.lineno         = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.commentfl      = row.Field <bool>("commentfl");
            entity.shipprod       = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.prodnotes      = row.IsNull("prodnotes") ? string.Empty : row.Field <string>("prodnotes");
            entity.commtype       = row.IsNull("commtype") ? string.Empty : row.Field <string>("commtype");
            entity.commcost       = row.IsNull("commcost") ? decimal.Zero : row.Field <decimal>("commcost");
            entity.commmanfl      = row.Field <bool>("commmanfl");
            entity.slsrepout      = row.IsNull("slsrepout") ? string.Empty : row.Field <string>("slsrepout");
            entity.commamtout     = row.IsNull("commamtout") ? decimal.Zero : row.Field <decimal>("commamtout");
            entity.commpaidfl     = row.Field <bool>("commpaidfl");
            entity.slsrepin       = row.IsNull("slsrepin") ? string.Empty : row.Field <string>("slsrepin");
            entity.commamtin      = row.IsNull("commamtin") ? decimal.Zero : row.Field <decimal>("commamtin");
            entity.commpaidinfl   = row.Field <bool>("commpaidinfl");
            entity.orderno        = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf       = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.transtype      = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.returntxt      = row.IsNull("returntxt") ? string.Empty : row.Field <string>("returntxt");
            entity.custno         = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.vendrebamt     = row.IsNull("vendrebamt") ? decimal.Zero : row.Field <decimal>("vendrebamt");
            entity.postrebcst     = row.IsNull("postrebcst") ? decimal.Zero : row.Field <decimal>("postrebcst");
            entity.costper        = row.IsNull("costper") ? string.Empty : row.Field <string>("costper");
            entity.commpaiddesc   = row.IsNull("commpaiddesc") ? string.Empty : row.Field <string>("commpaiddesc");
            entity.commpaidindesc = row.IsNull("commpaidindesc") ? string.Empty : row.Field <string>("commpaidindesc");
            entity.custname       = row.IsNull("custname") ? string.Empty : row.Field <string>("custname");
            entity.proddesc       = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }