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

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

            return(Json(result));
        }
コード例 #2
0
 public ActionResult Create(Hre_ProfileQualificationModel model)
 {
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient <Hre_ProfileQualificationModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Hre_ProfileQualification/", model);
         ViewBag.MsgInsert = ConstantDisplay.HRM_Hr_Qualification_CreateSuccess.TranslateString();
     }
     return(View());
 }
コード例 #3
0
 public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Hre_ProfileQualificationModel Qualification)
 {
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient <Hre_ProfileQualificationModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Hre_ProfileQualification/", Qualification);
         //return Json(result);
         ViewBag.MsgUpdate = ConstantDisplay.HRM_Hr_Qualification_UpdateSuccess.TranslateString();
     }
     return(View());
 }
コード例 #4
0
 public Hre_ProfileQualificationModel Post([Bind] Hre_ProfileQualificationModel model)
 {
     #region Validate
     string message       = string.Empty;
     var    checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Hre_ProfileQualificationModel>(model, "Hre_ProfileQualification", ref message);
     if (!checkValidate)
     {
         model.ActionStatus = message;
         return(model);
     }
     #endregion
     ActionService service = new ActionService(UserLogin);
     return(service.UpdateOrCreate <Hre_ProfileQualificationEntity, Hre_ProfileQualificationModel>(model));
 }
コード例 #5
0
        /// <summary>
        /// [Son.Vo] - Lấy dữ liệu Trình độ chuyên môn(Hre_Qualification) theo Id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Hre_ProfileQualificationModel GetById(Guid id)
        {
            string        status  = string.Empty;
            var           model   = new Hre_ProfileQualificationModel();
            ActionService service = new ActionService(UserLogin);
            //var entity = service.GetByIdUseStore<Hre_QualificationEntity>(id,ConstantSql.hrm_hr_sp_get_QualificationById, ref status);
            var entity = service.GetData <Hre_ProfileQualificationEntity>(Common.DotNetToOracle(id.ToString()), ConstantSql.hrm_hr_sp_get_ProfileQualificationById, ref status).FirstOrDefault();

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