Пример #1
0
        public JsonResult ToSingle(string Filter, string Value)

        {
            PM_ProjectBL         pd = new PM_ProjectBL();
            PM_GazetteHolidaysBL gh = new PM_GazetteHolidaysBL();
            PM_TaskStagesBL      pM_TaskStagesBL = new PM_TaskStagesBL();
            var rec = pd.ToSingle(Filter, Value);

            if (Value != "0")
            {
                var ghh = gh.ToList("ByProjectId", Value);
                if (ghh.Count > 0)
                {
                    rec.GH = ghh;
                }
                var obj = pM_TaskStagesBL?.ToList("GetByProjectId", long.Parse(Value));
                if (obj.Count > 0)
                {
                    rec.TS = obj;
                }
            }



            //  rec.TS = pM_TaskStagesBL?.ToList("GetByProjectId", long.Parse(Value));
            return(Json(rec, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public JsonResult Details(Int64 Id, string Key)
        {
            PM_ProjectBL pd      = new PM_ProjectBL();
            var          Project = pd.ToSingle("ByProjectId", Id.ToString());

            AD_DefinationBL db            = new AD_DefinationBL();
            var             ProjectStatus = db.ToList("byDefinationType", "Project Status");
            Int64           UserId        = ViewBag.UserId;
            var             UserScopes    = db.ToList("UserScopes", UserId.ToString());
            var             Priorities    = db.ToList("byDefinationType", "Priority");
            var             FormTypes     = db.ToList("byDefinationType", "FormType");
            var             TaskTypes     = db.ToList("byDefinationType", "Task Types");
            Sec_UserBL      ud            = new Sec_UserBL();
            List <Sec_User> Users         = ud.ToList("ByProjectId", Id.ToString());

            Users = Users.Select(c => { c.Password = ""; return(c); }).ToList();

            return(Json(new { Project = Project, ProjectStatus = ProjectStatus, UserScopes = UserScopes
                              , Priorities = Priorities, FormTypes = FormTypes, Users = Users, TaskTypes = TaskTypes }, JsonRequestBehavior.AllowGet));
        }