Example #1
0
 private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
 {
     timer1.Enabled = false;
     if (gridMain.Rows[e.Row].Tag.GetType() == typeof(TimeAdjust))
     {
         if (!Security.IsAuthorized(Permissions.TimecardsEditAll))
         {
             timer1.Enabled = true;
             return;
         }
         TimeAdjust         adjust = (TimeAdjust)gridMain.Rows[e.Row].Tag;
         FormTimeAdjustEdit FormT  = new FormTimeAdjustEdit(adjust);
         FormT.ShowDialog();
     }
     else
     {
         ClockEvent         ce      = (ClockEvent)gridMain.Rows[e.Row].Tag;
         FormClockEventEdit FormCEE = new FormClockEventEdit(ce);
         FormCEE.ShowDialog();
     }
     FillMain(true);
     timer1.Enabled = true;
 }
Example #2
0
 private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e)
 {
     if(cannotEdit) {
         return;
     }
     timer1.Enabled=false;
     if(gridMain.Rows[e.Row].Tag.GetType()==typeof(TimeAdjust)) {
         if(!Security.IsAuthorized(Permissions.TimecardsEditAll)) {
             timer1.Enabled=true;
             return;
         }
         TimeAdjust adjust=(TimeAdjust)gridMain.Rows[e.Row].Tag;
         FormTimeAdjustEdit FormT=new FormTimeAdjustEdit(adjust);
         FormT.ShowDialog();
     }
     else {
         ClockEvent ce=(ClockEvent)gridMain.Rows[e.Row].Tag;
         FormClockEventEdit FormCEE=new FormClockEventEdit(ce);
         FormCEE.ShowDialog();
     }
     FillMain(true);
     timer1.Enabled=true;
 }