Esempio n. 1
0
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            SimpleButton    btnAddNews   = (SimpleButton)sender;
            frmAddNewCoures frmAddCoures = new frmAddNewCoures();

            frmAddCoures.btnSender = btnAddNews.Text;

            frmAddCoures.sGridIndexCoures = gvCourses.RowCount + 1;
            DialogResult result = frmAddCoures.ShowDialog();

            LoadCourses();
        }
Esempio n. 2
0
        private void btnDetail_Click(object sender, EventArgs e)
        {
            SimpleButton btnDetails = (SimpleButton)sender;

            frmAddNewCoures frmAddCoures = new frmAddNewCoures();

            frmAddCoures.btnSender = btnDetails.Text;
            DataRow selectedRow = gvCourses.GetDataRow(gvCourses.FocusedRowHandle);
            string  Codes       = selectedRow["CHC_Code"].ToString();
            string  Names       = selectedRow["CHC_Name"].ToString();
            int     ids         = int.Parse(selectedRow["CHC_ID"].ToString());

            frmAddCoures.sCode = Codes;
            frmAddCoures.sName = Names;
            frmAddCoures.sId   = ids;
            DialogResult result = frmAddCoures.ShowDialog();

            LoadCourses();
        }
Esempio n. 3
0
        private void gvCourses_DoubleClick(object sender, EventArgs e)
        {
            DevExpress.XtraGrid.Views.Grid.GridView btnDetails = (DevExpress.XtraGrid.Views.Grid.GridView)sender;

            frmAddNewCoures frmAddCoures = new frmAddNewCoures();

            frmAddCoures.btnSender = btnDetails.Appearance.ViewCaption.ToString();
            DataRow selectedRow = gvCourses.GetDataRow(gvCourses.FocusedRowHandle);
            string  Codes       = selectedRow["CHC_Code"].ToString();
            string  Names       = selectedRow["CHC_Name"].ToString();
            int     ids         = int.Parse(selectedRow["CHC_ID"].ToString());

            frmAddCoures.sCode = Codes;
            frmAddCoures.sName = Names;
            frmAddCoures.sId   = ids;
            //frmAddCoures.ShowDialog();
            DialogResult result = frmAddCoures.ShowDialog();

            LoadCourses();
        }