Ejemplo n.º 1
0
        /// <summary>
        /// On click Edit , Delete and Update Data
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgvCLO_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int             index        = e.RowIndex;
            DataGridViewRow selected_row = dgvCLO.Rows[index];
            string          id           = selected_row.Cells[0].Value.ToString();

            Int32.TryParse(id, out MyClass.CLOid);
            CLO clo = new CLO();

            if (e.ColumnIndex == 4)
            {
                clo.EditCLO();
                this.Hide();
            }
            else if (e.ColumnIndex == 5)
            {
                clo.DeleteCLO();
            }
            else if (e.ColumnIndex == 6)
            {
                frmRubrics1 r1 = new frmRubrics1();
                r1.Show();
                this.Hide();
            }
        }
Ejemplo n.º 2
0
        private void ManageCLO_Load(object sender, EventArgs e)
        {
            CLO clo = new CLO();

            dgvCLO.DataSource = clo.Showdata();
            dgvCLO.Columns.Add(clo.Editbtn());
            dgvCLO.Columns.Add(clo.Deletebtn());
            dgvCLO.Columns.Add(clo.AddRubricbtn());
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Fetch Data from Database at Form Loading
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            CLO clo = new CLO();

            dgvCLO.DataSource = clo.Showdata();
        }