Example #1
0
        /// <summary>
        /// [Son.Vo] - Lấy dữ liệu WorkHistory(Hre_WorkHistory) theo Id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>

        public Hre_WorkHistoryModel GetById(Guid id)
        {
            string status = string.Empty;
            var model = new Hre_WorkHistoryModel();
            var service = new ActionService(UserLogin);
            var entity = service.GetByIdUseStore<Hre_WorkHistoryEntity>(id, ConstantSql.hrm_hr_sp_get_WorkHistoryById, ref status);
            if (entity != null)
            {
                model = entity.CopyData<Hre_WorkHistoryModel>();
            }
            if (model != null && model.DateEffective != null)
            {
                model.DateEffectiveOld = model.DateEffective;
            }
            model.ActionStatus = status;
            return model;
        }
Example #2
0
        public ActionResult Create(Hre_WorkHistoryModel model)
        {

            if (ModelState.IsValid)
            {
                var service = new RestServiceClient<Hre_WorkHistoryModel>(UserLogin);
                service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
                var result = service.Put(_hrm_Hr_Service, "api/Hre_WorkHistory/", model);
                ViewBag.MsgInsert = ConstantDisplay.HRM_HR_SoftSkill_InsertSuccess.TranslateString();
            }
            return View();
        }