Exemple #1
0
        /// <summary>
        /// Tạo mời một AttInOut
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public ActionResult Add([Bind] Hre_SoftSkillModel model)
        {
            var service = new RestServiceClient <Hre_SoftSkillModel>(UserLogin);

            service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
            var result = service.Put(_hrm_Hr_Service, "api/Hre_SoftSkill/", model);

            return(Json(result));
        }
Exemple #2
0
 public ActionResult Create(Hre_SoftSkillModel model)
 {
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient <Hre_SoftSkillModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Hre_SoftSkill/", model);
         ViewBag.MsgInsert = ConstantDisplay.HRM_HR_SoftSkill_InsertSuccess.TranslateString();
     }
     return(View());
 }
Exemple #3
0
 public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Hre_SoftSkillModel SoftSkill)
 {
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient <Hre_SoftSkillModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Hre_SoftSkill/", SoftSkill);
         ViewBag.MsgUpdate = ConstantDisplay.HRM_HR_SoftSkill_UpdateSuccess.TranslateString();
     }
     return(View());
 }
 public Hre_SoftSkillModel Post([Bind] Hre_SoftSkillModel model)
 {
     #region Validate
     string message       = string.Empty;
     var    checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Hre_SoftSkillModel>(model, "Hre_SoftSkill", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return(model);
     }
     #endregion
     ActionService service = new ActionService(UserLogin);
     return(service.UpdateOrCreate <Hre_SoftSkillEntity, Hre_SoftSkillModel>(model));
 }
        /// <summary>
        /// [Son.Vo] - Lấy dữ liệu SoftSkill(Hre_SoftSkill) theo Id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Hre_SoftSkillModel GetById(Guid id)
        {
            string        status  = string.Empty;
            var           model   = new Hre_SoftSkillModel();
            ActionService service = new ActionService(UserLogin);
            //var entity = service.GetByIdUseStore<Hre_SoftSkillEntity>(id, ConstantSql.hrm_hr_sp_get_SoftSkillById, ref status);
            var entity = service.GetData <Hre_SoftSkillEntity>(Common.DotNetToOracle(id.ToString()), ConstantSql.hrm_hr_sp_get_SoftSkillById, ref status).FirstOrDefault();

            if (entity != null)
            {
                model = entity.CopyData <Hre_SoftSkillModel>();
            }
            model.ActionStatus = status;
            return(model);
        }