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)); }
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)); }
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"); } }