private void button1_Click(object sender, EventArgs e)
        {
            frmAddSupplier obj = new frmAddSupplier();

            obj.MdiParent = this;
            obj.Show();
        }
        private void addCompanySupplierToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmAddSupplier obj = new frmAddSupplier();

            obj.MdiParent = this;
            obj.Show();
        }
Beispiel #3
0
        private void addSupplierToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var form = new frmAddSupplier(null);

            form.MdiParent   = this;
            form.WindowState = FormWindowState.Maximized;
            form.Show();
        }
Beispiel #4
0
        private void btnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            //frmAddSupplier frmAdd = new frmAddSupplier(preSupplier);
            //frmAdd.ShowDialog();
            frmAddSupplier frmAdd = new frmAddSupplier(preSupplier, this);

            frmAdd.WindowState     = FormWindowState.Maximized;
            frmAdd.FormBorderStyle = FormBorderStyle.None;
            frmAdd.MdiParent       = this.MdiParent;
            frmAdd.Dock            = DockStyle.Fill;
            frmAdd.Show();
        }
Beispiel #5
0
        private void btnNewSupplier_Click(object sender, EventArgs e)
        {
            //frmAddSupplier frmAdd = new frmAddSupplier(new SupplierPresenter());
            //frmAdd.ShowDialog();
            Form frmAdd = new frmAddSupplier(new SupplierPresenter(), this);

            frmAdd.WindowState     = FormWindowState.Maximized;
            frmAdd.FormBorderStyle = FormBorderStyle.None;
            frmAdd.MdiParent       = this.MdiParent;
            frmAdd.Dock            = DockStyle.Fill;
            frmAdd.Show();
        }
Beispiel #6
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (_selectedRole != null)
     {
         if (_selectedRole.Role == Role.Supplier)
         {
             var form = new frmAddSupplier(_selectedUser);
             form.MdiParent = this.ParentForm;
             form.Show();
         }
         else
         {
             MessageBox.Show("You cannot edit client profile", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
 }
Beispiel #7
0
        private void btnEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            GridView gridView = gridSupplier.FocusedView as GridView;

            Model.SUPPLIER obj = new Model.SUPPLIER();

            obj.SUPPLIER_ID   = Convert.ToInt32(gridView.GetFocusedRowCellValue("SUPPLIER_ID").ToString());
            obj.SUPPLIER_CODE = gridView.GetFocusedRowCellValue("SUPPLIER_CODE").ToString();
            obj.SUPPLIER_NAME = gridView.GetFocusedRowCellValue("SUPPLIER_NAME").ToString();
            obj.TAX_CODE      = gridView.GetFocusedRowCellValue("TAX_CODE").ToString();
            obj.PHONE         = gridView.GetFocusedRowCellValue("PHONE").ToString();
            obj.ADDRESS       = gridView.GetFocusedRowCellValue("ADDRESS").ToString();

            //frmAddSupplier frmAdd = new frmAddSupplier(preSupplier, obj);
            //frmAdd.ShowDialog();
            frmAddSupplier frmAdd = new frmAddSupplier(preSupplier, obj, this);

            frmAdd.WindowState     = FormWindowState.Maximized;
            frmAdd.FormBorderStyle = FormBorderStyle.None;
            frmAdd.MdiParent       = this.MdiParent;
            frmAdd.Dock            = DockStyle.Fill;
            frmAdd.Show();
        }