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 DyeingJoViewModel(DyeingJO jo)
 {
     JO = jo;
     this.Order = jo.Order;
 }
 public void OpenExistingJo(DyeingJO jo)
 {
     ViewModel = new DyeingJoViewModel(jo);
     //budgetVsActualControl.Initialize(jo.JobOrder.GRNReciept.OrderedItem, jo.JobOrder);
 }
 public DyeingJOGenerator(DyeingJO jo, JoGenericParameters parameters)
 {
     dyeingJoControl = new Reports.DyeingJoControl();
     JO = jo;
     Parameters = parameters;
 }