public static string getuser(string _uid, string _pwd, string _name, string page, string limit) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string error = string.Empty; long count = 0; try { result.Data = Bll.Mark.UserCenter.getuser(_uid, _pwd, _name, page, limit, ref count, ref error); result.Stamp = count.ToString(); } catch (Exception ex) { error = ex.Message.ToString(); } finally { if (!string.IsNullOrEmpty(error)) { result.Code = "-1"; result.Msg = error; } } return(Untity.HelperJson.SerializeObject(result)); }
public static string login(string _examid, string _cardid, string _vcode, string _vcodeCookie) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string error = string.Empty; try { result.Data = Bll.Exam.UserCenter.login(_examid, _cardid, _vcode, _vcodeCookie, ref error); } catch (Exception ex) { error = ex.Message.ToString(); } finally { if (!string.IsNullOrEmpty(error)) { result.Code = "-1"; result.Msg = error; Untity.HelperHttp.InsertCookie(Untity.HelperHttp.Cookie_ExamId, _examid, -1); Untity.HelperHttp.InsertCookie(Untity.HelperHttp.Cookie_CardId, _cardid, -1); Untity.HelperHttp.InsertCookie(Untity.HelperHttp.Cookie_VerfyCode, _cardid, -1); } else { Untity.HelperHttp.InsertCookie(Untity.HelperHttp.Cookie_ExamId, _examid, 60 * 12); Untity.HelperHttp.InsertCookie(Untity.HelperHttp.Cookie_CardId, _cardid, 60 * 12); } } return(Untity.HelperJson.SerializeObject(result)); }
public static string userinfo(string _examid, string _cardid) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string error = string.Empty; try { //result.Data = Bll.Exam.UserCenter.userinfo(_examid, _cardid, ref error); result.Data = Bll.Exam.UserCenter.userinfo(_examid, out error); } catch (Exception ex) { error = ex.Message.ToString(); } finally { if (!string.IsNullOrEmpty(error)) { result.Code = "-1"; result.Msg = error; } } return(Untity.HelperJson.SerializeObject(result)); }
public string IssueCertificate(string studentId, string certificateId) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string SerialNum = "ZS" + DateTime.Now.Ticks; var state = Dal.MsSQL.T_StudentTicket.GetTicketState(studentId, certificateId); if (state == "" || state == null) { db.Updateable <T_StudentTicket>().SetColumns(it => new T_StudentTicket() { SerialNum = SerialNum }).Where(it => it.CertificateId == certificateId && it.StudentId == studentId).ExecuteCommand(); long BigIdentity = db.Insertable(new T_CertifiSerial() { CertificateId = certificateId, State = "1", SerialNum = SerialNum, IssueDate = DateTime.Now, CreateTime = DateTime.Now, IsDel = "0" }).ExecuteReturnBigIdentity(); result.Msg = "颁发成功"; } else { result.Msg = "证书已颁发"; } return(Untity.HelperJson.SerializeObject(result)); }
//查询考场 //public static string getexamroom(string _uid, string _pwd, string _ticketnum) //{ // Untity.HelperHandleResult result = new Untity.HelperHandleResult(); // string error = string.Empty; // try // { // result.Data = Bll.Organiz.ExamCenter.getexamroom(_uid, _pwd, _ticketnum, ref error); // result.Msg = error; // } // catch (Exception ex) // { // result.Code = "-1"; // result.Msg = ex.Message.ToString(); // } // finally // { // } // return Untity.HelperJson.SerializeObject(result); //} public static string getexamroombyid(string _uid, string _pwd, string id) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string error = string.Empty; long count = 0; try { result.Data = Bll.Organiz.ExamCenter.getexamroombyid(_uid, _pwd, id, ref error); // result.Data = Bll.Organiz.ExamCenter.getexamroom(_uid, _pwd, _ticketnum, ref error); result.Stamp = count.ToString(); } catch (Exception ex) { error = ex.Message.ToString(); } finally { if (!string.IsNullOrEmpty(error)) { result.Code = "-1"; result.Msg = error; } } return(Untity.HelperJson.SerializeObject(result)); }
public static Untity.HelperHandleResult wxlogin(string classid) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string error = string.Empty; string _uid = string.Empty; string _pwd = string.Empty; try { result.Data = Bll.Organiz.UserCenter.wxlogin(classid, ref _uid, ref _pwd, ref error); } catch (Exception ex) { error = ex.Message.ToString(); } finally { if (!string.IsNullOrEmpty(error)) { result.Code = "-1"; result.Msg = error; Untity.HelperHttp.InsertCookie(Untity.HelperHttp.Cookie_UserId, "error", -1); Untity.HelperHttp.InsertCookie(Untity.HelperHttp.Cookie_PassId, "error", -1); Untity.HelperHttp.InsertCookie(Untity.HelperHttp.Cookie_VerfyCodeOrga, "error", -1); } else { Untity.HelperHttp.InsertCookie(Untity.HelperHttp.Cookie_UserId, _uid, 60 * 12); Untity.HelperHttp.InsertCookie(Untity.HelperHttp.Cookie_PassId, _pwd, 60 * 12); } } return(result); }
public static string getscoredetail(string _ticketid, string _OLSchoolUserId) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string error = string.Empty; result.Data = Bll.Organiz.ScoreSearch.getscoredetail(_ticketid, _OLSchoolUserId, ref error); result.Msg = error; return(Untity.HelperJson.SerializeObject(result)); }
public static string getstudentcertifi(string _uid, string _pwd, string studentid) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string error = string.Empty; result.Data = Bll.Organiz.ExamCenter.getstudentcertifi(_uid, _pwd, studentid, ref error); result.Msg = error; return(Untity.HelperJson.SerializeObject(result)); }
//获取座位 public static string getexamseatInfo(string _uid, string _pwd, string ExamRoomId) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string error = string.Empty; try { result.Data = Bll.Organiz.ExamCenter.getexamseatInfo(_uid, _pwd, ExamRoomId, ref error); result.Msg = error; } catch (Exception ex) { result.Code = "-1"; result.Msg = ex.Message.ToString(); } finally { } return(Untity.HelperJson.SerializeObject(result)); }
internal static string uploadheader(HttpContext context) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); result.Code = "-1"; if (context.Request.Files.Count > 0 && context.Request.Files[0] != null) { HttpPostedFile _file = context.Request.Files[0]; string filename = Untity.HelperFile.checkFileImage(_file.ContentType, _file.ContentLength); if (!string.IsNullOrEmpty(filename)) { string dirTempPath = AppDomain.CurrentDomain.BaseDirectory + "/Upload/StudentHeader/"; Untity.HelperFile.createFileDirectory(dirTempPath); _file.SaveAs(dirTempPath + filename); result.Code = "0"; result.Data = "/Upload/StudentHeader/" + filename; } } return(Untity.HelperJson.SerializeObject(result)); }
public static string getSubjectsByTicket(string _uid, string _pwd, string id) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string error = string.Empty; try { result.Data = Bll.Organiz.ScoreSearch.getSubjectsByTicket(_uid, _pwd, id, ref error); result.Msg = error; } catch (Exception ex) { error = ex.Message.ToString(); result.Code = "-1"; result.Msg = error; } finally { } return(Untity.HelperJson.SerializeObject(result)); }
public static string getIsexaminSubjectScore(string postString) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string error = string.Empty; try { result.Data = Bll.Organiz.ScoreSearch.getIsexaminSubjectScore(postString, ref error); result.Msg = error; } catch (Exception ex) { error = ex.Message.ToString(); result.Code = "-1"; result.Msg = error; } finally { } return(Untity.HelperJson.SerializeObject(result)); }
public static string delcertificate(string _uid, string _pwd, string postString) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string error = string.Empty; try { result.Data = Bll.Mark.UserCenter.delcertificate(_uid, _pwd, postString, ref error); } catch (Exception ex) { error = ex.Message.ToString(); } finally { if (!string.IsNullOrEmpty(error)) { result.Code = "-1"; result.Msg = error; } } return(Untity.HelperJson.SerializeObject(result)); }
public static string getOLSchoolSubjects(string _uid, string _pwd) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string error = string.Empty; try { result.Data = Bll.Base.BaseData.getOLSchoolSubjects(_uid, _pwd, ref error); } catch (Exception ex) { error = ex.Message.ToString(); } finally { if (!string.IsNullOrEmpty(error)) { result.Code = "-1"; result.Msg = error; } } return(Untity.HelperJson.SerializeObject(result)); }
public static string getholdcertificate(string _uid, string _pwd, string _name, string _cardid, string page, string limit) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); long count = 0; string error = string.Empty; try { result.Data = Bll.Organiz.ExamCenter.getholdcertificate(_uid, _pwd, _name, _cardid, page, limit, ref count, ref error); result.Msg = error; result.Stamp = count.ToString(); } catch (Exception ex) { error = ex.Message.ToString(); result.Code = "-1"; result.Msg = error; } finally { } return(Untity.HelperJson.SerializeObject(result)); }
public static string getscore(string _uid, string _pwd, string _ticketnum, string page, string limit) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); long count = 0; string error = string.Empty; try { result.Data = Bll.Organiz.ScoreSearch.getscore(_uid, _pwd, _ticketnum, page, limit, ref count, ref error); result.Msg = error; result.Stamp = count.ToString(); } catch (Exception ex) { error = ex.Message.ToString(); result.Code = "-1"; result.Msg = error; } finally { } return(Untity.HelperJson.SerializeObject(result)); }
public static string getsubjectsbycertid(string _uid, string _pwd, string _certid, string _page, string _limit) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); long count = 0; string error = string.Empty; try { result.Data = Bll.Mark.UserCenter.getsubjectsbycertid(_uid, _pwd, _certid, _page, _limit, ref count, ref error); result.Msg = error; result.Stamp = count.ToString(); } catch (Exception ex) { error = ex.Message.ToString(); result.Code = "-1"; result.Msg = error; } finally { } return(Untity.HelperJson.SerializeObject(result)); }
public static string getStudentId(string _uid, string _pwd) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string error = string.Empty; try { result.Data = Bll.Organiz.ExamCenter.getStudentId(_uid, _pwd); } catch (Exception ex) { error = ex.Message.ToString(); } finally { if (!string.IsNullOrEmpty(error)) { result.Code = "-1"; result.Msg = error; } } return(Untity.HelperJson.SerializeObject(result)); }
//判断是否绑定座位 public static string isbountseat(string _uid, string _pwd, string _ticketnum) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string error = string.Empty; try { result.Data = Bll.Organiz.ExamCenter.isbountseat(_uid, _pwd, _ticketnum, ref error); if (result.Data.ToString() != "0") { result.Code = "-1"; } result.Msg = error; } catch (Exception ex) { result.Code = "-1"; result.Msg = ex.Message.ToString(); } finally { } return(Untity.HelperJson.SerializeObject(result)); }
public static string Test_Get(string test) { Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string error = string.Empty; try { result.Data = Bll.Class1.Test(test, ref error); } catch (Exception ex) { error = ex.Message.ToString(); } finally { if (!string.IsNullOrEmpty(error)) { result.Code = "-1"; result.Msg = error; } } return(Untity.HelperJson.SerializeObject(result)); }
internal static string UploadIDCard(HttpContext context, string stuid, string side) { string subpath = "/Upload/StudentIDCard/"; Untity.HelperHandleResult result = new Untity.HelperHandleResult(); result.Code = "-1"; if (context.Request.Files.Count > 0 && context.Request.Files[0] != null) { HttpPostedFile _file = context.Request.Files[0]; string filename = Untity.HelperFile.checkFileImage(_file.ContentType, _file.ContentLength); if (!string.IsNullOrEmpty(filename)) { string dirTempPath = AppDomain.CurrentDomain.BaseDirectory + subpath; Untity.HelperFile.createFileDirectory(dirTempPath); _file.SaveAs(dirTempPath + filename); result.Code = "0"; result.Data = subpath + filename; OrganizaRepository.Singleton.UpdateIDCardPath(stuid, side, subpath + filename); } } return(Untity.HelperJson.SerializeObject(result)); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "application/json"; context.Response.Charset = "utf-8"; Untity.HelperHandleResult result = new Untity.HelperHandleResult(); string res = String.Empty; try { string classid = context.Request["classid"] ?? ""; string signature = context.Request["signature"] ?? ""; string timestamp = context.Request["timestamp"] ?? ""; string nonce = context.Request["nonce"] ?? ""; //bool isacce = Untity.TokenHelper.TokenVerify(signature, Convert.ToDateTime(timestamp), nonce); //if (isacce) //{ result = Logic.Organiz.UserCenter.wxlogin(classid); //} #region GZIP string _acceptEncoing = context.Request.Headers["Accept-Encoding"]; if (!string.IsNullOrEmpty(_acceptEncoing)) { if (_acceptEncoing.ToLower().Contains("deflate")) { //向输出流头部添加Deflate压缩信息 context.Response.AppendHeader("Content-encoding", "deflate"); context.Response.Filter = new DeflateStream(context.Response.Filter, CompressionMode.Compress); } else { if (_acceptEncoing.ToLower().Contains("gzip")) { //向输出流头部添加GZIP压缩信息 context.Response.AppendHeader("Content-encoding", "gzip"); context.Response.Filter = new GZipStream(context.Response.Filter, CompressionMode.Compress); } } } #endregion } catch (Exception ex) { result.Code = "-1"; result.Msg = ex.Message.ToString(); } finally { if (result.Code == "-1") { context.Response.Write(Untity.HelperJson.SerializeObject(result)); context.Response.Flush(); } else { context.Response.Redirect("/Pages/index.html"); } } }