Beispiel #1
0
        public ActionResult GetDataByHDTJobTypeID(string HDTJobTypeID)
        {

            string status = string.Empty;
            var _HDTJobTypeID = Guid.Empty;
            if (HDTJobTypeID.IndexOf(',') > 0)
            {
                return null;
            }
            if (!string.IsNullOrEmpty(HDTJobTypeID))
            {
                _HDTJobTypeID = Common.ConvertToGuid(HDTJobTypeID);
            }

            var services = new Cat_HDTJobTypeServices();
            ActionService actionService = new ActionService(UserLogin);
            var HDTJobTypeEntity = actionService.GetData<Cat_HDTJobTypeEntity>(_HDTJobTypeID, ConstantSql.hrm_cat_sp_get_HDTJobTypeById, ref status).FirstOrDefault();

            if (HDTJobTypeEntity != null)
            {
                return Json(HDTJobTypeEntity, JsonRequestBehavior.AllowGet);
            }
            return null;
        }
Beispiel #2
0
 public JsonResult GetTypeHDTJobTypeID(Guid ID)
 {
     string status = string.Empty;
     if (ID != Guid.Empty)
     {
         var service = new Cat_HDTJobTypeServices();
         var data = service.GetData<Cat_HDTJobTypeModel>(Common.DotNetToOracle(ID.ToString()), ConstantSql.hrm_cat_sp_get_HDTJobTypeById, UserLogin, ref status).ToList();
         if (data == null)
         {
             return Json(null, JsonRequestBehavior.AllowGet);
         }
         var result = from e in data
                      select new
                      {
                          GroupName = e.HDTJobGroupName,
                          GroupID = e.HDTJobGroupID,
                          Text = e.Type.TranslateString(),
                          Value = e.Type,
                      };
         return Json(result, JsonRequestBehavior.AllowGet);
     }
     return Json(null, JsonRequestBehavior.AllowGet);
 }
Beispiel #3
0
 public JsonResult GetHDTJobTypeByHDTJobGroupID(Guid HDTJobGroup, string HDTJobTypeFilter)
 {
     var result = new List<Cat_HDTJobTypeModel>();
     string status = string.Empty;
     if (HDTJobGroup != Guid.Empty)
     {
         var service = new Cat_HDTJobTypeServices();
         result = service.GetData<Cat_HDTJobTypeModel>(HDTJobGroup, ConstantSql.hrm_Cat_sp_get_HDTJobTypeByGroupID, UserLogin, ref status);
         if (!string.IsNullOrEmpty(HDTJobTypeFilter))
         {
             var rs = result.Where(s => s.HDTJobTypeName != null && s.HDTJobTypeName.ToLower().Contains(HDTJobTypeFilter.ToLower())).ToList();
             return Json(rs, JsonRequestBehavior.AllowGet);
         }
     }
     return Json(result, JsonRequestBehavior.AllowGet);
 }
Beispiel #4
0
 public JsonResult GetHDTJobTypeCodeByHDTJobGroupID(Guid HDTJobGroupID, string filterHDTJob)
 {
     var result = new List<Cat_HDTJobTypeCodeMultiModel>();
     string status = string.Empty;
     List<object> obj = new List<object>();
     obj.Add(HDTJobGroupID);
     obj.Add(filterHDTJob);
     //if (HDTJobGroupID != Guid.Empty)
     //{
     var service = new Cat_HDTJobTypeServices();
     result = service.GetData<Cat_HDTJobTypeCodeMultiModel>(obj, ConstantSql.hrm_Cat_sp_get_HDTJobTypeCodeByGroupID, UserLogin, ref status);
     //}
     return Json(result, JsonRequestBehavior.AllowGet);
 }
Beispiel #5
0
 public ActionResult ApprovedHDTJobType(string selectedIds)
 {
     var service = new Cat_HDTJobTypeServices();
     var message = service.ActionApproved(selectedIds);
     return Json(message);
 }