public int SelectCount() { int OrgID = UserContext.UserData.OrgID; ISingleResult <prcGetPeriodicReportListResult> result = prl.prcGetPeriodicReportList(OrgID); var query = from pr in result.AsQueryable <prcGetPeriodicReportListResult>() select pr; return(query.Count <prcGetPeriodicReportListResult>()); }
public int SelectCountUser(string Username) { int OrgID = UserContext.UserData.OrgID; ISingleResult <prcGetPeriodicReportListOnInactivateUserResult> result = prl.prcGetPeriodicReportListOnInactivateUser(OrgID, Username); var query = from pr in result.AsQueryable <prcGetPeriodicReportListOnInactivateUserResult>() select pr; return(query.Count <prcGetPeriodicReportListOnInactivateUserResult>()); }
public List <prcGetPeriodicReportListOnInactivateUserResult> SelectAllReportsUser(string sSortType, int iBeginRowIndex, int iMaximumRows, string Username) { int OrgID = UserContext.UserData.OrgID; ISingleResult <prcGetPeriodicReportListOnInactivateUserResult> result = prl.prcGetPeriodicReportListOnInactivateUser(OrgID, Username); var query = from pr in result.AsQueryable <prcGetPeriodicReportListOnInactivateUserResult>() select pr; //sort query = SelectAllReportsUserSort(query, sSortType); // paginate query = query.Skip(iBeginRowIndex).Take(iMaximumRows); return(query.ToList()); }
private int PeriodicReportCountUser(int UserId) { int OrgID = UserContext.UserData.OrgID; BusinessServices.User user = new BusinessServices.User(); DataTable dtUser = user.GetUser(UserId); String Username = dtUser.Rows[0]["UserName"].ToString(); string connectionString = ConfigurationSettings.AppSettings["ConnectionString"] + "password="******"password"] + ";"; PeriodicReportListDataContext prl = new PeriodicReportListDataContext(connectionString); ISingleResult <prcGetPeriodicReportListOnInactivateUserResult> result = prl.prcGetPeriodicReportListOnInactivateUser(OrgID, Username); var query = from pr in result.AsQueryable <prcGetPeriodicReportListOnInactivateUserResult>() select pr; return(query.Count <prcGetPeriodicReportListOnInactivateUserResult>()); }
public int SelectCountEmails(object InactivatedEmails) { int OrgID = UserContext.UserData.OrgID; List <string> inactivatedEmails = (List <string>)InactivatedEmails; List <prcGetPeriodicReportListOnInactivateEmailResult> InactiveSchedules = new List <prcGetPeriodicReportListOnInactivateEmailResult>(); foreach (string email in inactivatedEmails) { ISingleResult <prcGetPeriodicReportListOnInactivateEmailResult> result = prl.prcGetPeriodicReportListOnInactivateEmail(OrgID, email); var qry = from pr in result.AsQueryable <prcGetPeriodicReportListOnInactivateEmailResult>() select pr; InactiveSchedules.AddRange(qry.ToList <prcGetPeriodicReportListOnInactivateEmailResult>()); } var query = InactiveSchedules.AsQueryable <prcGetPeriodicReportListOnInactivateEmailResult>(); return(query.Count <prcGetPeriodicReportListOnInactivateEmailResult>()); }
private int SelectCountUsers() { int OrgID = UserContext.UserData.OrgID; List <string> inactivatedUsernames = (List <string>)Session["InactivatedUsernames"]; List <prcGetPeriodicReportListOnInactivateUserResult> InactiveSchedules = new List <prcGetPeriodicReportListOnInactivateUserResult>(); string connectionString = ConfigurationSettings.AppSettings["ConnectionString"] + "password="******"password"] + ";"; PeriodicReportListDataContext prl = new PeriodicReportListDataContext(connectionString); foreach (string username in inactivatedUsernames) { ISingleResult <prcGetPeriodicReportListOnInactivateUserResult> result = prl.prcGetPeriodicReportListOnInactivateUser(OrgID, username); var qry = from pr in result.AsQueryable <prcGetPeriodicReportListOnInactivateUserResult>() select pr; InactiveSchedules.AddRange(qry.ToList <prcGetPeriodicReportListOnInactivateUserResult>()); } var query = InactiveSchedules.AsQueryable <prcGetPeriodicReportListOnInactivateUserResult>(); return(query.Count <prcGetPeriodicReportListOnInactivateUserResult>()); }
public List <prcGetPeriodicReportListOnInactivateEmailResult> SelectAllReportsEmails(object InactivatedEmails, string sSortType, int iBeginRowIndex, int iMaximumRows) { int OrgID = UserContext.UserData.OrgID; List <string> inactivatedEmails = (List <string>)InactivatedEmails; List <prcGetPeriodicReportListOnInactivateEmailResult> InactiveSchedules = new List <prcGetPeriodicReportListOnInactivateEmailResult>(); foreach (string email in inactivatedEmails) { ISingleResult <prcGetPeriodicReportListOnInactivateEmailResult> result = prl.prcGetPeriodicReportListOnInactivateEmail(OrgID, email); var qry = from pr in result.AsQueryable <prcGetPeriodicReportListOnInactivateEmailResult>() select pr; InactiveSchedules.AddRange(qry.ToList <prcGetPeriodicReportListOnInactivateEmailResult>()); } var query = InactiveSchedules.AsQueryable <prcGetPeriodicReportListOnInactivateEmailResult>(); //sort query = SelectAllReportsSortEmails(query, sSortType); // paginate query = query.Skip(iBeginRowIndex).Take(iMaximumRows); return(query.ToList()); }