public void AddGrnReceipt(GRNReciept grnReceipt)
        {
            if (m_GRNReceipts == null)
                m_GRNReceipts = new List<GRNReciept>();


            grnReceipt.PropertyChanged += grnReceipt_PropertyChanged;
            OnPropertyChanged("TotalQuantity"); //To Refresh UI
            m_GRNReceipts.Add(grnReceipt);
        }
        public KnittingJoViewModel(Order order, decimal quantity, GRNReciept reciept, bool jobOrderIssued, JobOrder parentJO)
        {
            this.Order = order;
            JO = new KnittingJO();
            JO.Order = order;
            JO.QuoteDate = order.OrderDate;
            JO.JoDate = DBResources.Instance.GetServerTime();
            JO.JobOrder = parentJO;
            JO.GRNReciept = reciept;

            JO.JoNoWrapper = "K" + (DBResources.Instance.Context.KnittingJOes.Count() + 1).ToString();
            JO.Add();
        }
        public DyeingJoViewModel(Order order, decimal quantity, PurchaseOrder po, string grnRefNo, GRNReciept reciept, bool jobOrderIssued, JobOrder parentJo)
        {
            this.Order = order;
            JO = new DyeingJO();
            JO.Order = order;
            JO.QuoteDate = order.OrderDate;
            JO.JODate = DBResources.Instance.GetServerTime();
            JO.PurchaseOrder = po;
            JO.GRNRefNo = grnRefNo;

            JO.GRNReciept = reciept;
            JO.JobOrder = parentJo;
            JO.JoNo = "D" + (DBResources.Instance.Context.DyeingJOes.Count() + 1).ToString();

            JO.Add();
        }
 public void AddItems(List<OrderedItem> items)
 {
     foreach (OrderedItem item in items)
     {
         GRNReciept newReceipt = new GRNReciept();
         newReceipt.AlreadyRecievedQuantity = item.GetRecievedQuantity();
         newReceipt.OrderedItem = item;
         newReceipt.InvoiceNumber = this.InvoiceNumber;
         newReceipt.InvoiceDate = this.InvoiceDate;
         newReceipt.RecievedDate = this.ReceivedDate;
         newReceipt.GRNIndex = this.GRNIndex;
         this.Receipts.Add(newReceipt);
         item.GRNReciepts.Add(newReceipt);
     }
 }
 public void CreateNewJo(Order order, decimal quantity, PurchaseOrder po, string grnRefNo, GRNReciept receipt, bool jobOrderIssued, JobOrder parentJo)
 {
     ViewModel = new DyeingJoViewModel(order, quantity, po, grnRefNo, receipt, jobOrderIssued,parentJo);
     //budgetVsActualControl.Initialize(receipt.OrderedItem, parentJo);
 }
 private void issueBtn_Click_1(object sender, RoutedEventArgs e)
 {
     Button btn = sender as Button;
     selectedGRNReciept = btn.Tag as GRNReciept;
     btn.ContextMenu.IsOpen = true;
 }
 public void CreateNewJo(Order order,decimal quantity,GRNReciept reciept, bool jobOrderIssued, JobOrder parentJo)
 {
     ViewModel = new KnittingJoViewModel(order, quantity, reciept, jobOrderIssued, parentJo);
     //budgetVsActualControl.Initialize(reciept.OrderedItem, parentJo);
 }
 public void CreateNewJo(Order order, decimal quantity, PurchaseOrder po, string grnRefNo, GRNReciept receipt, bool jobOrderIssued, JobOrder parentJo)
 {
     ViewModel = new CompactingJoViewModel(order, quantity, po, grnRefNo, receipt, jobOrderIssued, parentJo);
 }