Exemple #1
0
        //not being used?
        public ActionResult GetAllClient(jQueryDataTableParamModel param)
        {
            int filterStatus = 0;
            //int totalRecords = 0;

            if (Request["status"] != null && Request["status"] != string.Empty)
                filterStatus = Convert.ToInt32(Request["status"]);

            var filter = new dtoClient
            {
                clientCode = Request["clientCode"],
                clientName = Request["clientName"],
                clientContactNumber = Request["clientContactNumber"],
                clientContactPerson = Request["clientContactPerson"],
                status = filterStatus
            };

            //var list = serviceClientAccount.GetAllSuppliers(filter, param.iDisplayStart, param.iDisplayLength);
            //totalRecords = serviceClientAccount.GetRecordCount(filter);

            //int count = list.Count();

            return Json(new
            {
                //sEcho = param.sEcho,
                //iTotalRecords = totalRecords,
                //iTotalDisplayRecords = totalRecords,
                //aaData = list
            }
            , JsonRequestBehavior.AllowGet);
        }
        public ActionResult GetAllUsers_old(jQueryDataTableParamModel param)
        {
            var filter = new dtoUserAccount
            {
                userId = Request["userId"] == "" ? 0 : Convert.ToInt32( Request["userId"]),
                firstName = Request["firstname"],
                lastName = Request["lastname"],
                emailAddress = Request["emailAddress"],
                userName = Request["userName"],
                branchId =  Request["branchId"] == "" ? 0 : Convert.ToInt32(Request["branchId"])
            };

            var list = serviceUserAccount.GetAllUsers(param.sSearch ?? "", filter);

            int count = list.Count();

            return Json(new
            {
                param.sEcho,
                iTotalRecords = count,
                iTotalDisplayRecords = 10,
                aaData = list
            }
            , JsonRequestBehavior.AllowGet);
        }