/// <summary> /// 添加荣誉 /// </summary> /// <returns>结果</returns> public void AddHonor(HttpContext context) { string callback = context.Request["jsoncallback"]; string Name = context.Request["Name"].ToString(); string Level = context.Request["Level"].ToString(); string ExperimentId = context.Request["ExperimentId"].ToString(); string Creator = context.Request["Creator"].ToString(); EmsModel.Honor ModelHonor = new EmsModel.Honor(); ModelHonor.Name = Name; //荣誉名称 ModelHonor.HonorLevel = Convert.ToInt32(Level); //级别 ModelHonor.ExperimentId = Convert.ToInt32(ExperimentId); //实验Id ModelHonor.Creator = Creator; //创建人登录名 ModelHonor.CreateTime = DateTime.Now; //创建时间 ModelHonor.IsDelete = 0; //是否删除 0未删除 EmsModel.JsonModel Model = BllHonor.AddHonor(ModelHonor); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(result); //输出Json context.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); context.Response.End(); }
/// <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(); }
public void saveContract(HttpContext context) { string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); ht.Add("ContractName", context.Request["name"]); ht.Add("ContractNumber", context.Request["number"]); ht.Add("Description", context.Request["desc"]); ht.Add("PartyB", context.Request["PartyB"]); ht.Add("Money", context.Request["Money"]); ht.Add("Creator", context.Request["Creator"]); ht.Add("Id", context.Request["Id"]); ht.Add("operator", context.Request["operator"]); string fileJson = context.Request["fileJson"]; string equipJson = context.Request["equipJson"]; System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); List <EmsModel.FileModel> files = jss.Deserialize <List <EmsModel.FileModel> >(fileJson); List <string> equips = jss.Deserialize <List <string> >(equipJson); ht.Add("files", files); ht.Add("equips", equips); EmsModel.JsonModel Model = BllContract.UpdateContract(ht); context.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); context.Response.End(); }
/// <summary> /// 添加课程 /// </summary> /// <returns>结果</returns> public void AddPlan(HttpContext context) { string callback = context.Request["jsoncallback"]; string Name = context.Request["Name"].ToString(); string LearnYear = context.Request["LearnYear"].ToString(); string Contents = context.Request["Contents"].ToString(); string Creator = context.Request["Creator"].ToString(); string MainTeacher = context.Request["MainTeacher"].ToString(); string GuideTeacher1 = context.Request["GuideTeacher1"].ToString(); string GuideTeacher2 = context.Request["GuideTeacher2"].ToString(); EmsModel.TeachingPlan ModelPlan = new EmsModel.TeachingPlan(); ModelPlan.Name = Name; //课程名称 ModelPlan.MainTeacher = MainTeacher; //主讲教师 ModelPlan.GuideTeacher1 = GuideTeacher1; //指导教师1 ModelPlan.GuideTeacher2 = GuideTeacher2; //指导教师2 ModelPlan.Contents = Contents; //课程内容 ModelPlan.LearnYear = Convert.ToInt32(LearnYear); //学年学期ID ModelPlan.Creator = Creator; //创建人登录名 ModelPlan.CreateTime = DateTime.Now; //创建时间 ModelPlan.IsDelete = 0; //是否删除 0未删除 EmsModel.JsonModel Model = BllPlan.AddPlan(ModelPlan); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(result); //输出Json //HttpContext.Current.Response.Write(callback + "{\"result\":\"" + result + "\"}"); HttpContext.Current.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); HttpContext.Current.Response.End(); }
/// <summary> /// 修改实验 /// </summary> /// <returns>结果</returns> public void UpdateExperiment(HttpContext context) { string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); ht.Add("Name", context.Request["Name"].ToString()); ht.Add("Type", context.Request["Type"].ToString()); ht.Add("IsOpen", context.Request["IsOpen"].ToString()); ht.Add("StartDate", context.Request["StartDate"].ToString()); ht.Add("Week", context.Request["Week"].ToString()); ht.Add("Weekday", context.Request["Weekday"].ToString()); ht.Add("ClassHour", context.Request["ClassHour"].ToString()); ht.Add("Part", context.Request["Part"].ToString()); ht.Add("ComputerRoom", context.Request["ComputerRoom"].ToString()); ht.Add("Place", context.Request["Place"].ToString()); ht.Add("GroupMemberNumber", context.Request["GroupMemberNumber"].ToString()); ht.Add("GroupNumber", context.Request["GroupNumber"].ToString()); ht.Add("NeedEquip", context.Request["NeedEquip"].ToString()); ht.Add("Contents", context.Request["Contents"].ToString()); ht.Add("Editor", context.Request["Editor"].ToString()); ht.Add("Id", context.Request["Id"].ToString()); ht.Add("Class", context.Request["Class"].ToString()); ht.Add("Category", context.Request["Category"].ToString()); //string result = BllExperiment.Update(ModelExperiment).ToString(); EmsModel.JsonModel Model = BllExperiment.UpdateExperiment(ht); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(result); //输出Json context.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); context.Response.End(); }
/// <summary> /// 获得设备分类列表 /// </summary> /// <returns></returns> public void GetPage(HttpContext context) { string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); if (context.Request["Name"] != null) { ht.Add("Name", context.Request["Name"].ToString()); } if (context.Request["Number"] != null) { ht.Add("Number", context.Request["Number"].ToString()); } if (context.Request["Model"] != null) { ht.Add("Model", context.Request["Model"].ToString()); } ht.Add("PageIndex", context.Request["PageIndex"].ToString()); ht.Add("PageSize", context.Request["PageSize"].ToString()); EmsModel.JsonModel Model = BllInstrumentEquip.GetPage(ht); 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(); }
/// <summary> /// 获得List /// </summary> public void GetModelList(HttpContext context) { EmsBLL.LearnYear BLL = new EmsBLL.LearnYear(); string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); //学期名称 if (context.Request["Name"] != null) { ht.Add("Name", context.Request["Name"].ToString()); } //是否删除 if (context.Request["IsDelete"] != null) { ht.Add("IsDelete", context.Request["IsDelete"].ToString()); } EmsModel.JsonModel Model = BLL.GetModelList(ht); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(result); //输出Json HttpContext.Current.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); HttpContext.Current.Response.End(); }
/// <summary> /// 获得教学计划列表 /// </summary> /// <returns></returns> public void GetPage(HttpContext context) { string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); //合同名称 if (!string.IsNullOrEmpty(context.Request["ContractName"])) { ht.Add("ContractName", context.Request["ContractName"].ToString()); } if (!string.IsNullOrEmpty(context.Request["AttachmentName"])) { ht.Add("AttachmentName", context.Request["AttachmentName"].ToString()); } if (!string.IsNullOrEmpty(context.Request["EquipName"])) { ht.Add("EquipName", context.Request["EquipName"].ToString()); } //创建人 if (!string.IsNullOrEmpty(context.Request["Creator"])) { ht.Add("Creator", context.Request["Creator"].ToString()); } //登录账号角色 if (!string.IsNullOrEmpty(context.Request["UserRoleID"])) { 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 = BllContract.GetPage(ht); 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(); }
public void GetContract(HttpContext context) { string callback = context.Request["jsoncallback"]; string Id = context.Request["Id"].ToString(); EmsModel.JsonModel Model = BllContract.GetContract(Id); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); HttpContext.Current.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); HttpContext.Current.Response.End(); }
public void DeleteContract(HttpContext context) { string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); ht.Add("Id", context.Request["Id"]); EmsModel.JsonModel Model = BllContract.DeleteContract(ht); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //输出Json HttpContext.Current.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); HttpContext.Current.Response.End(); }
/// <summary> /// 获得教师下拉信息 /// </summary> /// <returns></returns> public void GetTeacherOption(HttpContext context) { string callback = context.Request["jsoncallback"]; EmsModel.JsonModel List = BllPlan.GetTeacherOption(); 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(); }
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(); }
/// <summary> /// 获得实验 /// </summary> /// <returns></returns> public void GetExperiment(HttpContext context) { string callback = context.Request["jsoncallback"]; string Id = context.Request["Id"].ToString(); EmsModel.JsonModel Model = BllExperiment.GetExperiment(Id); Model = nameCommon.AddCreateNameForData(Model, 4, "Creator", "", "Editor"); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(ModelExperiment); context.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); context.Response.End(); }
/// <summary> /// 获得实验类型 /// </summary> public void GetExpType(HttpContext context) { string callback = context.Request["jsoncallback"]; EmsModel.JsonModel Model = BllDictionary.GetExpType(); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(result); //输出Json HttpContext.Current.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); HttpContext.Current.Response.End(); }
/// <summary> /// 获取科研所下拉菜单信息 /// </summary> /// <returns></returns> public void GetDDInfo(HttpContext context) { string callback = context.Request["jsoncallback"]; //Hashtable ht = new Hashtable(); //ht.Add("PageSize", context.Request["PageSize"].ToString()); EmsBLL.SectionPlace bll = new EmsBLL.SectionPlace(); EmsModel.JsonModel Model = bll.GetDDInfo(); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(ModelPlan); HttpContext.Current.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); HttpContext.Current.Response.End(); }
/// <summary> /// 获得订单设备 /// </summary> /// <returns></returns> public void GetOrderEquipList(HttpContext context) { string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); ht.Add("ExperimentId", context.Request["Id"].ToString()); EmsBLL.OrderInfo BLLOrderInfo = new EmsBLL.OrderInfo(); EmsModel.JsonModel Model = BLLOrderInfo.GetOrderEquipList(ht); 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(); }
/// <summary> /// 获得荣誉 /// </summary> /// <returns></returns> public void GetHonor(HttpContext context) { string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); ht.Add("Id", context.Request["Id"].ToString()); ht.Add("PageIndex", 1); ht.Add("PageSize", 10); EmsModel.JsonModel Model = BllHonor.GetHonor(ht); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(ModelExperiment); context.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); context.Response.End(); }
/// <summary> /// 删除荣誉 /// </summary> /// <returns>结果</returns> public void DeleteHonor(HttpContext context) { string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); ht.Add("Id", context.Request["Id"].ToString()); ht.Add("Editor", context.Request["Editor"].ToString()); EmsModel.JsonModel Model = BllHonor.MarkDelete(ht); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(result); //输出Json context.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); context.Response.End(); }
/// <summary> /// 获得实验下拉列表 /// </summary> /// <returns></returns> public void GetSelectOption(HttpContext context) { string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); if (context.Request["Creator"] != null) { ht.Add("Creator", context.Request["Creator"].ToString()); } EmsModel.JsonModel Model = BllExperiment.GetSelectOption(ht); 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(); }
/// <summary> /// 保存选择结果 /// </summary> /// <returns>结果</returns> public void SaveEquipList(HttpContext context) { string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); ht.Add("RelationID", context.Request["ExperimentId"].ToString()); ht.Add("YSelectStr", context.Request["YSelectStr"].ToString()); EmsModel.JsonModel Model = BLLEquipList.SaveEquipList(ht); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(result); //输出Json context.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); context.Response.End(); }
/// <summary> /// 导入教师信息 /// </summary> /// <returns></returns> public void ImportTeacher(HttpContext context) { EmsBLL.UserInfo BLL = new EmsBLL.UserInfo(); string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); ht.Add("Creator", context.Request["Creator"].ToString()); ht.Add("FilePath", context.Request["FilePath"].ToString()); ht.Add("UseStatus", System.Configuration.ConfigurationManager.ConnectionStrings["DefaultUserStatus"].ConnectionString); ht.Add("Password", System.Configuration.ConfigurationManager.ConnectionStrings["InitialPassword"].ConnectionString); ht.Add("RoleId", System.Configuration.ConfigurationManager.ConnectionStrings["RoleId"].ConnectionString); EmsModel.JsonModel Model = BLL.ImportTeacher(ht); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(ModelPlan); HttpContext.Current.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); HttpContext.Current.Response.End(); }
/// <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(); }
/// <summary> /// 快速模板实验设备列表 /// </summary> /// <returns></returns> public void GetPageTempSelect(HttpContext context) { string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); if (context.Request["RelationID"] != null) { ht.Add("RelationID", context.Request["RelationID"].ToString()); } ht.Add("PageIndex", context.Request["PageIndex"].ToString()); ht.Add("PageSize", context.Request["PageSize"].ToString()); EmsModel.JsonModel Model = BLLEquipList.GetPageTempSelect(ht); 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(); }
/// <summary> /// 获得班级 /// </summary> /// <returns></returns> public void GetClass(HttpContext context) { string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); if (context.Request["Id"] != null) { ht.Add("Id", context.Request["Id"].ToString()); } if (context.Request["UseStatus"] != null) { ht.Add("UseStatus", context.Request["UseStatus"].ToString()); } EmsModel.JsonModel Model = BllExperiment.GetData2(ht); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(ModelExperiment); context.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); context.Response.End(); }
/// <summary> /// Edit页数据加载 /// </summary> /// <returns></returns> public void DateLoad(HttpContext context) { string callback = context.Request["jsoncallback"]; //机房 Hashtable htComputerRoom = new Hashtable(); htComputerRoom.Add("Name", "机房"); EmsBLL.Dictionary BLLDictionary = new EmsBLL.Dictionary(); EmsModel.JsonModel Model1 = BLLDictionary.GetList(htComputerRoom); //实验地点 Hashtable htPlace = new Hashtable(); htPlace.Add("Name", "实验地点"); EmsModel.JsonModel Model2 = BLLDictionary.GetList(htPlace); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(ModelExperiment); context.Response.Write(callback + "({\"result1\":" + jss.Serialize(Model1) + ",\"result2\":" + jss.Serialize(Model2) + "})"); context.Response.End(); }
public void GetPage(HttpContext context) { EmsBLL.EquipList Bll = new EmsBLL.EquipList(); 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()); ht.Add("PageIndex", context.Request["PageIndex"].ToString()); ht.Add("PageSize", context.Request["PageSize"].ToString()); EmsModel.JsonModel Model = Bll.GetPage(ht); 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(); }
/// <summary> /// 保存 /// </summary> /// <param name="context"></param> public void AddRepairDetails(HttpContext context) { string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); ht.Add("Record", context.Request["Record"]); ht.Add("Date", context.Request["Date"]); ht.Add("ID", context.Request["ID"]); ht.Add("RID", context.Request["RID"]); ht.Add("Operator", context.Request["Operator"]); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); string fileJson = context.Request["fileJson"]; List <EmsModel.FileModel> files = jss.Deserialize <List <EmsModel.FileModel> >(fileJson); ht.Add("fileJson", files); EmsBLL.Repair repair = new EmsBLL.Repair(); EmsModel.JsonModel Model = repair.AddRepairDetails(ht); HttpContext.Current.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); HttpContext.Current.Response.End(); }
/// <summary> /// 生成订单 /// </summary> /// <returns>结果</returns> public void CreateOrder(HttpContext context) { string callback = context.Request["jsoncallback"]; EmsBLL.OrderInfo BLLOrderInfo = new EmsBLL.OrderInfo(); Hashtable ht = new Hashtable(); ht.Add("ExperimentId", context.Request["ExperimentId"].ToString()); //ht.Add("YSelectStr", context.Request["YSelectStr"].ToString()); ht.Add("LoanName", context.Request["LoanName"].ToString()); ht.Add("Creator", context.Request["Creator"].ToString()); ht.Add("Type", context.Request["Type"].ToString()); EmsModel.JsonModel Model = BLLOrderInfo.CreateOrder(ht); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(result); //输出Json context.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); context.Response.End(); }
/// <summary> /// 修改课程 /// </summary> /// <returns>结果</returns> public void UpdatePlan(HttpContext context) { string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); ht.Add("Name", context.Request["Name"].ToString()); ht.Add("MainTeacher", context.Request["MainTeacher"].ToString()); ht.Add("GuideTeacher1", context.Request["GuideTeacher1"].ToString()); ht.Add("GuideTeacher2", context.Request["GuideTeacher2"].ToString()); ht.Add("LearnYear", context.Request["LearnYear"].ToString()); ht.Add("Editor", context.Request["Editor"].ToString()); ht.Add("Contents", context.Request["Contents"].ToString()); ht.Add("Id", context.Request["Id"].ToString()); EmsModel.JsonModel Model = BllPlan.UpdatePlan(ht); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(result); //输出Json HttpContext.Current.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); HttpContext.Current.Response.End(); }
/// <summary> /// 修改荣誉 /// </summary> /// <returns>结果</returns> public void UpdateHonor(HttpContext context) { string callback = context.Request["jsoncallback"]; Hashtable ht = new Hashtable(); ht.Add("Name", context.Request["Name"].ToString()); ht.Add("preName", context.Request["preName"].ToString()); ht.Add("HonorLevel", context.Request["Level"].ToString()); ht.Add("ExperimentId", context.Request["ExperimentId"].ToString()); ht.Add("Editor", context.Request["Editor"].ToString()); ht.Add("Id", context.Request["Id"].ToString()); //string result = BllExperiment.Update(ModelExperiment).ToString(); EmsModel.JsonModel Model = BllHonor.UpdateHonor(ht); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(result); //输出Json context.Response.Write(callback + "({\"result\":" + jss.Serialize(Model) + "})"); context.Response.End(); }