Ejemplo n.º 1
0
        public JsonResult UpdateCheck()
        {
            var id    = Request.Form["id"];
            var check = new AssetCheckHistoryVM();

            check.ID     = id;
            check.Status = CheckStatus.Complete.ToString();
            AssetCheckHistoryVM.UpdateCheckHistory(check);

            var res = new JsonResult();

            res.Data = new { success = true };
            return(res);
        }
Ejemplo n.º 2
0
        public JsonResult AddCheck()
        {
            var assetid = Request.Form["assetid"];
            var comment = Request.Form["comment"];

            var exist = AssetCheckHistoryVM.GetCheckInfo(assetid);
            var res   = new JsonResult();

            if (!string.IsNullOrEmpty(exist.ID))
            {
                res.Data = new { success = false };
            }
            else
            {
                var check = new AssetCheckHistoryVM();
                check.AssetID = assetid;
                check.Status  = CheckStatus.Valid.ToString();
                check.Comment = comment;
                AssetCheckHistoryVM.AddCheckHistory(check);
                res.Data = new { success = true };
            }

            return(res);
        }