private void BtnModify_Click(object sender, EventArgs e)
        {
            frmMaterial frm = new frmMaterial();

            if (dgvSearch.SelectedRows.Count > 0)
            {
                if (dgvSearch.CurrentRow.Cells[0].Value == null)
                {
                    frmMessageBoxInvalidData frm3 = new frmMessageBoxInvalidData();
                    frm3.ShowDialog();
                }
                else
                {
                    frm.flag = 0;

                    frm.btnDelete.Enabled = true;
                    //Llenamos todos los datos falta ver como capturarlos


                    OpenFormPanel(frm);
                }
            }
            else
            {
                frmMessageBoxSelectRow frm2 = new frmMessageBoxSelectRow();
                frm2.ShowDialog();
            }
        }
        private void BtnNew_Click(object sender, EventArgs e)
        {
            frmMaterial frm = new frmMaterial();

            frm.flag = 1;
            OpenFormPanel(frm);
        }
Ejemplo n.º 3
0
        private void BtnGM_Click(object sender, EventArgs e)
        {
            panel5.Visible      = true;
            panel6.Visible      = true;
            panel7.Visible      = true;
            plSubmenuM.Visible  = false;
            btnBrand.Visible    = true;
            btnCategory.Visible = true;
            btnFamiliy.Visible  = true;
            frmMaterial fm = new frmMaterial();

            //    fm.FormClosed += new FormClosedEventHandler(ShowFormInitialCloseForms);
            OpenFormPanel(fm);
        }
        private void BtnAddMaterial_Click(object sender, EventArgs e)
        {
            frmMaterial frm = new frmMaterial();

            if (dgvSearch.SelectedRows.Count > 0)
            {
                if (dgvSearch.CurrentRow.Cells[0].Value == null)
                {
                    frmMessageBoxInvalidData frm3 = new frmMessageBoxInvalidData();
                    frm3.ShowDialog();
                }
                else
                {
                    frm.flag = 2;

                    frm.cboCategory.Enabled    = false;
                    frm.cboFamily.Enabled      = false;
                    frm.cboBrand.Enabled       = false;
                    frm.cboUnit.Enabled        = false;
                    frm.cboSupplier.Enabled    = false;
                    frm.cboMoney.Enabled       = false;
                    frm.txtName.Enabled        = false;
                    frm.txtPrice.Enabled       = false;
                    frm.txtMinQuantity.Enabled = false;
                    // frm.btnDelete.Enabled = true;
                    //Llenamos todos los datos falta ver como capturarlos


                    OpenFormPanel(frm);
                }
            }
            else
            {
                frmMessageBoxSelectRow frm2 = new frmMessageBoxSelectRow();
                frm2.ShowDialog();
            }
        }