Esempio n. 1
0
        private void supplierToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmSupplier supplier = new FrmSupplier();

            supplier.GetUserID(TxtUserID.Text);
            supplier.ShowDialog();
        }
Esempio n. 2
0
        private void kháchHàngToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var frm = new FrmSupplier();

            frm.Show(this);
            this.Hide();
        }
Esempio n. 3
0
        private void Supplier_ItemClick(object sender, DevExpress.XtraEditors.TileItemEventArgs e)
        {
            FrmSupplier frmSupplier = new FrmSupplier();

            AddTab(frmSupplier);
            //FrmDemo objDemo =new FrmDemo();
            //AddTab(objDemo);
        }
Esempio n. 4
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (txtNamePart.ReadOnly)
            {
                return;
            }
            FrmSupplier frmSupplier = new FrmSupplier();

            AddTab(frmSupplier);
            isLoad = true;
        }
Esempio n. 5
0
        public void ShowCard(BOCard model)
        {
            if (model == null)
            {
                return;
            }

            if (model is BOSupplier)
            {
                if (IsInvalid(mFrmSupplier))
                {
                    mFrmSupplier = new FrmSupplier(mApplicationController, model as BOSupplier);
                }
                else
                {
                    mFrmSupplier.Model = model as BOSupplier;
                    mFrmSupplier.UpdateView();
                }
                SetCurrentForm(mFrmSupplier);
            }
            else if (model is BOCustomer)
            {
                if (IsInvalid(mFrmCustomer))
                {
                    mFrmCustomer = new FrmCustomer(mApplicationController, model as BOCustomer);
                }
                else
                {
                    mFrmCustomer.Model = model as BOCustomer;
                    mFrmCustomer.UpdateView();
                }
                SetCurrentForm(mFrmCustomer);
            }
            else if (model is BOEmployee)
            {
                if (IsInvalid(mFrmEmployee))
                {
                    mFrmEmployee = new FrmEmployee(mApplicationController, model as BOEmployee);
                }
                else
                {
                    mFrmEmployee.Model = model as BOEmployee;
                    mFrmEmployee.UpdateView();
                }
                SetCurrentForm(mFrmEmployee);
            }
        }
Esempio n. 6
0
        private void SupplierManagement(IEquatable <string> operationRequest)
        {
            using (var frmSupplier = new FrmSupplier())
            {
                frmSupplier.CommonService   = _CommonService;
                frmSupplier.SupplierService = _SupplierService;

                if (operationRequest.Equals(Resources.OperationRequestUpdate))
                {
                    if (dgvSupplier.CurrentRow != null)
                    {
                        frmSupplier.Supplier = _SupplierList[dgvSupplier.CurrentRow.Index];
                    }
                }

                if (frmSupplier.ShowDialog(this) == DialogResult.OK)
                {
                    try
                    {
                        ThreadStart threadStart = UpdateControlContent;
                        var         thread      = new Thread(threadStart);
                        thread.Start();

                        if (operationRequest.Equals(Resources.OperationRequestInsert))
                        {
                            _SupplierList.Add(frmSupplier.Supplier);
                        }

                        dgvSupplier.Refresh();
                        SetSupplierInfo();
                        UpdateResultInfo();
                        EnableActionButton();
                    }
                    catch (Exception exception)
                    {
                        FrmExtendedMessageBox.UnknownErrorMessage(
                            Resources.MsgCaptionUnknownError,
                            exception.Message);
                    }
                }
            }

            SetFocusToSupplierList();
        }
        private void btnSupplier_Click(object sender, EventArgs e)
        {
            FrmSupplier frm = new FrmSupplier();

            OpenChildForm(frm, sender);
        }