public void TestLiveAdd() { var meetInfo = new WebForm.EduModels.MeetInfoModel { MeetId = "200000022", AdminId = "20121102", MeetName = "直播会议", MeetTimes = "2017-09-20 11:20", ApplicatId = "20121102", temp1 = "37", temp2 = "直播会议001", Date1 = DateTime.Now, test1 = "1", test = "2", typeid = "直播会议", type = "华师大直播平台", Reason = "校内|是", inland = "入场设备信息", abroad = "11.22.33.44|other", Phone = "777777777", Address = "地址7" }; var adminUser = new WebForm.Common.UserService().CreateNewUser(meetInfo.AdminId); Assert.IsNotNull(adminUser); var aplicatUser = new WebForm.Common.UserService().CreateNewUser(meetInfo.ApplicatId); Assert.IsNotNull(aplicatUser); // new WebForm.ashx.ROOMISHandler().CreateNewTempTestMeet(meetinfo); new WebForm.ashx.ROOMISHandler().Create(meetInfo); }
public void TestAdd() { meetInfo.temp1 = DateTime.Now.ToShortTimeString(); meetInfo.typeid = Enum.GetName(typeof(meetType), meetType.直播会议); meetInfo.type = Enum.GetName(typeof(LivePlatform), LivePlatform.华师大直播平台); meetInfo.inland = "入场设备信息"; meetInfo.abroad = "222.222.33.44|其他需求"; meetInfo.Reason = "校内|是"; meetInfo.temp2 = Enum.GetName(typeof(meetType), meetType.直播会议) + DateTime.Now.ToShortTimeString() + "标题"; var adminUser = new WebForm.Common.UserService().CreateNewUser(meetInfo.AdminId); Assert.IsNotNull(adminUser); var aplicatUser = new WebForm.Common.UserService().CreateNewUser(meetInfo.ApplicatId); Assert.IsNotNull(aplicatUser); // new WebForm.ashx.ROOMISHandler().CreateNewTempTestMeet(meetinfo); new WebForm.ashx.ROOMISHandler().Create(meetInfo); System.Threading.Thread.Sleep(1000); meetInfo.temp1 = DateTime.Now.ToShortTimeString(); meetInfo.typeid = Enum.GetName(typeof(meetType), meetType.直播会议); meetInfo.type = Enum.GetName(typeof(LivePlatform), LivePlatform.校外第三方直播平台); meetInfo.inland = "入场设备信息"; meetInfo.abroad = "222.222.33.44|其他需求"; meetInfo.Reason = "校内|是"; meetInfo.temp2 = Enum.GetName(typeof(meetType), meetType.直播会议) + DateTime.Now.ToShortTimeString() + "标题"; new WebForm.ashx.ROOMISHandler().Create(meetInfo); }
public void TestRoomisModify() { var meetInfo = new WebForm.EduModels.MeetInfoModel { MeetId = "200000022", AdminId = "gy", MeetName = "100会议", MeetTimes = "2017-09-20 11:20", ApplicatId = "20121102", temp1 = "1740", temp2 = "会议名称", Date1 = DateTime.Now, test1 = "11", test = "12", typeid = "哲学社会科学类的讲座", type = "14", Reason = "15", inland = "16", abroad = "17", Phone = "9999", Address = "地址1111" }; var adminUser = new WebForm.Common.UserService().CreateNewUser(meetInfo.AdminId); Assert.IsNotNull(adminUser); var aplicatUser = new WebForm.Common.UserService().CreateNewUser(meetInfo.ApplicatId); Assert.IsNotNull(aplicatUser); // new WebForm.ashx.ROOMISHandler().CreateNewTempTestMeet(meetinfo); new WebForm.ashx.ROOMISHandler().RoomisModify(meetInfo); }
private FoWoSoft.Data.Model.MeetInfo CheckRequest(HttpContext context) { string[] contextStrs = new string[] { "ApplicatId", "MeetTimes", "MeetName", "AdminId", "MeetId", "temp1" }; for (int i = 0; i < contextStrs.Length; i++) { if (context.Request[contextStrs[i]] == null) { context.Response.Write(contextStrs[i] + "不能为空"); context.Response.End(); } } var ApplicatIds = context.Request["ApplicatId"].Split('|'); var meetInfo = new EduModels.MeetInfoModel { MeetTimes = context.Request["MeetTimes"], MeetId = context.Request["MeetId"], MeetName = context.Request["MeetName"], AdminId = context.Request["AdminId"], temp1 = context.Request["temp1"], temp2 = context.Request["temp2"] ?? "", Date1 = context.Request["Date1"] == null ? DateTime.Now : Convert.ToDateTime(context.Request["Date1"]), test1 = context.Request["test1"] ?? "", test = context.Request["test"] ?? "", typeid = context.Request["typeid"] ?? "", type = context.Request["type"] ?? "", Reason = context.Request["Reason"] ?? "", inland = context.Request["inland"] ?? "", abroad = context.Request["abroad"] ?? "", }; meetInfo.ApplicatId = ApplicatIds[0]; meetInfo.Phone = ApplicatIds.Length > 1 ? ApplicatIds[1] : ""; meetInfo.Address = ApplicatIds.Length > 2 ? ApplicatIds[2] : ""; var adminUser = new WebForm.Common.UserService().CreateNewUser(meetInfo.AdminId); if (adminUser == null) { context.Response.Write("管理员不存在!"); context.Response.End(); } ; var aplicatUser = new WebForm.Common.UserService().CreateNewUser(meetInfo.ApplicatId); if (aplicatUser == null) { context.Response.Write("申请人不存在!"); context.Response.End(); } ; return(meetInfo); }
private void UserCheck() { if (Request.QueryString["userid"] == null) { Response.Redirect("http://caslogin.ecnu.edu.cn/login.aspx?url=" + Request.Url.ToString() + ""); } string userid = Request.QueryString["userid"].ToString(); //获取userid string token = Request.QueryString["token"].ToString(); //获取token Session["userid"] = userid; Session["token"] = token; var ecnuws = new cn.edu.ecnu.datawebservice.ECNUWebService(); DataSet tokends = ecnuws.CASLOGIN_Check(userid, token); //调用webservice接口,详细接口信息查看相关webservice接口文档 if (tokends == null) { Response.Redirect("http://caslogin.ecnu.edu.cn/login.aspx?url=" + Request.Url.ToString() + "&error=webservice出错, 请从网站登录页面登录"); } if (tokends.Tables[0].Rows[0][0].ToString().Contains("OK:")) { //此处为认证部分结束,由业务系统自定义代码,跳转其他页面 //判断本地是否有用户 var user = new WebForm.Common.UserService().CreateNewUser(userid); //保存用户信息 FoWoSoft.Platform.OnlineUsers bou = new FoWoSoft.Platform.OnlineUsers(); Guid uniqueID = Guid.NewGuid(); Session[FoWoSoft.Utility.Keys.SessionKeys.UserID.ToString()] = user.ID; Session[FoWoSoft.Utility.Keys.SessionKeys.UserUniqueID.ToString()] = uniqueID; bou.Add(user, uniqueID); } else //认证出错后继续跳转到统一身份认证页面加上ERROR参数 { string url = Request.Url.ToString(); Response.Redirect("http://caslogin.ecnu.edu.cn/login.aspx?url=" + url + "&error=" + tokends.Tables[0].Rows[0][0].ToString() + ",请从网站登录页面登录"); } }