public ActionResult UpdateTrainingDetails(int LocationId) { var instanceId = Session["InstanceId"]; GetStateList(); if (instanceId != null) { GetSSCList(instanceId.ToString()); if (LocationId == 0) { ViewData["UpdateTrainingLocation"] = null; } else { TraningLocBL objBL = new TraningLocBL(); TraningLocDO objDO = new TraningLocDO(); objDO = objBL.GetTrainingDetailsById(LocationId); if (objDO != null) { ViewData["TrainingDetails"] = objDO; } else { ViewData["TrainingDetails"] = null; ViewData["UpdateTrainingLocation"] = null; } } } else { } return(View()); }
public int DeleteTrainingLocation(int LocationId) { int result = 0; int CreatedBy = Convert.ToInt32(Session["UserId"].ToString()); TraningLocBL objBL = new TraningLocBL(); result = objBL.DeleteTraning(LocationId, CreatedBy); return(result); }
public JsonResult GetTrainingDetailsBySearch(List <TrainingSearchDO> SearchDetails) { JsonResult result = new JsonResult(); TraningLocBL obj = new TraningLocBL(); List <TrainingDetailsDO> objList = new List <TrainingDetailsDO>(); foreach (var item in SearchDetails) { objList = obj.GetTrainingDetails(item); } result.Data = objList; return(result); }
public JsonResult GetJobRoleDetailsList(int TrainingLlocationsId) { JsonResult result = new JsonResult(); TraningLocBL objBL = new TraningLocBL(); List <TraningLocDO> objList = new List <TraningLocDO>(); int InstanceId = Convert.ToInt32(Session["InstanceId"].ToString()); objList = objBL.GetJobRoleDetailsByLocationId(InstanceId, TrainingLlocationsId); if (objList != null) { result.Data = objList; } else { result.Data = null; } return(result); }
public JsonResult SaveTraningLocDetails(List <TraningLocDO> SaveDetails) { int returnStatus = 0; JsonResult result = new JsonResult(); TraningLocBL objBL = new TraningLocBL(); TraningLocDO objDO = new TraningLocDO(); foreach (var item in SaveDetails) { objDO.LocationName = item.LocationName; objDO.TrainingLocCode = item.TrainingLocCode; objDO.ClsRoomCapacity = item.ClsRoomCapacity; objDO.NoOfRooms = item.NoOfRooms; objDO.Descriptions = item.Descriptions; objDO.StateId = item.StateId; objDO.City = item.City; objDO.Address = item.Address; objDO.createdby = item.createdby; objDO.Createddate = item.Createddate; objDO.Updatedby = item.Updatedby; objDO.Updatedate = item.Updatedate; objDO.deleteflag = objDO.deleteflag; int obj = 0; obj = objBL.SaveTraningDetail(objDO); if (obj == 1) { returnStatus = 1; } else { returnStatus = -1; } result.Data = obj; } return(result); }
public string UpdateTrainingDetail(List <TraningLocDO> UpdateDetails) { TraningLocBL objBL = new TraningLocBL(); int result = 0; int InstanceId = Convert.ToInt32(Session["InstanceId"].ToString()); int UserId = Convert.ToInt32(Session["UserId"].ToString()); foreach (var item in UpdateDetails) { item.InstanceId = InstanceId; item.createdby = UserId; if (item.LocationId != null) { result = objBL.UpdateTrainingDetails(item); } else { result = objBL.SaveTraningDetail(item); } } return(result.ToString()); }