Example #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmDayType frm = new frmDayType();

            frm.DsDayType = dsDayType;
            frm.ShowDialog();
            PopulateDayType();
            selectedRow = -1;            // sau khi xóa xong thì đưa vị trí con trỏ về -1
            tableModel1.Selections.Clear();
        }
Example #2
0
 private void lvwDayType_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left && e.Clicks == 2)
     {
         if (lvwDayType.SelectedItems.Length > 0)
         {
             frmDayType frm = new frmDayType();
             frm.DsDayType        = dsDayType;
             frm.SelectedRowIndex = selectedRow;
             frm.ShowDialog();
             PopulateDayType();
         }
         selectedRow = -1;
         tableModel1.Selections.Clear();
     }
 }
Example #3
0
 private void btnSuaNgay_Click(object sender, System.EventArgs e)
 {
     if (selectedRow >= 0)
     {
         frmDayType frm = new frmDayType();
         frm.DsDayType        = dsDayType;
         frm.SelectedRowIndex = selectedRow;
         frm.ShowDialog();
         PopulateDayType();
     }
     else
     {
         string str  = WorkingContext.LangManager.GetString("frmDayType_UpDate_Error_Messa");
         string str1 = WorkingContext.LangManager.GetString("frmDayType_UpDate_Error_Title");
         //MessageBox.Show("Bạn chưa chọn kiểu ngày cần sửa", "Sửa kiểu ngày", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         MessageBox.Show(str, str1, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     selectedRow = -1;            // sau khi sửa xong thì đưa vị trí con trỏ về -1
     tableModel1.Selections.Clear();
 }
Example #4
0
 private void lvwDayType_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if(e.Button == MouseButtons.Left && e.Clicks == 2)
     {
         if(lvwDayType.SelectedItems.Length > 0)
         {
             frmDayType frm = new frmDayType();
             frm.DsDayType = dsDayType;
             frm.SelectedRowIndex = selectedRow;
             frm.ShowDialog();
             PopulateDayType();
         }
         selectedRow = -1;
         tableModel1.Selections.Clear();
     }
 }
Example #5
0
 private void btnSuaNgay_Click(object sender, System.EventArgs e)
 {
     if(selectedRow >= 0)
     {
         frmDayType frm = new frmDayType();
         frm.DsDayType = dsDayType;
         frm.SelectedRowIndex = selectedRow;
         frm.ShowDialog();
         PopulateDayType();
     }
     else
     {
         string str = WorkingContext.LangManager.GetString("frmDayType_UpDate_Error_Messa");
         string str1 = WorkingContext.LangManager.GetString("frmDayType_UpDate_Error_Title");
         //MessageBox.Show("Bạn chưa chọn kiểu ngày cần sửa", "Sửa kiểu ngày", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         MessageBox.Show(str, str1, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     selectedRow = -1;// sau khi sửa xong thì đưa vị trí con trỏ về -1
     tableModel1.Selections.Clear();
 }
Example #6
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     frmDayType frm = new frmDayType();
     frm.DsDayType = dsDayType;
     frm.ShowDialog();
     PopulateDayType();
     selectedRow = -1;// sau khi xóa xong thì đưa vị trí con trỏ về -1
     tableModel1.Selections.Clear();
 }