Esempio n. 1
0
        private void Btn3_8_Click(object sender, EventArgs e)
        {
            frm38 frm = new frm38();

            this.Hide();
            frm.ShowDialog();
            this.Show();
            this.BringToFront();
        }
Esempio n. 2
0
        private void BtnCreateCustomer_Click(object sender, EventArgs e)
        {
            #region CheckSelectedRow
            int status     = 0;
            int index      = 0;
            int foundindex = 0;
            foreach (DataGridViewRow row in dgvList.Rows)
            {
                if (row.Cells["colCheck"].Value == null ? false : bool.Parse(row.Cells["colCheck"].Value.ToString()))
                {
                    if (status >= 1) //if already found
                    {
                        status = 2;
                    }
                    else //first selected
                    {
                        status     = 1;
                        foundindex = index;
                    }
                }
                index++;
            }
            #endregion

            if (status == 0) //if no row selected
            {
                MetroMessageBox.Show(this, "\n" + Messages.ConfirmationOfNonAmigo.NoSelectedRow, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (status == 2) //if multirow selected
            {
                MetroMessageBox.Show(this, "\n" + Messages.ConfirmationOfNonAmigo.MultipleRowSelected, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                this.Hide();
                string customer_name = dgvList.Rows[foundindex].Cells["CUSTOMER_NAME"].Value.ToString().Trim();
                frm38  frm           = new frm38(customer_name);
                frm.ShowDialog();
                this.Show();
            }
        }