Ejemplo n.º 1
0
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            SimpleButton     btnAddNews  = (SimpleButton)sender;
            frmAddNewSubject frmNSubject = new frmAddNewSubject();

            frmNSubject.btnSender     = btnAddNews.Text;
            frmNSubject.sgetIndexGrid = gvSubject.RowCount + 1;
            DialogResult result = frmNSubject.ShowDialog();

            loadSubject();
        }
Ejemplo n.º 2
0
        private void btnDetail_Click(object sender, EventArgs e)
        {
            SimpleButton     btnDetails  = (SimpleButton)sender;
            frmAddNewSubject frmNSubject = new frmAddNewSubject();

            frmNSubject.btnSender = btnDetails.Text;
            DataRow selectedRow = gvSubject.GetDataRow(gvSubject.FocusedRowHandle);
            string  Codes       = selectedRow["MON_Code"].ToString();
            string  Names       = selectedRow["MON_Name"].ToString();
            int     SoTiets     = int.Parse(selectedRow["MON_SoTiet"].ToString());
            int     ids         = int.Parse(selectedRow["MON_ID"].ToString());

            frmNSubject.sCode   = Codes;
            frmNSubject.sName   = Names;
            frmNSubject.sSoTiet = SoTiets;
            frmNSubject.sId     = ids;

            DialogResult result = frmNSubject.ShowDialog();

            loadSubject();
        }
Ejemplo n.º 3
0
        private void gvSubject_DoubleClick(object sender, EventArgs e)
        {
            DevExpress.XtraGrid.Views.Grid.GridView btnDetails = (DevExpress.XtraGrid.Views.Grid.GridView)sender;

            frmAddNewSubject frmAddSubject = new frmAddNewSubject();

            frmAddSubject.btnSender = btnDetails.Appearance.ViewCaption.ToString();
            DataRow selectedRow = gvSubject.GetDataRow(gvSubject.FocusedRowHandle);
            string  Codes       = selectedRow["MON_Code"].ToString();
            string  Names       = selectedRow["MON_Name"].ToString();
            int     sotiet      = int.Parse(selectedRow["MON_SoTiet"].ToString());
            int     ids         = int.Parse(selectedRow["MON_ID"].ToString());

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

            loadSubject();
        }