コード例 #1
0
 private void thêmMớiToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (cmbLopHoc.SelectedValue == null)
     {
         XtraMessageBox.Show("Vui lòng chọn lớp học ", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         frmAddStudent m_AddStudent = new frmAddStudent();
         m_AddStudent.iFunction = 1;
         m_AddStudent.Class     = new ClassDAO().GetByClassID(int.Parse(cmbLopHoc.SelectedValue.ToString()));
         m_AddStudent.ShowDialog();
         if (m_AddStudent.DialogResult == DialogResult.OK)
         {
             FillGridControl(int.Parse(cmbLopHoc.SelectedValue.ToString()));
         }
     }
 }
コード例 #2
0
ファイル: frmImportExcel.cs プロジェクト: thachgiasoft/test1
        private void btnThemmoi_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            int           dong         = bandedGridView1.FocusedRowHandle;
            frmAddStudent m_AddStudent = new frmAddStudent();

            m_AddStudent.iFunction = 2;
            m_AddStudent.Class     = new ClassDAO().GetByClassID(int.Parse(cmbLopHoc.SelectedValue.ToString()));
            DataTable table = new DataTable();



            //m_AddStudent.FirstName = bandedGridView1.GetRowCellDisplayText(dong, bandedGridView1.Columns["colFirstName"]).ToString();
            //m_AddStudent.LastName = bandedGridView1.GetRowCellDisplayText(dong, bandedGridView1.Columns["colLastName"]).ToString();
            //m_AddStudent.HomeName = bandedGridView1.GetRowCellDisplayText(dong, bandedGridView1.Columns["colHomeName"]).ToString();
            //m_AddStudent.Birthday = Convert.ToDateTime(bandedGridView1.GetRowCellDisplayText(dong, bandedGridView1.Columns["colBirthday"]));
            //m_AddStudent.DateStudy = Convert.ToDateTime(bandedGridView1.GetRowCellDisplayText(dong, bandedGridView1.Columns["colDateStudy"]));
            //m_AddStudent.AdressDetail = bandedGridView1.GetRowCellDisplayText(dong, bandedGridView1.Columns["colAddress"]).ToString();
            //m_AddStudent.Note = bandedGridView1.GetRowCellDisplayText(dong, bandedGridView1.Columns["colNote"]).ToString();

            m_AddStudent.ShowDialog();
            if (m_AddStudent.DialogResult == DialogResult.OK)
            {
            }
        }