Ejemplo n.º 1
0
        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();
            }
        }
Ejemplo n.º 2
0
        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();
            }
        }
Ejemplo n.º 3
0
        public override void Execute()
        {
            UserInputView view =
                new UserInputView(InputCallBack, m_inputMessage, m_required);

            view.StartPosition = FormStartPosition.CenterParent;
            view.ShowDialog();
        }
Ejemplo n.º 4
0
        public string Read()
        {
            string text = string.Empty;

            UserInputView userInputView = new UserInputView();

            userInputView.ShowDialog();

            if (userInputView.DialogResult == true)
            {
                return(userInputView.UserInputTexts);
            }

            return(text);
        }
Ejemplo n.º 5
0
        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);
        }