public ActionResult AddLeave(Leave leave)
 {
     leave.UserID     = (Session["UserInfo"] as UserInfo).UserID;
     leave.LeaveState = 0;
     leave.LeaveTime  = DateTime.Now;
     return(Content(leaveBLL.AddLeave(leave).ToString()));
 }
Exemplo n.º 2
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string     obj   = context.Request["obj"];
            LeaveModel model = JsonConvert.DeserializeObject <LeaveModel>(obj);

            context.Response.Write(bll.AddLeave(model));
        }