Beispiel #1
0
        private void ReassignSelectedReports()
        {
            BusinessServices.Report report = new BusinessServices.Report();
            BusinessServices.User   user   = new BusinessServices.User();
            if ((Username != null) && (Username != ""))
            {
                int UserID = user.GetIdFromUsername(Username);
                foreach (KeyValuePair <int, int> keyvalue in SelectedForReassign)
                {
                    report.ReassignReportInactive(keyvalue.Key, UserID, keyvalue.Value);
                }
            }
            else if (InactivatedUsernames.Count > 0)
            {
                foreach (string Uname in InactivatedUsernames)
                {
                    int UserID = user.GetIdFromUsername(Uname);
                    foreach (KeyValuePair <int, int> keyvalue in SelectedForReassign)
                    {
                        report.ReassignReportInactive(keyvalue.Key, UserID, keyvalue.Value);
                    }
                }

                InactivatedUsernames = null;
            }
            else if (InactivatedEmails.Count > 0)
            {
                foreach (string email in InactivatedEmails)
                {
                    int UserID = user.GetIdFromEmail(email);
                    foreach (KeyValuePair <int, int> keyvalue in SelectedForReassign)
                    {
                        report.ReassignReportInactive(keyvalue.Key, UserID, keyvalue.Value);
                    }
                }

                InactivatedEmails = null;
            }

            //LoadPeriodicReportsList();

            SelectedForReassign = null;
        }