コード例 #1
0
 private void GetDormRoomDataPage(HttpContext context)
 {
     try
     {
         Hashtable ht = new Hashtable();
         ht.Add("Name", context.Request["Name"] ?? "");
         ht.Add("BuildId", context.Request["BuildId"] ?? "");
         ht.Add("IsDelete", context.Request["IsDelete"] ?? "0");
         ht.Add("Id", context.Request["Id"] ?? "");
         ht.Add("IsOnlyBase", context.Request["IsOnlyBase"] ?? "0"); //是否只需要表中基本信息 0是(默认);1不是
         bool ispage = true;
         if (!string.IsNullOrEmpty(context.Request["ispage"]))
         {
             ispage = Convert.ToBoolean(context.Request["ispage"]);
         }
         ht.Add("PageIndex", context.Request["PageIndex"] ?? "1");
         ht.Add("PageSize", context.Request["PageSize"] ?? "10");
         jsonModel = bll.GetPage(ht, ispage);
         string isUnifiedInfo = context.Request["IsUnifiedInfo"] ?? "0";//是否需要用户信息 0不需要(默认);1需要
         if (isUnifiedInfo != "0")
         {
             jsonModel = nameCommon.AddCreateNameForData(jsonModel, 4, ispage, "ManagerNo", "", "CreateUID");
         }
     }
     catch (Exception ex)
     {
         jsonModel = new JsonModel()
         {
             errNum  = 400,
             errMsg  = ex.Message,
             retData = ""
         };
         LogService.WriteErrorLog(ex.Message);
     }
 }
コード例 #2
0
        /// <summary>
        /// 获得设备详情信息
        /// </summary>
        /// <returns></returns>

        public void GetEquipDetail(HttpContext context)
        {
            string    callback = context.Request["jsoncallback"];
            Hashtable ht       = new Hashtable();

            ht.Add("Id", context.Request["Id"].ToString());

            EmsModel.JsonModel Model = BLLED.GetEquipDetail(ht);
            Model = nameCommon.AddCreateNameForData(Model, 4, "Creator", "", "Editor");
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();
            //jss.Serialize(ModelPlan);

            context.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})");
            context.Response.End();
        }
コード例 #3
0
        /// <summary>
        /// 获得荣誉列表
        /// </summary>
        /// <returns></returns>

        public void GetPage(HttpContext context)
        {
            string    callback = context.Request["jsoncallback"];
            Hashtable ht       = new Hashtable();

            ht.Add("Name", context.Request["Name"].ToString());
            ht.Add("HonorLevel", context.Request["HonorLevel"].ToString());
            ht.Add("ExperimentName", context.Request["ExperimentName"].ToString());
            ht.Add("IsDelete", context.Request["Filing"].ToString());
            ht.Add("Creator", context.Request["Creator"].ToString());
            if (context.Request["UserRoleID"] != null)
            {
                ht.Add("RoleID", context.Request["UserRoleID"].ToString());
            }
            ht.Add("AdminRoleID", System.Configuration.ConfigurationManager.ConnectionStrings["AdminRoleID"].ToString());
            ht.Add("PageIndex", context.Request["PageIndex"].ToString());
            ht.Add("PageSize", context.Request["PageSize"].ToString());

            EmsModel.JsonModel Model = BllHonor.GetPage(ht);
            Model = nameCommon.AddCreateNameForData(Model, 4, "Creator", "", "Editor");
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();
            //jss.Serialize(ModelPlan);

            context.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})");
            context.Response.End();
        }
コード例 #4
0
        /// <summary>
        /// 获取分页数据
        /// </summary>
        /// <param name="context"></param>
        private void GetDowDetail(HttpContext context)
        {
            GetUserNameHandler   common    = new GetUserNameHandler();
            ClickDetailService   Clickbll  = new ClickDetailService();
            string               result    = "";
            JsonModel            jsonModel = null;
            JavaScriptSerializer jss       = new System.Web.Script.Serialization.JavaScriptSerializer();

            try
            {
                ResourcesInfo resource = new ResourcesInfo();
                Hashtable     ht       = new Hashtable();
                ht.Add("PageIndex", context.Request["PageIndex"].SafeToString());
                ht.Add("PageSize", context.Request["PageSize"].SafeToString());

                jsonModel = common.AddCreateNameForData(Clickbll.GetPage(ht, true), 1, true);

                //result = "{\"result\":" + jss.Serialize(jsonModel) + "}";
            }
            catch (Exception ex)
            {
                jsonModel = new JsonModel()
                {
                    errNum  = 400,
                    errMsg  = ex.Message,
                    retData = ""
                };
                LogService.WriteErrorLog(ex.Message);
            }
            result = "{\"result\":" + jss.Serialize(jsonModel) + "}";
            context.Response.Write(result);
            context.Response.End();
        }
