Exemplo n.º 1
0
        public static Createoeallocttresults BuildCreateoeallocttresultsFromRow(DataRow row)
        {
            Createoeallocttresults entity = new Createoeallocttresults();

            entity.invoicefl = row.Field <bool>("invoicefl");
            entity.shipdt    = row.Field <DateTime?>("shipdt");
            entity.orderno   = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf  = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.lineno    = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.coreduedt = row.Field <DateTime?>("coreduedt");
            entity.qty       = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty");
            entity.qtyalloc  = row.IsNull("qtyalloc") ? decimal.Zero : row.Field <decimal>("qtyalloc");
            entity.oldalloc  = row.IsNull("oldalloc") ? decimal.Zero : row.Field <decimal>("oldalloc");
            entity.modifyfl  = row.Field <bool>("modifyfl");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prod      = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.custno    = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto    = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.pricetype = row.IsNull("pricetype") ? string.Empty : row.Field <string>("pricetype");
            entity.vendno    = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.custtype  = row.IsNull("custtype") ? string.Empty : row.Field <string>("custtype");
            entity.recno     = row.IsNull("recno") ? 0 : row.Field <int>("recno");
            entity.stagecd   = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            return(entity);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCreateoeallocttresults(ref DataRow row, Createoeallocttresults entity)
 {
     row.SetField("invoicefl", entity.invoicefl);
     row.SetField("shipdt", entity.shipdt);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("coreduedt", entity.coreduedt);
     row.SetField("qty", entity.qty);
     row.SetField("qtyalloc", entity.qtyalloc);
     row.SetField("oldalloc", entity.oldalloc);
     row.SetField("modifyfl", entity.modifyfl);
     row.SetField("whse", entity.whse);
     row.SetField("prod", entity.prod);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("pricetype", entity.pricetype);
     row.SetField("vendno", entity.vendno);
     row.SetField("custtype", entity.custtype);
     row.SetField("recno", entity.recno);
     row.SetField("stagecd", entity.stagecd);
 }