예제 #1
0
        private void metroTile1_Click(object sender, EventArgs e)
        {
            Add_New_Department ad = new Add_New_Department();

            ad.ShowDialog();
            this.dgvusers.DataSource = d.all_department1();
        }
예제 #2
0
        private void metroTile2_Click(object sender, EventArgs e)
        {
            Add_New_Department Edit_Dept = new Add_New_Department();

            Edit_Dept.FrmName        = "Edit";
            Edit_Dept.ID             = int.Parse(dgvusers.CurrentRow.Cells[0].Value.ToString());
            Edit_Dept.Text           = " تعديل لقسم  " + dgvusers.CurrentRow.Cells[1].Value.ToString();
            Edit_Dept.txtdept.Text   = dgvusers.CurrentRow.Cells[1].Value.ToString();
            Edit_Dept.txttotal.Text  = dgvusers.CurrentRow.Cells[2].Value.ToString();
            Edit_Dept.txtprice1.Text = dgvusers.CurrentRow.Cells[3].Value.ToString();
            Edit_Dept.dtpp1.Text     = dgvusers.CurrentRow.Cells[4].Value.ToString();

            Edit_Dept.txtprice2.Text = dgvusers.CurrentRow.Cells[5].Value.ToString();
            Edit_Dept.dtp2.Text      = dgvusers.CurrentRow.Cells[6].Value.ToString();

            Edit_Dept.txtpric3.Text  = dgvusers.CurrentRow.Cells[7].Value.ToString();
            Edit_Dept.dtp3.Text      = dgvusers.CurrentRow.Cells[8].Value.ToString();
            Edit_Dept.txtprice4.Text = dgvusers.CurrentRow.Cells[9].Value.ToString();
            Edit_Dept.dtpp4.Text     = dgvusers.CurrentRow.Cells[10].Value.ToString();

            Edit_Dept.btnadddept.Text = "تعديل";
            Edit_Dept.ShowDialog();
            this.dgvusers.DataSource = d.all_department1();
        }