Ejemplo n.º 1
0
        public ActionResult DeleteRequest(int id)
        {
            var request = ReBO.GetRequestByID(id);

            ReBO.Delete(request);
            return(RedirectToAction("StudentImage", "Student", new { StudentID = request.StudentID }));
        }
Ejemplo n.º 2
0
 public bool Delete(Request request)
 {
     try
     {
         using (var u = new RequestBusiness())
         {
             return(u.Delete(request));
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
         return(false);
     }
 }
Ejemplo n.º 3
0
 public IHttpActionResult Delete([FromBody] Request request)
 {
     try
     {
         using (var c = new RequestBusiness())
         {
             if (c.Delete(request))
             {
                 return(Ok());
             }
             return(NotFound());
         }
     }
     catch (Exception ex)
     {
         return(BadRequest($"{ex}"));
     }
 }