Пример #1
0
        public void MyClick(ref ChooseItem item)
        {
            switch (this._kind)
            {
            case Helper.CompanyKind.Supplier:
                ChooseSupplier f = new ChooseSupplier();
                if (f.ShowDialog() == DialogResult.OK)
                {
                    //Model.Company emp1 = f.SelectedItem as Model.Company;
                    //item = new ChooseItem(emp1, emp1.CompanyId, emp1.CompanyName0);
                }
                break;

            case Helper.CompanyKind.Customer:
                ChooseCustoms f1 = new ChooseCustoms();
                if (f1.ShowDialog() == DialogResult.OK)
                {
                    //Model.Company emp = f1.SelectedItem as Model.Company;
                    //item = new ChooseItem(emp, emp.CompanyId, emp.CompanyName0);
                }
                break;

            default:
                break;
            }
        }
Пример #2
0
        //private void buttonEditMPSIdstart_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        //{
        //    produceManager.MPSheader.ChooseMPSheaderForm f = new Book.UI.produceManager.MPSheader.ChooseMPSheaderForm();
        //    if (f.ShowDialog(this) == DialogResult.OK)
        //    {
        //        Model.MPSheader mPSheader = f.SelectedItem as Model.MPSheader;
        //        if (mPSheader != null)
        //        {
        //            this.buttonEditMPSIdstart.Text = mPSheader.Id;

        //        }
        //    }
        //}

        //private void buttonEditMPSIdend_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        //{
        //    produceManager.MPSheader.ChooseMPSheaderForm f = new Book.UI.produceManager.MPSheader.ChooseMPSheaderForm();
        //    if (f.ShowDialog(this) == DialogResult.OK)
        //    {
        //        Model.MPSheader mPSheader = f.SelectedItem as Model.MPSheader;
        //        if (mPSheader != null)
        //        {
        //            this.buttonEditMPSIdend.Text = mPSheader.Id;

        //        }
        //    }
        //}

        private void buttonEditCustomerStart_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            Invoices.ChooseCustoms f = new Book.UI.Invoices.ChooseCustoms();
            if (f.ShowDialog(this) == DialogResult.OK)
            {
                Model.Customer customer = f.SelectedItem as Model.Customer;
                if (customer != null)
                {
                    this.buttonEditCustomerStart.Text = customer.Id;

                }
            }
        }