protected void Page_Load(object sender, EventArgs e) { thisBookMark = new IndexBLL().GetSingBook(Request.Url.LocalPath, LoginUserId); const string proLimitJson = "{\"row\":\"7\",\"t1\":\"p\",\"col1\":\"0\",\"col2\":\"0\"}"; var projectLimitSql = Convert.ToString(ppDal.GetSingle($"select f_rpt_getsql_limit('{proLimitJson}',{LoginUserId.ToString()})")); myProjectList = ppDal.FindListBySql <pro_project>($"SELECT p.id,p.name from pro_project p where p.delete_time = 0 and p.owner_resource_id = {LoginUserId.ToString()} and p.status_id not in(1345,1352) " + projectLimitSql); // myTeamProjectList = ppDal.FindListBySql <pro_project>($"SELECT DISTINCT p.id,p.name from pro_project p INNER JOIN pro_project_team ppt on p.id =ppt.project_id where p.delete_time =0 and ppt.delete_time = 0 and ppt.resource_id ={LoginUserId.ToString()} and p.status_id not in(1345,1352) " + projectLimitSql); myDepProjectList = ppDal.FindListBySql <pro_project>($"SELECT p.id,p.name from pro_project p where p.delete_time = 0 and p.owner_resource_id = {LoginUserId.ToString()} and p.status_id not in(1345,1352) and p.department_id in ( SELECT DISTINCT department_id from sys_resource_department) " + projectLimitSql); // SELECT DISTINCT owner_resource_id from pro_project where delete_time =0 and owner_resource_id is not NULL var priResIds = ppDal.GetRes($"SELECT DISTINCT owner_resource_id from pro_project p where p.delete_time =0 and p.owner_resource_id is not NULL " + projectLimitSql); var otherIds = ppDal.GetRes($"SELECT DISTINCT ppt.resource_id from pro_project p INNER JOIN pro_project_team ppt on p.id =ppt.project_id where p.delete_time =0 and ppt.delete_time = 0 and ppt.resource_id is not null " + projectLimitSql); string ids = string.Empty; if (priResIds != null && priResIds.Count > 0) { priResIds.ForEach(_ => { ids += _.ToString() + ','; }); } if (otherIds != null && otherIds.Count > 0) { otherIds.ForEach(_ => { ids += _.ToString() + ','; }); } if (!string.IsNullOrEmpty(ids)) { ids = ids.Substring(0, ids.Length - 1); resList = new DAL.sys_resource_dal().GetListByIds(ids); if (resList != null && resList.Count > 0) { resList = resList.Distinct().ToList(); } } openIssueCount = Convert.ToInt32(ppDal.GetSingle("SELECT count(1) from sdk_task st INNER join pro_project p on st.project_id = p.id where st.delete_time = 0 and p.delete_time = 0 and st.is_project_issue=1 and st.status_id <> 1894 and p.status_id <> 1352 ")); }
protected void Page_Load(object sender, EventArgs e) { try { var chooseDateString = Request.QueryString["chooseDate"]; if (!string.IsNullOrEmpty(chooseDateString)) { chooseDate = DateTime.Parse(chooseDateString); } user = UserInfoBLL.GetUserInfo(GetLoginUserId()); if (!string.IsNullOrEmpty(Request.QueryString["isSeven"])) { isSeven = true; } if (!string.IsNullOrEmpty(Request.QueryString["isShowDetai"])) { isShowDetai = true; } var id = Request.QueryString["id"]; if (!string.IsNullOrEmpty(id)) { thisProject = new pro_project_dal().FindNoDeleteById(long.Parse(id)); if (thisProject != null) { taskList = new sdk_task_dal().GetProTask(thisProject.id, " and type_id in (1807,1808,1812)"); proCalList = new pro_project_calendar_dal().GetCalByPro(thisProject.id); } } if (!string.IsNullOrEmpty(Request.QueryString["isAll"])) { isAll = true; } if (isAll) { taskList = new sdk_task_dal().FindListBySql($"select* from sdk_task where delete_time = 0 and type_id in (1807,1808,1812)"); var ppDal = new DAL.pro_project_dal(); proCalList = new pro_project_calendar_dal().FindListBySql($"SELECT * from pro_project_calendar where delete_time = 0"); const string proLimitJson = "{\"row\":\"7\",\"t1\":\"p\",\"col1\":\"0\",\"col2\":\"0\"}"; var projectLimitSql = Convert.ToString(ppDal.GetSingle($"select f_rpt_getsql_limit('{proLimitJson}',{LoginUserId.ToString()})")); projectList = ppDal.FindListBySql("select* from pro_project p where p.delete_time =0 " + projectLimitSql); } } catch (Exception msg) { Response.End(); } }