public PipelineUpdateFollowUpDatePageViewModel(SalesQuotationInquiry inquiry) { Inquiry = inquiry; FollowUpDate = inquiry.FollowUpDate.DateTime; CloseCommand = new AsyncDelegateCommand(OnClose); SaveCommand = new AsyncDelegateCommand(OnSave); }
public PipelineUpdateProbabilityPageViewModel(SalesQuotationInquiry inquiry) { Inquiry = inquiry; Probability = _inquiry.Probability; CloseCommand = new AsyncDelegateCommand(OnClose); SaveCommand = new AsyncDelegateCommand(OnSave); }
public PipelineUpdatePageViewModel(SalesQuotationInquiry inquiry) { Inquiry = inquiry.CloneJson(); FollowUpDate = _inquiry.FollowUpDate.DateTime; ExpiryDate = _inquiry.ExpiryDate?.DateTime; CloseCommand = new AsyncDelegateCommand(OnClose); SaveCommand = new AsyncDelegateCommand(OnSave); LeadTimeList = new ObservableCollection <KeyValuePair <QuotationUpdateQueryContextLeadTime, string> > { new KeyValuePair <QuotationUpdateQueryContextLeadTime, string>(QuotationUpdateQueryContextLeadTime.None, nameof(AppResources.None).Translate()), new KeyValuePair <QuotationUpdateQueryContextLeadTime, string>(QuotationUpdateQueryContextLeadTime.Month1, $"<1 {nameof(AppResources.Month).Translate()}"), new KeyValuePair <QuotationUpdateQueryContextLeadTime, string>(QuotationUpdateQueryContextLeadTime.Month3, $"<3 {nameof(AppResources.Months).Translate()}"), new KeyValuePair <QuotationUpdateQueryContextLeadTime, string>(QuotationUpdateQueryContextLeadTime.Month6, $"<6 {nameof(AppResources.Months).Translate()}"), new KeyValuePair <QuotationUpdateQueryContextLeadTime, string>(QuotationUpdateQueryContextLeadTime.Month9, $"<9 {nameof(AppResources.Months).Translate()}"), new KeyValuePair <QuotationUpdateQueryContextLeadTime, string>(QuotationUpdateQueryContextLeadTime.Month12, $"<12 {nameof(AppResources.Months).Translate()}"), new KeyValuePair <QuotationUpdateQueryContextLeadTime, string>(QuotationUpdateQueryContextLeadTime.Month24, $"<24 {nameof(AppResources.Months).Translate()}"), new KeyValuePair <QuotationUpdateQueryContextLeadTime, string>(QuotationUpdateQueryContextLeadTime.MonthMax, $">24 {nameof(AppResources.Months).Translate()}"), }; QuotationUpdateQueryContextLeadTime leadTime = QuotationUpdateQueryContextLeadTime.None; var leadTimeStr = inquiry.LeadTime.Split(' ')[0]; switch (leadTimeStr) { case var s when string.IsNullOrWhiteSpace(s): leadTime = QuotationUpdateQueryContextLeadTime.None; break; case "<1": leadTime = QuotationUpdateQueryContextLeadTime.Month1; break; case "<3": leadTime = QuotationUpdateQueryContextLeadTime.Month3; break; case "<6": leadTime = QuotationUpdateQueryContextLeadTime.Month6; break; case "<9": leadTime = QuotationUpdateQueryContextLeadTime.Month9; break; case "<12": leadTime = QuotationUpdateQueryContextLeadTime.Month12; break; case "<24": leadTime = QuotationUpdateQueryContextLeadTime.Month24; break; case ">24": leadTime = QuotationUpdateQueryContextLeadTime.MonthMax; break; } SelectedLeadTime = _leadTimeList.Single(p => p.Key == leadTime); }
public PipelineUpdateExpiryDatePageViewModel(SalesQuotationInquiry inquiry) { Inquiry = inquiry; CloseCommand = new AsyncDelegateCommand(OnClose); SaveCommand = new AsyncDelegateCommand(OnSave); if (inquiry.ExpiryDate.HasValue) { ExpiryDate = inquiry.ExpiryDate.Value.DateTime; } }
public PipelineDetailPageViewModel(SalesQuotationInquiry selectedInquiry) { Inquiry = selectedInquiry; ToggleHeaderFrameCommand = new Command <bool>(show => ShowHeaderFrame = show); ToggleActionsFrameCommand = new Command <bool>(show => ShowActionsFrame = show); AddNoteCommand = new AsyncDelegateCommand(OnAddNote); ViewNotesCommand = new AsyncDelegateCommand(OnViewNotes); LoseQuotationCommand = new AsyncDelegateCommand(OnLoseQuotation); UpdateCommand = new AsyncDelegateCommand(OnUpdate); UpdateFollowUpDateCommand = new AsyncDelegateCommand(OnUpdateFollowUpDate); UpdateLeadTimeCommand = new AsyncDelegateCommand(OnUpdateLeadTime); UpdateProbabilityCommand = new AsyncDelegateCommand(OnUpdateProbability); UpdateExpiryDateCommand = new AsyncDelegateCommand(OnUpdateExpiryDate); ViewPdfCommand = new AsyncDelegateCommand(OnViewPdf); DownloadPdfCommand = new AsyncDelegateCommand(OnDownloadPdf); }
public PipelineDetailPage(SalesQuotationInquiry selectedInquiry) { InitializeComponent(); BindingContext = _vm = new PipelineDetailPageViewModel(selectedInquiry); }
public PipelineLoseQuotationPageViewModel(SalesQuotationInquiry inquiry) { Inquiry = inquiry; CloseCommand = new AsyncDelegateCommand(OnClose); SaveCommand = new AsyncDelegateCommand(OnSave); }
public PipelineLoseQuotationPage(SalesQuotationInquiry inquiry) { InitializeComponent(); BindingContext = _vm = new PipelineLoseQuotationPageViewModel(inquiry); }
public PipelineUpdateFollowUpDatePage(SalesQuotationInquiry inquiry) { InitializeComponent(); BindingContext = _vm = new PipelineUpdateFollowUpDatePageViewModel(inquiry); }
public PipelineViewNotesPageViewModel(SalesQuotationInquiry inquiry) { _inquiry = inquiry; CloseCommand = new AsyncDelegateCommand(OnClose); Title = $"{nameof(AppResources.NotesFor).Translate()} {_inquiry.QuotationId}"; }