Esempio n. 1
0
        public ActionResult SaveCSSDRequest(CSSDRequest data)
        {
            data.UserId   = (int)Session["UserId"];
            data.BranchId = 1;
            data.AddedOn  = DateTime.Now;
            data.Approval = false;
            data.Status   = false;

            db.CSSDRequests.Add(data);
            db.SaveChanges();

            return(RedirectToAction("RequestToCSSD", new { }));
        }
Esempio n. 2
0
        public ActionResult ApproveCSSDDelivey(int?id)
        {
            // id = db.AmbulanceMasters.Where(e => e.Engaged == false);
            CSSDRequest obj = db.CSSDRequests.Find(id);

            if (obj != null)
            {
                obj.Approval = true;
                UpdateModel(obj);
                // db.AmbulanceMasters.Add(obj);
                db.SaveChanges();
            }

            else
            {
                return(Content("Not such an object"));
            }
            return(Content("Request Approved"));
        }