コード例 #1
0
        public string GetPlotLines(DateTime startDate, DateTime endDate)
        {
            IEnumerable <AdsStatisticsLabelsModel> lines = AdsStatisticsLabelDAO.GetItems(startDate, endDate);
            JavaScriptSerializer jss = new JavaScriptSerializer();

            return(jss.Serialize(lines));
        }
コード例 #2
0
        public ActionResult CustomLabelLineEdit(long?id)
        {
            AdsStatisticsLabelsModel item = null;

            if (id != null)
            {
                item = AdsStatisticsLabelDAO.GetItem((long)id);
                item.IsShowCustomLableLine = GetCustomLableCookie();
            }
            return(View(item));
        }
コード例 #3
0
 public ActionResult CustomLabelLineEdit(AdsStatisticsLabelsModel item)
 {
     if (item != null)
     {
         item.CreateTime = DateTime.Now;
         item.Creator    = MemberDAO.SysCurrent.Id;
         item.ModifyTime = DateTime.Now;
         item.Modifier   = MemberDAO.SysCurrent.Id;
     }
     AdsStatisticsLabelDAO.SetItem(item);
     //ViewBag.Exit = true;
     return(RedirectToAction("CustomLabelLine"));
 }
コード例 #4
0
        public ActionResult CustomLabelLine(int?index, AdsStatisticsLabelsSearchModel search)
        {
            bool IsShowLabelLine = GetCustomLableCookie();

            if (Request.HttpMethod == "GET")
            {
                if (index == null)
                {
                    WorkV3.Common.Utility.ClearSearchValue();
                }
                else
                {
                    AdsStatisticsLabelsSearchModel prevSearch = WorkV3.Common.Utility.GetSearchValue <AdsStatisticsLabelsSearchModel>();
                    if (prevSearch != null)
                    {
                        search = prevSearch;
                    }
                }
            }
            else if (Request.HttpMethod == "POST")
            {
                WorkV3.Common.Utility.SetSearchValue(search);
            }


            ViewBag.Search = search;

            Pagination pagination = new Pagination
            {
                PageIndex = index ?? 1,
                PageSize  = WebInfo.PageSize
            };

            int totalRecord;
            IEnumerable <AdsStatisticsLabelsModel> items = AdsStatisticsLabelDAO.GetItems(search, pagination.PageSize, pagination.PageIndex, out totalRecord);

            pagination.TotalRecord    = totalRecord;
            ViewBag.Pagination        = pagination;
            ViewBag.SelectCustomLabel = IsShowLabelLine;
            return(View(items));
        }
コード例 #5
0
 public ActionResult CustomLabelLineChangeStatus(int ID, bool ShowStatus)
 {
     AdsStatisticsLabelDAO.SetItemStatus(ID, ShowStatus);
     return(Json("success"));
 }