public CompactingJoViewModel(Order order, decimal quantity, PurchaseOrder po, string grnRefNo, GRNReciept reciept, bool jobOrderIssued, JobOrder parentJo)
        {
            this.Order = order;
            JO = new CompactingJo();
            
            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 = "C" + (DBResources.Instance.Context.CompactingJoes.Count() + 1).ToString();

            JO.Add();
        }
 public CompactingJoGenerator(CompactingJo jo, JoGenericParameters parameters)
 {
     compactingJoControl = new Reports.CompactingJoControl();
     JO = jo;
     Parameters = parameters;
 }
 public void OpenExistingJo(CompactingJo jo)
 {
     ViewModel = new CompactingJoViewModel(jo);
 }
 public CompactingJoViewModel(CompactingJo jo)
 {
     JO = jo;
     this.Order = jo.Order;
 }