Example #1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            List <TeacherInfoModel> ls = new TeacherInfoBLL().GetAll().ToList();
            JavaScriptSerializer    js = new JavaScriptSerializer();

            context.Response.Write(js.Serialize(ls));
        }
Example #2
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            Guid             id = new Guid(context.Request.QueryString["id"]);
            TeacherInfoModel m  = new TeacherInfoBLL().Get(id);

            m.Password = "******";
            context.Response.Write(new TeacherInfoBLL().Update(m));
        }
Example #3
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            TeacherInfoModel result = new TeacherInfoBLL().CheckUserNameAndPassWord(context.Request.Form["UserName"], context.Request.Form["Password"]);

            if (result != null)
            {
                context.Session["UserName"] = result;
                context.Response.Write(result.Mark + ":" + result.id);
            }
            else
            {
                context.Response.Write("error");
            }
        }