private void InitilizeForNew() { Mode = ScreenOpenMode.New; CurrentSeller = new Seller(); _CurrentSeller.BusinessContact = new addon365.Database.Entity.Crm.BusinessContact(); _CurrentSeller.BusinessContact.ContactAddress = new addon365.Database.Entity.Crm.Address.Master(); }
public PurchaseViewModel(Purchase purchase) { GeneralInitilize(); CurrentPurchase = purchase; Items = new ObservableCollection <PurchaseItem>(purchase.Items); Mode = ScreenOpenMode.Edit; }
public EnquiryViewModel(string Identifier) { GeneralInitilize(); Enquiry eq = _repository.GetEnquiries(Identifier); CurrentEnquiry = eq; CurrentContact = eq.Contact; EnquiryItems = new ObservableCollection <EnquiryCatalogItem>(eq.EnquiryItems); CurrentFinanceQuotation = new EnquiryFinanceQuotation(); CurrentExchangeQuotation = new EnquiryExchangeQuotation(); CurrentFinanceEnquiryProduct = EnquiryItems.FirstOrDefault(); ExchangeQuotations = new ObservableCollection <EnquiryExchangeQuotation>(eq.EnquiryExchangeQuotations); CurrentExchangeQuotation = ExchangeQuotations.FirstOrDefault(); Mode = ScreenOpenMode.Edit; }
public EnquiryBookingViewModel(Enquiry enq) { CurrentEnquiry = enq; WireCommands(); _repository = Startup.Instance.provider.GetService <IBookingService>(); //_repository = new addon365.WebClient.Service.WebService.BookingService(); if (enq.Voucher == null) { CurrentAmount = new VoucherInfo(); } else { Mode = ScreenOpenMode.Edit; CurrentAmount = enq.Voucher.VoucherInfos.Where(x => x.FieldInfo == FieldInfo.CashAmount.ToString()).Single(); } }
public SellerViewModel(string Id) { GeneralInitilize(); CurrentSeller = _repository.Get(Id); Mode = ScreenOpenMode.Edit; }