コード例 #1
0
ファイル: HomeController.cs プロジェクト: SangDD/Legaltech
        public ActionResult Findorders(string keysSearch, string _sortype, int _reconpage, int p_CurrentPage)
        {
            decimal _total_record = 0;
            string  p_to          = "";
            string  p_from        = CommonFuc.Get_From_To_Page(p_CurrentPage, ref p_to, _reconpage);

            _sortype = " ORDER BY " + _sortype;
            if (string.IsNullOrEmpty(_sortype) || _sortype.Trim() == "ORDER BY")
            {
                _sortype = "ALL";
            }
            string htmlPaging = "";

            try
            {
                string     language = WebApps.CommonFunction.AppsCommon.GetCurrentLang();
                B_Todos_BL _obj_bl  = new B_Todos_BL();
                keysSearch = B_Todo.TypeRequest + "|" + SessionData.CurrentUser.Username;
                List <B_Todos_Info> _lst = _obj_bl.B_Todos_Search(keysSearch, ref _total_record, p_from, p_to, _sortype);
                htmlPaging        = WebApps.CommonFunction.AppsCommon.Get_HtmlPaging <B_Todos_Info>((int)_total_record, p_CurrentPage, language.Contains("VN") ? "nội dung" : "content", _reconpage, "OrderjsPaging");
                ViewBag.Paging    = htmlPaging;
                ViewBag.Obj       = _lst;
                ViewBag.SumRecord = _total_record;

                var _TodoData = AppsCommon.RenderRazorViewToString(this.ControllerContext, "~/Areas/Home/Views/Shared/_OrderData.cshtml");
                return(Json(new { TodoData = _TodoData }));

                //return Json(new { TodoData = RenderPartialToString("~/Areas/Home/Views/Shared/_OrderData.cshtml", null), TodoNotify = p_todonotify });
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
            }
            return(null);
        }
コード例 #2
0
        public ActionResult Find(string keysSearch, string _sortype, int _reconpage, int p_CurrentPage)
        {
            decimal _total_record = 0;
            string  p_to          = "";
            string  p_from        = CommonFuc.Get_From_To_Page(p_CurrentPage, ref p_to, _reconpage);

            _sortype = " ORDER BY " + _sortype;
            if (string.IsNullOrEmpty(_sortype) || _sortype.Trim() == "ORDER BY")
            {
                _sortype = "ALL";
            }
            string htmlPaging = "";

            try
            {
                B_Todos_BL _obj_bl = new B_Todos_BL();
                keysSearch = B_Todo.TypeProcess + "|" + SessionData.CurrentUser.Username;
                List <B_Todos_Info> _lst = _obj_bl.B_Todos_Search(keysSearch, ref _total_record, p_from, p_to, _sortype);
                htmlPaging        = WebApps.CommonFunction.AppsCommon.Get_HtmlPaging <B_Todos_Info>((int)_total_record, p_CurrentPage, "Nội dung", _reconpage, "TodojsPaging");
                ViewBag.Paging    = htmlPaging;
                ViewBag.Obj       = _lst;
                ViewBag.SumRecord = _total_record;

                var _TodoData = AppsCommon.RenderRazorViewToString(this.ControllerContext, "~/Areas/Home/Views/Shared/_TodoData.cshtml");
                return(Json(new { TodoData = _TodoData }));
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
            }
            return(null);
        }