Beispiel #1
0
        public void ProcessRequest(HttpContext context)
        {
            int?          ProjectID = 0, UserID = 0;
            ManageManager _ManageManager = new ManageManager();

            System.Collections.Specialized.NameValueCollection forms = context.Request.Form;
            HttpRequest  request  = context.Request;
            HttpResponse response = context.Response;

            string strOperation   = forms.Get("oper");
            string _search        = request["_search"];
            string textSearch     = request["txtSearch"] ?? "";
            int?   numberOfRows   = Convert.ToInt32(request["rows"]);
            int?   pageIndex      = Convert.ToInt32(request["page"]);
            string sortColumnName = request["sidx"];
            string sortOrderBy    = request["sord"];

            if (request["ProjectID"] != "")
            {
                ProjectID = Convert.ToInt32(request["ProjectID"]);
                //obj_StaffUserBusiness.Deleteuser(id);
            }
            if (request["UserID"] != "")
            {
                UserID = Convert.ToInt32(request["UserID"]);
                //obj_StaffUserBusiness.Deleteuser(id);
            }
            ObjectParameter paramTotalRecords = new ObjectParameter("TotalRecords", typeof(int));
            var             WorkRequestList   = _ManageManager.GetAllWorkRequest(ProjectID, UserID, "GetAllWorkRequest", pageIndex, numberOfRows, sortColumnName, sortOrderBy, textSearch, paramTotalRecords);
            string          output            = BuildJQGridResults(WorkRequestList, Convert.ToInt32(numberOfRows), Convert.ToInt32(pageIndex), Convert.ToInt32(paramTotalRecords.Value));

            response.Write(output);
        }
Beispiel #2
0
        public void ProcessRequest(HttpContext context)
        {
            int           ProjectID      = 0;
            bool          pdf            = false;
            ManageManager _ManageManager = new ManageManager();

            System.Collections.Specialized.NameValueCollection forms = context.Request.Form;
            HttpRequest  request  = context.Request;
            HttpResponse response = context.Response;

            string strOperation   = forms.Get("oper");
            string _search        = request["_search"];
            string textSearch     = request["txtSearch"] ?? "";
            int?   numberOfRows   = Convert.ToInt32(request["rows"]);
            int?   pageIndex      = Convert.ToInt32(request["page"]);
            string sortColumnName = request["sidx"];
            string sortOrderBy    = request["sord"];

            if (Convert.ToInt32(request["ProjectID"]) != 0)
            {
                ProjectID = Convert.ToInt32(request["ProjectID"]);
                pdf       = Convert.ToBoolean(request["pdf"]);
                //obj_StaffUserBusiness.Deleteuser(id);
            }
            int             InventoryType     = Convert.ToInt32(request["InventoryType"]) == 0 ? 196 : Convert.ToInt32(request["InventoryType"]);
            int             ItemOwn           = Convert.ToInt32(request["ItemOwn"]);
            ObjectParameter paramTotalRecords = new ObjectParameter("TotalRecords", typeof(int));
            var             InventoryList     = _ManageManager.GetAllInventory(ProjectID, "GetAllInventory", pageIndex, numberOfRows, sortColumnName, sortOrderBy, textSearch, InventoryType, ItemOwn, paramTotalRecords);

            if (InventoryList.Count() > 0)
            {
                string output = BuildJQGridResults(InventoryList, Convert.ToInt32(numberOfRows), Convert.ToInt32(pageIndex), Convert.ToInt32(paramTotalRecords.Value));

                response.Write(output);
            }
            else
            {
                JQGridResults    result = new JQGridResults();
                List <JQGridRow> rows   = new List <JQGridRow>();
                result.rows    = rows.ToArray();
                result.page    = 0;
                result.total   = 0;
                result.records = 0;
                response.Write(new JavaScriptSerializer().Serialize(result));
            }
        }
        public void ProcessRequest(HttpContext context)
        {
            int           userid         = 0;
            ManageManager _ManageManager = new ManageManager();

            System.Collections.Specialized.NameValueCollection forms = context.Request.Form;
            HttpRequest  request  = context.Request;
            HttpResponse response = context.Response;

            string strOperation   = forms.Get("oper");
            string _search        = request["_search"];
            string textSearch     = request["txtSearch"] ?? "";
            int?   numberOfRows   = Convert.ToInt32(request["rows"]);
            int?   pageIndex      = Convert.ToInt32(request["page"]);
            string sortColumnName = request["sidx"];
            string sortOrderBy    = request["sord"];

            if (Convert.ToInt32(request["id"]) != 0)
            {
                long?id = Convert.ToInt32(request["id"]);
                //obj_StaffUserBusiness.Deleteuser(id);
            }
            ObjectParameter paramTotalRecords = new ObjectParameter("TotalRecords", typeof(int));
            var             EmployeeList      = _ManageManager.GetAllVerfiedEmployee(userid, "GetAllVerfiedEmployee", pageIndex, numberOfRows, sortColumnName, sortOrderBy, textSearch, paramTotalRecords);

            if (EmployeeList.Count() > 0)
            {
                string output = BuildJQGridResults(EmployeeList, Convert.ToInt32(numberOfRows), Convert.ToInt32(pageIndex), Convert.ToInt32(paramTotalRecords.Value));
                response.Write(output);
            }
            else
            {
                JQGridResults    result = new JQGridResults();
                List <JQGridRow> rows   = new List <JQGridRow>();
                result.rows    = rows.ToArray();
                result.page    = 0;
                result.total   = 0;
                result.records = 0;
                response.Write(new JavaScriptSerializer().Serialize(result));
            }
        }