コード例 #5
0
        public void RepairList(HttpContext context)
        {
            string    callback = context.Request["jsoncallback"];
            Hashtable ht       = new Hashtable();

            ht.Add("Name", context.Request["name"] ?? "");
            ht.Add("RepairMan", context.Request["IDCard"] ?? "");
            ht.Add("EQtype", context.Request["EQtype"] ?? "");
            ht.Add("PageIndex", context.Request["PageIndex"] ?? "1");
            ht.Add("PageSize", context.Request["PageSize"] ?? "10");
            bool ispage = true;

            if (!string.IsNullOrEmpty(context.Request["ispage"]))
            {
                ispage = Convert.ToBoolean(context.Request["ispage"]);
            }
            EmsModel.JsonModel repMod = new EmsBLL.OrderInfo().GetJsonModel_RepairLists(ht, ispage);
            repMod = nameCommon.AddCreateNameForData(repMod, 4, "RepairMan", "", "", context.Request["userName"] ?? "");
            //序列化
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();

            //输出Json
            HttpContext.Current.Response.Write(callback +
                                               "({\"result\":" + jss.Serialize(repMod) + "})");

            HttpContext.Current.Response.End();
        }
コード例 #6
0
 private void GetComFavoritesDataPage(HttpContext context)
 {
     try
     {
         Hashtable ht = new Hashtable();
         ht.Add("Name", context.Request["Name"] ?? "");
         ht.Add("Type", context.Request["Type"] ?? "0");
         ht.Add("RelationId", context.Request["RelationId"] ?? "");
         ht.Add("CreateUID", context.Request["CreateUID"] ?? "");
         bool ispage = true;
         if (!string.IsNullOrEmpty(context.Request["ispage"]))
         {
             ispage = Convert.ToBoolean(context.Request["ispage"]);
         }
         ht.Add("PageIndex", context.Request["PageIndex"] ?? "1");
         ht.Add("PageSize", context.Request["PageSize"] ?? "10");
         jsonModel = bll.GetPage(ht, ispage);
         string isUnifiedInfo = context.Request["IsUnifiedInfo"] ?? "0";//是否需要用户信息 0不需要(默认);1需要
         if (isUnifiedInfo != "0")
         {
             jsonModel = nameCommon.AddCreateNameForData(jsonModel, 4, ispage);
         }
     }
     catch (Exception ex)
     {
         jsonModel = new JsonModel()
         {
             errNum  = 400,
             errMsg  = ex.Message,
             retData = ""
         };
         LogService.WriteErrorLog(ex.Message);
     }
 }
コード例 #7
0
        /// <summary>
        /// 获得实验列表
        /// </summary>
        /// <returns></returns>

        public void GetPage(HttpContext context)
        {
            string    callback = context.Request["jsoncallback"];
            Hashtable ht       = new Hashtable();

            if (context.Request["PlanId"] != null)
            {
                ht.Add("PlanId", context.Request["PlanId"].ToString());
            }
            if (context.Request["Name"] != null)
            {
                ht.Add("Name", context.Request["Name"].ToString());
            }
            if (context.Request["IsDelete"] != null)
            {
                ht.Add("IsDelete", context.Request["IsDelete"].ToString());
            }
            if (context.Request["PageIndex"] != null)
            {
                ht.Add("PageIndex", context.Request["PageIndex"].ToString());
            }
            else
            {
                ht.Add("PageIndex", 1);
            }
            if (context.Request["PageSize"] != null)
            {
                ht.Add("PageSize", context.Request["PageSize"].ToString());
            }
            else
            {
                ht.Add("PageSize", 10);
            }

            EmsModel.JsonModel Model = BllExperiment.GetPage(ht);
            Model = nameCommon.AddCreateNameForData(Model, 4, "Creator", "", "Editor");
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();
            //jss.Serialize(ModelPlan);

            context.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})");
            context.Response.End();
        }
