コード例 #1
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (selectedRowIndex >= 0)
     {
         if (dsLeaveSchedule.Tables[0].Rows.Count > 0)
         {
             frmRegLeaveSchedule leaveSchedule = new frmRegLeaveSchedule();
             leaveSchedule.DsLeaveSchedule      = dsLeaveSchedule;
             leaveSchedule.CurrentLeaveSchedule = selectedRowIndex;
             leaveSchedule.ShowDialog(this);
             PopulateLeaveSchedule();
         }
         else
         {
             string str  = WorkingContext.LangManager.GetString("frmListLeaveSchedule_Messa2");
             string str1 = WorkingContext.LangManager.GetString("frmListLeaveSchedule_Messa2_Title1");
             //MessageBox.Show("Bạn chưa chọn nhân viên nào!", "Sửa đăng ký công tác", MessageBoxButtons.OK,  MessageBoxIcon.Exclamation);
             MessageBox.Show(str, str1, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
     }
     else
     {
         string str  = WorkingContext.LangManager.GetString("frmListLeaveSchedule_Messa2");
         string str1 = WorkingContext.LangManager.GetString("frmListLeaveSchedule_Messa2_Title1");
         //MessageBox.Show("Bạn chưa chọn nhân viên nào!", "Sửa đăng ký công tác", MessageBoxButtons.OK,  MessageBoxIcon.Exclamation);
         MessageBox.Show(str, str1, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     selectedRowIndex = -1;
     tableModel1.Selections.Clear();
 }
コード例 #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmRegLeaveSchedule leaveSchedule = new frmRegLeaveSchedule();

            leaveSchedule.ShowDialog(this);
            PopulateLeaveSchedule();
            selectedRowIndex = -1;
            tableModel1.Selections.Clear();
        }
コード例 #3
0
 private void lvwLeaveSchedule_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left && e.Clicks == 2)
     {
         if (lvwLeaveSchedule.SelectedItems.Length > 0)
         {
             frmRegLeaveSchedule leaveSchedule = new frmRegLeaveSchedule();
             leaveSchedule.DsLeaveSchedule      = dsLeaveSchedule;
             leaveSchedule.CurrentLeaveSchedule = selectedRowIndex;
             leaveSchedule.ShowDialog(this);
             PopulateLeaveSchedule();
         }
         selectedRowIndex = -1;
         tableModel1.Selections.Clear();
     }
 }
コード例 #4
0
 private void lvwLeaveSchedule_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left && e.Clicks == 2)
     {
         if (lvwLeaveSchedule.SelectedItems.Length > 0)
         {
             frmRegLeaveSchedule leaveSchedule = new frmRegLeaveSchedule();
             leaveSchedule.DsLeaveSchedule = dsLeaveSchedule;
             leaveSchedule.CurrentLeaveSchedule = selectedRowIndex;
             leaveSchedule.ShowDialog(this);
             PopulateLeaveSchedule();
         }
         selectedRowIndex = -1;
         tableModel1.Selections.Clear();
     }
 }
コード例 #5
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if(selectedRowIndex >= 0)
     {
         if(dsLeaveSchedule.Tables[0].Rows.Count > 0)
         {
             frmRegLeaveSchedule leaveSchedule = new frmRegLeaveSchedule();
             leaveSchedule.DsLeaveSchedule = dsLeaveSchedule;
             leaveSchedule.CurrentLeaveSchedule = selectedRowIndex;
             leaveSchedule.ShowDialog(this);
             PopulateLeaveSchedule();
         }
         else
         {
             string str = WorkingContext.LangManager.GetString("frmListLeaveSchedule_Messa2");
             string str1 = WorkingContext.LangManager.GetString("frmListLeaveSchedule_Messa2_Title1");
             //MessageBox.Show("Bạn chưa chọn nhân viên nào!", "Sửa đăng ký công tác", MessageBoxButtons.OK,  MessageBoxIcon.Exclamation);
             MessageBox.Show(str, str1, MessageBoxButtons.OK,  MessageBoxIcon.Exclamation);
         }
     }
     else
     {
         string str = WorkingContext.LangManager.GetString("frmListLeaveSchedule_Messa2");
         string str1 = WorkingContext.LangManager.GetString("frmListLeaveSchedule_Messa2_Title1");
         //MessageBox.Show("Bạn chưa chọn nhân viên nào!", "Sửa đăng ký công tác", MessageBoxButtons.OK,  MessageBoxIcon.Exclamation);
         MessageBox.Show(str, str1, MessageBoxButtons.OK,  MessageBoxIcon.Exclamation);
     }
     selectedRowIndex = -1;
     tableModel1.Selections.Clear();
 }
コード例 #6
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     frmRegLeaveSchedule leaveSchedule = new frmRegLeaveSchedule();
     leaveSchedule.ShowDialog(this);
     PopulateLeaveSchedule();
     selectedRowIndex = -1;
     tableModel1.Selections.Clear();
 }