public JsonResult ReadDashboardTable(Int64 AssetTypeId, Int64 AssetNameId) { try { if (AssetTypeId == -1) { MTSHRDataLayer.AssetDetails asset = new MTSHRDataLayer.AssetDetails(); return(Json(new { success = true, result = JsonConvert.SerializeObject(asset.Read()) }, JsonRequestBehavior.AllowGet)); } else { MTSHRDataLayer.AssetDashboard assetDashboard = new MTSHRDataLayer.AssetDashboard(); return(Json(new { success = true, result = JsonConvert.SerializeObject(assetDashboard.ReadDashboardTable(AssetTypeId, AssetNameId)) }, JsonRequestBehavior.AllowGet)); } } catch (Exception ex) { ex.Data.Clear(); } return(Json(new { success = false }, JsonRequestBehavior.AllowGet)); }
public JsonResult Purchased(string from, string to) { MTSHRDataLayer.AssetDetails data_filter = new MTSHRDataLayer.AssetDetails(); return(Json(JsonConvert.SerializeObject(data_filter.Purchased_date_filter(Convert.ToDateTime(from), Convert.ToDateTime(to))), JsonRequestBehavior.AllowGet)); }
//public JsonResult AddMaintenance(string[] Asset) //{ // //string data = TempData["Asset"]; // return Json(JsonConvert.SerializeObject() JsonRequestBehavior.AllowGet); //} public JsonResult ReadAssetDetail(Int64 ItemCode) { MTSHRDataLayer.AssetDetails view = new MTSHRDataLayer.AssetDetails(); TempData.Keep("ItemCode"); return(Json(JsonConvert.SerializeObject(view.assetdetailbyid(ItemCode)), JsonRequestBehavior.AllowGet)); }
public JsonResult Read() { MTSHRDataLayer.AssetDetails asset = new MTSHRDataLayer.AssetDetails(); return(Json(JsonConvert.SerializeObject(asset.Read()), JsonRequestBehavior.AllowGet)); }