Пример #1
0
 private void DBGrid2_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         if (DBGrid2.CurrentRow == null || DBGrid2.CurrentRow.Cells["AccSeq"].Value == null)
         {
             return;
         }
         if (!Util.IsInt(DBGrid2.CurrentRow.Cells["AccSeq"].Value.ToString()))
         {
             return;
         }
         //modAccCredenceList mod = (modAccCredenceList)DBGrid.CurrentRow.DataBoundItem;
         EditAccCredenceList frm = new EditAccCredenceList();
         frm.EditItem(DBGrid2.CurrentRow.Cells["AccName"].Value.ToString(), int.Parse(DBGrid2.CurrentRow.Cells["AccSeq"].Value.ToString()), true);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             LoadData();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Пример #2
0
 private void toolEdit_Click(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         if (DBGrid.CurrentRow == null)
         {
             return;
         }
         modAccCredenceList  mod = (modAccCredenceList)DBGrid.CurrentRow.DataBoundItem;
         EditAccCredenceList frm = new EditAccCredenceList();
         frm.EditItem(mod.AccName, mod.AccSeq);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             LoadData();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Пример #3
0
 private void mnuAccCredenceList_Click(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         if (DBGrid.CurrentRow == null)
         {
             return;
         }
         modAccCheckList mod = (modAccCheckList)DBGrid.CurrentRow.DataBoundItem;
         if (mod.Status == 0)
         {
             EditAccCredenceList frm = new EditAccCredenceList();
             frm.EditItem(mod.AccName, mod.AccSeq);
             if (frm.ShowDialog() == DialogResult.OK)
             {
                 LoadData();
             }
         }
         else
         {
             EditAccCheckForm frm   = new EditAccCheckForm();
             dalAccCheckForm  dalcf = new dalAccCheckForm();
             modAccCheckForm  modcf = dalcf.GetItembyCheckid(mod.Id, out Util.emsg);
             if (modcf != null)
             {
                 frm.EditItem(modcf.FormId);
                 frm.ShowDialog();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Пример #4
0
        private void DBGrid_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                if (DBGrid.CurrentRow == null)
                {
                    return;
                }

                EditAccCredenceList frm = new EditAccCredenceList();
                frm.EditItem(cboAccName.SelectedValue.ToString(), Convert.ToInt32(DBGrid.CurrentRow.Cells["accseq"].Value));
                frm.ShowDialog();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }