/// <summary>
 /// [Tam.Le] - Lấy dữ liệu Cat_TAMScanReasonMiss(Cat_TAMScanReasonMiss) theo Id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Cat_TAMScanReasonMissModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Cat_TAMScanReasonMissModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Cat_TAMScanReasonMissEntity>(id, ConstantSql.hrm_cat_sp_get_TAMScanReasonMiss_ById, ref status);
     if (entity != null)
     {
         model = entity.CopyData<Cat_TAMScanReasonMissModel>();
     }
     model.ActionStatus = status;
     return model;
 }
Example #2
0
        /// <summary>
        /// [Thong.Huynh] - 2014/05/28
        /// Lấy dữ liệu load lên lưới bằng cùng điều kiện tìm kiếm
        /// </summary>
        /// <param name="request"></param>
        /// <param name="Model"></param>
        /// <returns></returns>


        /// <summary>
        /// [Tam.Le] - 7.8.2014 - Lấy dữ liệu "Cat_TAMScanReasonMiss","Can_MealAllowanceTypeSetting" theo Id cua Cat_TAMScanReasonMiss
        /// </summary>
        /// <param name="request"></param>
        /// <param name="model"></param>
        /// <returns></returns>
        public JsonResult GetTAMScanReasonMiss_ById(Guid Id)
        {

            string status = string.Empty;
            var model = new Cat_TAMScanReasonMissModel();
            ActionService service = new ActionService(UserLogin);
            var entity = service.GetByIdUseStore<Cat_TAMScanReasonMissEntity>(Id, ConstantSql.hrm_cat_sp_get_TAMScanReasonMiss_ById, ref status);
            if (entity != null)
            {
                model = entity.CopyData<Cat_TAMScanReasonMissModel>();
            }
            return Json(model);
            //var result = new List<Cat_TAMScanReasonMissModel>();
            //string status = string.Empty;
            //if (Id > 0)
            //{
            //    var service = new Cat_TAMScanReasonMissServices();
            //    result = service.GetData<Cat_TAMScanReasonMissModel>(Id, ConstantSql.hrm_cat_sp_get_TAMScanReasonMiss_ById, ref status);

            //}
            //return Json(result, JsonRequestBehavior.AllowGet);
        }