Beispiel #1
0
        public ActionResult editjob(string id)
        {
            var model = new EditJobAdmin();

            model.JobId     = id;
            model.cleanerId = Convert.ToString(_AccountDetails == null ? 0 : _AccountDetails.Id);
            return(View(model));
        }
Beispiel #2
0
        public object editjob(EditJobAdmin model)
        {
            bool   status  = false;
            string message = "Failed";

            try
            {
                Tuple <bool, string> t = _repository.editjobAdmin(model);
                status  = t.Item1;
                message = t.Item2;
                if (status)
                {
                    return(Json(new { Status = status, Message = message, jobid = model.JobId }, JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json(new { Status = status, Message = message }, JsonRequestBehavior.AllowGet));
                }
            }
            catch (Exception ex)
            {
                return(new { Status = status, Message = ex.Message });
            }
        }