示例#1
0
 public void ProcessRequest(HttpContext context)
 {
     context.Response.ContentType = "text/plain";
     int service_id = Convert.ToInt32(context.Request.QueryString["service_id"]);
     ServiceDAO serviceDAO = new ServiceDAO();
     bool success = serviceDAO.cancleById(service_id);
     context.Response.Write(success + "\n");
     context.Response.Write("help");
 }
示例#2
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
 //           int user_id = Convert.ToInt32(context.Request.QueryString["user_id"]);
            int restaurant_id = Convert.ToInt32(context.Request.QueryString["restaurant_id"]);
            int service_type = Convert.ToInt32(context.Request.QueryString["service_type"]);
            ServiceDAO serviceDAO = new ServiceDAO();
            ServiceEntity service = new ServiceEntity();
   //         service.user_id = user_id;
            service.restaurant_id = restaurant_id;
            service.service_type = service_type;
            service.ctime = System.DateTime.Now.ToString();
            service.status = 0;
            bool success = serviceDAO.addOneService(service);
            context.Response.Write(success + "\n");
            context.Response.Write("help");
        }
示例#3
0
        public void getServiceCall()
        {
            StringBuilder sb = new StringBuilder();
            ServiceDAO serviceDAO = new ServiceDAO();
            List<ServiceEntity> list = serviceDAO.getServiceByUserId(user_id);
            for (int i = 0; i < list.Count; i++)
            {
                DateTime todaydate = Convert.ToDateTime(list[i].ctime);
                String date = todaydate.ToString("hh:mm:ss");
                if(list[i].status!= 2){
                    sb.Append("<tr>");
                    sb.Append("<td><input type='checkbox' name='checkbox'/></td>");
                    sb.Append("<td>" + list[i].user_id + "</td>");
                    sb.Append("<td>" + list[i].service_name + "</td>");
                    sb.Append("<td>" + date + "</td>");
                    sb.Append("<td>等待中</td>");
                    sb.Append("<td><a id='" + list[i].id + "' href='#' OnClick='CancleService(this)'>取消服务</a></td>");
                    sb.Append("</td>");
                    sb.Append("</tr>");
                }
            }
            servicePart = sb.ToString();

        }