Exemplo n.º 1
0
        private void btnAdd_Click(object sender, System.EventArgs e)
        {
            frmContractType frm = new frmContractType();

            frm.DsContractType = dsContractType;
            frm.ShowDialog();
            PopulateContractType();
            selectedRow = -1;            // sau khi xóa xong thì đưa vị trí con trỏ về -1
            tableModel1.Selections.Clear();
        }
Exemplo n.º 2
0
 private void lvwContractTable_MouseDown_1(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left && e.Clicks == 2)
     {
         if (lvwContractTable.SelectedItems.Length > 0)
         {
             frmContractType frm = new frmContractType();
             frm.DsContractType   = dsContractType;
             frm.SelectedRowIndex = selectedRow;
             frm.ShowDialog();
             PopulateContractType();
         }
         selectedRow = -1;
         tableModel1.Selections.Clear();
     }
 }
Exemplo n.º 3
0
 private void btnEdit_Click_1(object sender, System.EventArgs e)
 {
     if (selectedRow >= 0)
     {
         frmContractType frm = new frmContractType();
         frm.DsContractType   = dsContractType;
         frm.SelectedRowIndex = selectedRow;
         frm.ShowDialog();
         PopulateContractType();
     }
     else
     {
         string str  = WorkingContext.LangManager.GetString("frmListContract_Sua_Messa1");
         string str1 = WorkingContext.LangManager.GetString("frmListContract_Sua_Title");
         //MessageBox.Show("bạn chưa chọn kiểu hợp đồng cần sửa", "Sửa kiểu hợp đồng", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         MessageBox.Show(str, str1, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     selectedRow = -1;            // sau khi s?a xong th́ dua v? trí con tr? v? -1
     tableModel1.Selections.Clear();
 }
Exemplo n.º 4
0
 private void lvwContractTable_MouseDown_1(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if(e.Button == MouseButtons.Left && e.Clicks == 2)
     {
         if(lvwContractTable.SelectedItems.Length > 0)
         {
             frmContractType frm = new frmContractType();
             frm.DsContractType = dsContractType;
             frm.SelectedRowIndex = selectedRow;
             frm.ShowDialog();
             PopulateContractType();
         }
         selectedRow = -1;
         tableModel1.Selections.Clear();
     }
 }
Exemplo n.º 5
0
 private void btnEdit_Click_1(object sender, System.EventArgs e)
 {
     if(selectedRow >= 0)
     {
         frmContractType frm = new frmContractType();
         frm.DsContractType = dsContractType;
         frm.SelectedRowIndex = selectedRow;
         frm.ShowDialog();
         PopulateContractType();
     }
     else
     {
         string str = WorkingContext.LangManager.GetString("frmListContract_Sua_Messa1");
         string str1 = WorkingContext.LangManager.GetString("frmListContract_Sua_Title");
         //MessageBox.Show("bạn chưa chọn kiểu hợp đồng cần sửa", "Sửa kiểu hợp đồng", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         MessageBox.Show(str, str1, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     selectedRow = -1;// sau khi s?a xong th́ dua v? trí con tr? v? -1
     tableModel1.Selections.Clear();
 }
Exemplo n.º 6
0
 private void btnAdd_Click(object sender, System.EventArgs e)
 {
     frmContractType frm = new frmContractType();
     frm.DsContractType = dsContractType;
     frm.ShowDialog();
     PopulateContractType();
     selectedRow = -1;// sau khi xóa xong thì đưa vị trí con trỏ về -1
     tableModel1.Selections.Clear();
 }