Ejemplo n.º 1
0
 private void btRenewalEvent_Click(object sender, EventArgs e)
 {
     if (gvEvents.SelectedRows.Count != 1)
         return;
     EventPlainInfo eventPlainInfo = gvEvents.SelectedRows[0].DataBoundItem as EventPlainInfo;
     if (eventPlainInfo == null || eventPlainInfo.Tag == null)
         throw new Exception(@"Неправильные данные в таблице заявок!!!!");
     if (SharedAppData.IsAccesible(EventEditorForm.ObjectAccessId))
     {
         EventEditorForm eventEditorForm = new EventEditorForm(_dataContexts, eventPlainInfo.Tag, RequestAction.Renew,_manager);
         if (eventEditorForm.ShowDialog(this) == DialogResult.OK)
         {
             RefreshCurrentPage();
             _clientProcessor.SendEventNotify(eventEditorForm.ManagedEventId);
             FocusEvent(eventEditorForm.ManagedEventId);
         }
     }
     else
     {
         MessageBox.Show(@"Отсутсвуют права на использование " + EventEditorForm.ObjectAccessId.Description + @"!");
     }
 }
Ejemplo n.º 2
0
 private void btNewEvent_Click(object sender, EventArgs e)
 {
     if (SharedAppData.IsAccesible(EventEditorForm.ObjectAccessId))
     {
         EventEditorForm eventEditorForm = new EventEditorForm(_dataContexts, null, RequestAction.New,_manager);
         if (eventEditorForm.ShowDialog(this) == DialogResult.OK)
         {
             RefreshCurrentPage();
             _clientProcessor.SendEventNotify(eventEditorForm.ManagedEventId);
             FocusEvent(eventEditorForm.ManagedEventId);
         }
     }
     else
     {
         MessageBox.Show(@"Отсутсвуют права на использование " + EventEditorForm.ObjectAccessId.Description + @"!");
     }
 }