Ejemplo n.º 1
0
 /// <summary>
 /// Method to Save the Orders
 /// </summary>
 /// <param name="objBill"></param>
 /// <param name="orders"></param>
 /// <returns></returns>
 public int GenerateInvoice(BillMaster objBill, RowOrderMaster[] orders)
 {
     foreach (var Order in orders)
     {
         objContext.AddToRowOrderMasters(Order);
     }
     objContext.AddToBillMasters(objBill);
        int Res =  objContext.SaveChanges();
        if (Res > 0)
        {
        Res = 1;
        }
        return Res;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a new RowOrderMaster object.
 /// </summary>
 /// <param name="orderID">Initial value of the OrderID property.</param>
 /// <param name="dealerID">Initial value of the DealerID property.</param>
 /// <param name="productID">Initial value of the ProductID property.</param>
 /// <param name="quantity">Initial value of the Quantity property.</param>
 /// <param name="orderPrice">Initial value of the OrderPrice property.</param>
 public static RowOrderMaster CreateRowOrderMaster(global::System.Int32 orderID, global::System.Int32 dealerID, global::System.Int32 productID, global::System.Int32 quantity, global::System.Int32 orderPrice)
 {
     RowOrderMaster rowOrderMaster = new RowOrderMaster();
     rowOrderMaster.OrderID = orderID;
     rowOrderMaster.DealerID = dealerID;
     rowOrderMaster.ProductID = productID;
     rowOrderMaster.Quantity = quantity;
     rowOrderMaster.OrderPrice = orderPrice;
     return rowOrderMaster;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the RowOrderMasters EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToRowOrderMasters(RowOrderMaster rowOrderMaster)
 {
     base.AddObject("RowOrderMasters", rowOrderMaster);
 }