Пример #1
0
 private void btnShowDocuments_Click(object sender, EventArgs e)
 {
     Model.Common.User currentUser = Setting.User.ThisProgram.GetCurrentUser <Model.Common.User>();
     if (currentUser != null)
     {
         if (IsMembershipInAdministartorRole(currentUser))
         {
             using (View.ArchiverDocumentManagement f = new ArchiverDocumentManagement(PersonnelNumberTextBox.Text, 0))
             {
                 f.ShowDialog(this);
                 SetDossierDocumentsCount(PersonnelNumberTextBox.Text);
             }
         }
         else if (Setting.User.ThisProgram.CheckUserAccessPermission(currentUser, "ArchiverDocumentManagement", null))
         {
             using (View.ArchiverDocumentManagement f = new ArchiverDocumentManagement(PersonnelNumberTextBox.Text, 0))
             {
                 f.ShowDialog(this);
                 SetDossierDocumentsCount(PersonnelNumberTextBox.Text);
             }
         }
         else if (Setting.User.ThisProgram.CheckUserAccessPermission(currentUser, "ArchiveDocumentShow", null))
         {
             using (View.ArchiveDocumentShow f = new ArchiveDocumentShow(PersonnelNumberTextBox.Text, 0))
             {
                 f.ShowDialog(this);
                 SetDossierDocumentsCount(PersonnelNumberTextBox.Text);
             }
         }
     }
 }
Пример #2
0
        private void radGridViewAll_DoubleClick(object sender, EventArgs e)
        {
            if (GetSelectedDossier(radGridViewAll) == null)
            {
                return;
            }

            Model.Common.User currentUser = Setting.User.ThisProgram.GetCurrentUser <Model.Common.User>();
            if (currentUser != null)
            {
                if (IsMembershipInAdministartorRole(currentUser))
                {
                    using (View.ArchiverDocumentManagement f = new ArchiverDocumentManagement(GetSelectedDossier(radGridViewAll), 0))
                    {
                        f.ShowDialog();
                    }
                }
                else if (Setting.User.ThisProgram.CheckUserAccessPermission(currentUser, "ArchiverDocumentManagement", null))
                {
                    using (View.ArchiverDocumentManagement f = new ArchiverDocumentManagement(GetSelectedDossier(radGridViewAll), 0))
                    {
                        f.ShowDialog();
                    }
                }
                else if (Setting.User.ThisProgram.CheckUserAccessPermission(currentUser, "ArchiveDocumentShow", null))
                {
                    using (View.ArchiveDocumentShow f = new ArchiveDocumentShow(GetSelectedDossier(radGridViewAll), 0))
                    {
                        f.ShowDialog(this);
                    }
                }
            }
        }
Пример #3
0
 private void radGridView_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         string PessonelNumber = "";
         foreach (Telerik.WinControls.UI.GridViewRowInfo item in radGridView.SelectedRows)
         {
             PessonelNumber = item.Cells[4].Value.ToString();
         }
         if (PessonelNumber != "")
         {
             var dialogResult = PersianMessageBox.Show(this, "مایل به مشاهده پرونده : " + PessonelNumber + " هستید؟", "تایید ", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
             if (dialogResult == System.Windows.Forms.DialogResult.Yes)
             {
                 Model.Common.User currentUser = Setting.User.ThisProgram.GetCurrentUser <Model.Common.User>();
                 if (currentUser != null)
                 {
                     if (IsMembershipInAdministartorRole(currentUser))
                     {
                         using (View.ArchiverDocumentManagement f = new ArchiverDocumentManagement(PessonelNumber, 0))
                         {
                             f.ShowDialog();
                         }
                     }
                     else if (Setting.User.ThisProgram.CheckUserAccessPermission(currentUser, "ArchiverDocumentManagement", null))
                     {
                         using (View.ArchiverDocumentManagement f = new ArchiverDocumentManagement(PessonelNumber, 0))
                         {
                             f.ShowDialog();
                         }
                     }
                     else if (Setting.User.ThisProgram.CheckUserAccessPermission(currentUser, "ArchiveDocumentShow", null))
                     {
                         using (View.ArchiveDocumentShow f = new ArchiveDocumentShow(PessonelNumber, 0))
                         {
                             f.ShowDialog();
                         }
                     }
                 }
             }
         }
     }
 }