コード例 #1
0
        public List <WaliTest> GetProjectDasboardDetails(string id, string mTaskSlno, string id5, string categorisation, string service)
        {
            List <WaliTest> Mmodel           = new List <WaliTest>();
            DateTime        mdate            = Convert.ToDateTime("2020-01-01");
            SqlParameter    param1           = new SqlParameter("@taskid", id);
            SqlParameter    param2           = new SqlParameter("@stageid", mTaskSlno);
            SqlParameter    param3           = new SqlParameter("@Type", id5);
            SqlParameter    param4           = new SqlParameter("@Date", mdate);
            SqlParameter    param5           = new SqlParameter("@categorisation", categorisation);
            SqlParameter    param6           = new SqlParameter("@service", service);
            var             _isUserExdfxists = _entities.Database.SqlQuery <temp_dashboardproject>("exec PROC_PRODUCT_DESCRITPTION @taskid,@stageid,@Type,@Date,@categorisation,@service ", param1, param2, param3, param4, param5, param6).ToList();

            if (_isUserExdfxists != null)
            {
                foreach (temp_dashboardproject item in _isUserExdfxists)
                {
                    WaliTest list = new WaliTest
                    {
                        ProjectId     = Convert.ToInt32(item.ProjectId),
                        ProjectName   = item.item_description,
                        Template_type = item.categorisation,
                        StartDate     = Convert.ToDateTime(item.AoNDate),
                        AoNDate       = Convert.ToDateTime(item.AoNDate),
                        service       = item.service,
                        scheduled_date_of_completion = Convert.ToDateTime(item.scheduled_date_of_completion),
                        actual_no_of_days            = item.actual_no_of_days,
                        scheduled_no_of_days         = item.scheduled_no_of_days,
                        percent_delay = Convert.ToInt32(item.percent_delay),
                    };
                    Mmodel.Add(list);
                }
            }

            return(Mmodel);
        }
コード例 #2
0
        public JsonResult GetProjectDasboardDetails(string id, string mTaskSlno, string id5, string Categorisation, string Service_Lead_Service)
        {
            List <WaliTest>        list  = new List <WaliTest>();
            IEnumerable <WaliTest> Badge = null;

            if (ModelState.IsValid)
            {
                try
                {
                    Badge = mService.GetProjectDasboardDetails(id, mTaskSlno, id5, Categorisation, Service_Lead_Service);
                    foreach (WaliTest item in Badge)
                    {
                        WaliTest obj = new WaliTest
                        {
                            ProjectId      = item.ProjectId,
                            ProjectName    = Cipher.Decrypt(item.ProjectName, password),
                            Template_type  = item.Template_type,
                            StartDate      = item.StartDate,
                            AoNDate        = Convert.ToDateTime(item.AoNDate.ToString("dd-MMM-yyyy")),
                            CreatedBy      = item.CreatedBy,
                            IsActive       = item.IsActive,
                            categorisation = item.Template_type,
                            service        = item.service,
                            scheduled_date_of_completion = item.scheduled_date_of_completion,
                            actual_no_of_days            = item.actual_no_of_days,
                            scheduled_no_of_days         = item.scheduled_no_of_days,
                            percent_delay = item.percent_delay,
                        };
                        list.Add(obj);
                    }
                }
                catch (Exception ex)
                {
                    ex.Message.ToString();
                }
            }
            return(Json(new { data = list }, JsonRequestBehavior.AllowGet));
        }