private void masterEntryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Customer_Entry en = new Customer_Entry();

            en.Show();
        }
示例#2
0
        private void dgw_MouseClick(object sender, MouseEventArgs e)
        {
            try
            {
                if (lblOperation.Text == "Customer Master")
                {
                    DataGridViewRow dr = dgw.SelectedRows[0];
                    this.Hide();
                    //frmPatient frm = new frmPatient();
                    Customer_Entry frm = new Customer_Entry();
                    frm.Show();
                    frm.txtID.Text           = dr.Cells[0].Value.ToString();
                    frm.txtCustomerID.Text   = dr.Cells[1].Value.ToString();
                    frm.txtCustomerName.Text = dr.Cells[2].Value.ToString();
                    frm.txtAddress.Text      = dr.Cells[3].Value.ToString();
                    frm.txtCity.Text         = dr.Cells[4].Value.ToString();
                    frm.txtContactNo.Text    = dr.Cells[5].Value.ToString();
                    frm.txtEmailID.Text      = dr.Cells[6].Value.ToString();
                    byte[]       data = (byte[])dr.Cells[7].Value;
                    MemoryStream ms   = new MemoryStream(data);
                    frm.Picture.Image     = Image.FromStream(ms);
                    frm.btnUpdate.Enabled = true;
                    frm.btnDelete.Enabled = true;
                    frm.btnSave.Enabled   = false;
                    frm.lblUser.Text      = lblUser.Text;
                    lblOperation.Text     = "";
                }

                /*   if (lblOperation.Text == "Membership")
                 * {
                 *    DataGridViewRow dr = dgw.SelectedRows[0];
                 *     this.Hide();
                 *     frmAdmittedPatientStayBilling frm = new frmAdmittedPatientStayBilling();
                 *     frm.Show();
                 *     frm.txtM_ID.Text = dr.Cells[0].Value.ToString();
                 *     frm.txtMemberName.Text = dr.Cells[2].Value.ToString();
                 *     frm.txtAddress.Text = dr.Cells[3].Value.ToString();
                 *     frm.txtCity.Text = dr.Cells[4].Value.ToString();
                 *     frm.txtContactNo.Text = dr.Cells[5].Value.ToString();
                 *     frm.txtEmailID.Text = dr.Cells[6].Value.ToString();
                 *     byte[] data = (byte[])dr.Cells[7].Value;
                 *     MemoryStream ms = new MemoryStream(data);
                 *     frm.Picture.Image = Image.FromStream(ms);
                 *     frm.lblUser.Text = lblUser.Text;
                 *     lblOperation.Text = "";
                 *     frm.auto();
                 *
                 * } */
                if (lblOperation.Text == "Sales")
                {
                    DataGridViewRow dr = dgw.SelectedRows[0];
                    this.Hide();
                    CustomerBilling frm = new CustomerBilling();
                    frm.Show();
                    frm.txtC_Id.Text         = dr.Cells[0].Value.ToString();
                    frm.txtCustomerID.Text   = dr.Cells[1].Value.ToString();
                    frm.txtCustomerName.Text = dr.Cells[2].Value.ToString();
                    frm.lblUser.Text         = lblUser.Text;
                    lblOperation.Text        = "";
                    frm.auto();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }