private void ChangeWaybill(object sender, EventArgs e) { IUnitOfWork uow = Scout.Core.Data.GetUnitOfWork(); string waybill = ""; UserInputView inputView = new UserInputView((s) => waybill = s, "Enter waybill", true) { ShowCancelButton = true }; DialogResult result = inputView.ShowDialog(); if (result == DialogResult.OK) { foreach (Packlist p in GetSelectedPacklists(uow)) { p.Waybill = waybill; } uow.Commit(); m_searchForm.RunSearch(); } }
private void ChangeScrapControlNumber(object sender, EventArgs e) { IUnitOfWork uow = Scout.Core.Data.GetUnitOfWork(); string scrapControlNumber = ""; UserInputView inputView = new UserInputView((s) => scrapControlNumber = s, "Enter Scrap Control Number", true) { ShowCancelButton = true }; DialogResult result = inputView.ShowDialog(); if (result == DialogResult.OK) { foreach (Packlist p in GetSelectedPacklists(uow)) { p.XipControlNumber = scrapControlNumber; } uow.Commit(); m_searchForm.RunSearch(); } }
public override void Execute() { UserInputView view = new UserInputView(InputCallBack, m_inputMessage, m_required); view.StartPosition = FormStartPosition.CenterParent; view.ShowDialog(); }
public string Read() { string text = string.Empty; UserInputView userInputView = new UserInputView(); userInputView.ShowDialog(); if (userInputView.DialogResult == true) { return(userInputView.UserInputTexts); } return(text); }
private void enterWaybillButton_Click(object sender, EventArgs e) { if (Session.CurrentPacklist == null) { return; } UserInputView inputView = new UserInputView(s => Session.CurrentPacklist.Waybill = s, "Enter waybill", false); inputView.ShowDialog(this); Session_PacklistChanged(Session.CurrentPacklist); Scout.Core.Data.Save(Session.UnitOfWork); }