Ejemplo n.º 1
0
        public ActionResult ViewStatus(int CrimeId)
        {
            CrimeDataLayer objCrimeDataLayer = new CrimeDataLayer();
            CrimeModel     objCrimeModel     = objCrimeDataLayer.GetCrimeDetailsbyCrimeId(CrimeId);

            return(View(objCrimeModel));
        }
Ejemplo n.º 2
0
        public ActionResult UpdateStatus(int CrimeId, FormCollection frmCollection)
        {
            string         Status            = frmCollection["Status"].ToString();
            string         Comment           = frmCollection["Comment"].ToString();
            CrimeDataLayer objCrimeDataLayer = new CrimeDataLayer();
            bool           Result            = objCrimeDataLayer.UpdateCrimeStatus(CrimeId, Status, Comment);
            CrimeModel     objCrimeModel     = objCrimeDataLayer.GetCrimeDetailsbyCrimeId(CrimeId);

            if (Result)
            {
                ViewBag.Status  = "success";
                ViewBag.Message = "Your status and comments has been updated successfully";
            }
            else
            {
                ViewBag.Status  = "error";
                ViewBag.Message = "internal error occured";
            }

            return(View(objCrimeModel));
        }