コード例 #8
0
        public void GetInvenListDataPage(HttpContext context)
        {
            string    callback = context.Request["jsoncallback"];
            Hashtable ht       = new Hashtable();

            if (!string.IsNullOrEmpty(context.Request["PlanId"])) //盘点Id
            {
                ht.Add("PlanId", context.Request["PlanId"].ToString());
            }
            if (!string.IsNullOrEmpty(context.Request["IsRoomGroup"])) //是否根据房间分组
            {
                ht.Add("IsRoomGroup", context.Request["IsRoomGroup"].ToString());
            }
            if (!string.IsNullOrEmpty(context.Request["RoomId"])) //房间Id
            {
                ht.Add("RoomId", context.Request["RoomId"].ToString());
            }
            if (!string.IsNullOrEmpty(context.Request["serisloss"])) //是否拟盘亏
            {
                ht.Add("serisloss", context.Request["serisloss"].ToString());
            }
            if (!string.IsNullOrEmpty(context.Request["equipsource"])) //设备来源
            {
                ht.Add("equipsource", context.Request["equipsource"].ToString());
            }
            if (!string.IsNullOrEmpty(context.Request["assetname"])) //资产名称
            {
                ht.Add("assetname", context.Request["assetname"].ToString());
            }
            if (!string.IsNullOrEmpty(context.Request["type"])) //盘点类型
            {
                ht.Add("type", context.Request["type"].ToString());
            }
            bool isPage = true;

            if (!string.IsNullOrEmpty(context.Request["ispage"])) //是否分页
            {
                isPage = false;
            }
            string pageIndex = context.Request["PageIndex"];
            string pageSize  = context.Request["PageSize"];

            ht.Add("PageIndex", pageIndex != null ? pageIndex.ToString() : "1");
            ht.Add("PageSize", pageSize != null ? pageSize.ToString() : "10");
            //序列化
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();
            EmsModel.JsonModel mod = isPage ? new EmsBLL.InventoryList().GetInvenListDataPage(ht) : new EmsBLL.InventoryList().ExportInventoryExcel(ht);
            mod = nameCommon.AddCreateNameForData(mod, 4, "OwnerUID", "", "OperatorUID");
            //输出Json
            HttpContext.Current.Response.Write(callback + "({\"result\":" + jss.Serialize(mod) + "})");
            HttpContext.Current.Response.End();
        }
コード例 #9
0
        public void GetJsonModelByEquipId(HttpContext context)
        {
            string    callback = context.Request["jsoncallback"];
            Hashtable ht       = new Hashtable();

            ht.Add("EquipId", context.Request["EquipId"] ?? "");
            ht.Add("PageIndex", context.Request["PageIndex"] ?? "1");
            ht.Add("PageSize", context.Request["PageSize"] ?? "10");
            bool ispage = true;

            if (!string.IsNullOrEmpty(context.Request["ispage"]))
            {
                ispage = Convert.ToBoolean(context.Request["ispage"]);
            }
            //序列化
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();
            EmsModel.JsonModel mod = new EmsBLL.EquipDetail().GetJsonModelByEquipId(ht, ispage);
            mod = nameCommon.AddCreateNameForData(mod, 4, "UserIDCard", "", "", context.Request["Name"] ?? "");
            //输出Json
            HttpContext.Current.Response.Write(callback + "({\"result\":" + jss.Serialize(mod) + "})");
            HttpContext.Current.Response.End();
        }
コード例 #10
0
        /// <summary>
        /// 获得教学计划列表
        /// </summary>
        /// <returns></returns>
        public void GetPage(HttpContext context)
        {
            string    callback = context.Request["jsoncallback"];
            Hashtable ht       = new Hashtable();

            if (context.Request["PIds"] != null)
            {
                ht.Add("PIds", context.Request["PIds"]);
            }
            if (context.Request["Date"] != null)
            {
                ht.Add("Date", context.Request["Date"]);
            }
            //课程名称
            if (context.Request["Name"] != null)
            {
                ht.Add("Name", context.Request["Name"].ToString());
            }
            //实验名称
            if (context.Request["EName"] != null)
            {
                ht.Add("EName", context.Request["EName"].ToString());
            }
            //学年学期
            if (context.Request["LearnYear"] != null)
            {
                ht.Add("LearnYear", context.Request["LearnYear"].ToString());
            }
            //是否删除
            if (context.Request["IsDelete"] != null)
            {
                //  ht.Add("IsDelete", context.Request["Filing"].ToString());
                ht.Add("IsDelete", context.Request["IsDelete"].ToString());
            }
            //ht.Add("StartDate", context.Request["StartDate"].ToString());
            //ht.Add("EndDate", context.Request["EndDate"].ToString());
            //创建人
            if (context.Request["Creator"] != null)
            {
                ht.Add("Creator", context.Request["Creator"].ToString());
            }
            //登录账号角色
            if (context.Request["UserRoleID"] != null)
            {
                ht.Add("RoleID", context.Request["UserRoleID"].ToString());
            }
            //第几页
            if (context.Request["PageIndex"] != null)
            {
                ht.Add("PageIndex", context.Request["PageIndex"].ToString());
            }
            else
            {
                ht.Add("PageIndex", "1");
            }
            //每页数量
            if (context.Request["PageSize"] != null)
            {
                ht.Add("PageSize", context.Request["PageSize"].ToString());
            }
            else
            {
                ht.Add("PageSize", "10");
            }

            ht.Add("AdminRoleID", System.Configuration.ConfigurationManager.ConnectionStrings["AdminRoleID"].ToString());
            EmsModel.JsonModel List = BllPlan.GetPage(ht);
            List = nameCommon.AddCreateNameForData(List, 4, "Creator", "", "", context.Request["Name"] ?? "", "LearnYear");
            System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer();
            //jss.Serialize(ModelPlan);

            HttpContext.Current.Response.Write(callback + "({\"result\":" + jss.Serialize(List) + "})");
            HttpContext.Current.Response.End();
        }