예제 #1
0
        public List <WReports> GetReportGridOnClickChart(string TaskDescription)
        {
            List <WReports> Mmodel1 = new List <WReports>();
            IEnumerable <ChartReportOnClick> Chart = null;

            Chart = _entities.ChartReportOnClicks.OrderBy(x => x.Service_Lead_Service).Where(x => x.TaskDescription == TaskDescription).ToList();
            if (Chart != null)
            {
                foreach (ChartReportOnClick item in Chart)
                {
                    WReports list = new WReports
                    {
                        Pkey                  = item.Pkey,
                        TaskDescription       = item.TaskDescription,
                        Service_Lead_Service  = item.Service_Lead_Service,
                        item_description      = Cipher.Decrypt(item.item_description, password),
                        Date_of_Accord_of_AoN = item.Date_of_Accord_of_AoN,
                        Cost                  = item.Cost,
                        Categorisation        = item.Categorisation,
                        IC_percentage         = item.IC_percentage,
                        Trials_Required       = item.Trials_Required,
                    };
                    Mmodel1.Add(list);
                }
            }
            return(Mmodel1);
        }
예제 #2
0
        public List <WReports> GetReportGrid1()
        {
            List <WReports> Mmodel1 = new List <WReports>();
            IEnumerable <TimeLineReport1> _isUserExdfxists = null;

            _isUserExdfxists = _entities.TimeLineReport1.ToList();
            if (_isUserExdfxists != null)
            {
                foreach (TimeLineReport1 item in _isUserExdfxists)
                {
                    WReports list = new WReports
                    {
                        Pkey = item.Pkey,
                        Service_Lead_Service  = item.Service_Lead_Service,
                        item_description      = Cipher.Decrypt(item.item_description, password),
                        Date_of_Accord_of_AoN = item.Date_of_Accord_of_AoN,
                        Cost            = item.Cost,
                        Categorisation  = item.Categorisation,
                        IC_percentage   = item.IC_percentage,
                        Trials_Required = item.Trials_Required,
                        TaskDescription = item.TaskDescription,
                        completed_on    = Convert.ToDateTime(item.completed_on),
                        no_of_weeks     = item.no_of_weeks,
                        dap_timeline    = item.dap_timeline,
                        TaskSlno        = Convert.ToDecimal(item.TaskSlno),
                    };
                    Mmodel1.Add(list);
                }
            }
            return(Mmodel1);
        }
예제 #3
0
        public JsonResult GetTable(string id)
        {
            List <WReports>        list  = new List <WReports>();
            IEnumerable <WReports> Badge = null;
            string query = "SELECT ISNULL(ROW_NUMBER() OVER (ORDER BY @@identity), - 1) AS Pkey, Service_Lead_Service, " +
                           " item_description, Date_of_Accord_of_AoN, Cost, Categorisation, IC_percentage, Trials_Required, TaskDescription, " +
                           " ISNULL(completed_on,null) as completed_on, ISNULL(no_of_weeks,'') as no_of_weeks, dap_timeline, TaskSlno" +
                           " FROM acq_project_status_timelines g" +
                           " WHERE g.aon_id ='" + id + "'";
            DataTable dt = return_datatable(query);

            Badge = dt.AsEnumerable().Select(x => new WReports
            {
                Pkey = x.Field <long>("Pkey"),
                Service_Lead_Service  = x.Field <string>("Service_Lead_Service"),
                item_description      = (Cipher.Decrypt(x.Field <string>("item_description"), password)).ToString(),
                Date_of_Accord_of_AoN = x.Field <DateTime>("Date_of_Accord_of_AoN"),
                Cost            = x.Field <string>("Cost"),
                Categorisation  = x.Field <string>("Categorisation"),
                IC_percentage   = x.Field <string>("IC_percentage"),
                Trials_Required = x.Field <string>("Trials_Required"),
                TaskDescription = x.Field <string>("TaskDescription"),
                completed_on    = x.Field <Nullable <DateTime> >("completed_on"),
                no_of_weeks     = x.Field <int>("no_of_weeks"),
                dap_timeline    = x.Field <string>("dap_timeline"),
                TaskSlno        = x.Field <decimal>("TaskSlno"),
            });
            foreach (WReports item in Badge)
            {
                WReports obj = new WReports
                {
                    Pkey = item.Pkey,
                    Service_Lead_Service  = item.Service_Lead_Service,
                    item_description      = item.item_description,
                    Date_of_Accord_of_AoN = item.Date_of_Accord_of_AoN,
                    Cost            = item.Cost,
                    Categorisation  = item.Categorisation,
                    IC_percentage   = item.IC_percentage,
                    Trials_Required = item.Trials_Required,
                    TaskDescription = item.TaskDescription,
                    completed_on    = item.completed_on,
                    no_of_weeks     = item.no_of_weeks,
                    dap_timeline    = item.dap_timeline,
                    TaskSlno        = item.TaskSlno,
                };
                list.Add(obj);
            }

            return(Json(new { data = list }, JsonRequestBehavior.AllowGet));
        }