/// <summary>
 /// Lấy tất cả dữ liệu trong table 
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public ActionResult GetAll([DataSourceRequest] DataSourceRequest request)
 {
     var service = new RestServiceClient<IEnumerable<Cat_TAMScanReasonMissModel>>(UserLogin);
     service.SetCookies(Request.Cookies, _hrm_Hr_Service);
     var result = service.Get(_hrm_Hr_Service, "api/Cat_TAMScanReasonMissForAtt/");
     return Json(result.ToDataSourceResult(request));
 }
예제 #2
0
 // <summary>
 /// Lấy tất cả dữ liệu trong table Sys_Resource
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public ActionResult GetAll([DataSourceRequest] DataSourceRequest request)
 {
     var service = new RestServiceClient<IEnumerable<Sys_ResourceModel>>(UserLogin);
     service.SetCookies(Request.Cookies, _hrm_Sys_Service);
     var result = service.Get(_hrm_Sys_Service, "api/SysResource/");
     return Json(result.ToDataSourceResult(request));
 }
 /// <summary>
 /// Lấy tất cả dữ liệu Ca Làm Việc
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public ActionResult GetAll([DataSourceRequest] DataSourceRequest request)
 {
     var service = new RestServiceClient<List<Att_ReportDetailForgetCardModel>>(UserLogin);
     service.SetCookies(Request.Cookies, _Hrm_Hre_Service);
     var result = service.Get(_Hrm_Hre_Service, "api/Att_ReportDetailForgetCard/");
     return Json(result.ToDataSourceResult(request));
 }
예제 #4
0
 public ActionResult Edit(Guid id)
 {
     var service = new RestServiceClient<Att_WorkdayModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
     var result = service.Get(_Hrm_Hre_Service, "api/Att_WorkDay/",id);
     return View(result);
 }
        public void Export(Att_ReportDetailForgetCardModel model)
        {

            var service = new RestServiceClient<List<Att_ReportDetailForgetCardModel>>(UserLogin);
            service.SetCookies(Request.Cookies, _Hrm_Hre_Service);
            var result = service.PostAll(_Hrm_Hre_Service, "api/Att_ReportDetailForgetCard/", model);
        }
예제 #6
0
 /// <summary>
 /// Tạo mời một Can_Canteen
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ActionResult Add([Bind] Can_CanteenModel model)
 {
     var service = new RestServiceClient<Can_CanteenModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Can_Service);
     var result = service.Put(_hrm_Can_Service, "api/Can_Canteen/", model);
     return Json(result);
 }
예제 #7
0
 /// <summary>
 /// Tạo mời một AttWorkDay
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ActionResult Add([Bind] Att_WorkdayModel model)
 {
     var service = new RestServiceClient<Att_WorkdayModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
     var result = service.Put(_Hrm_Hre_Service, "api/Att_WorkDay/", model);
     return Json(result);
 }
예제 #8
0
 public ActionResult Edit(string id)
 {
     var service = new RestServiceClient<Rec_RecruitmentHistoryModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
     var result = service.Get(_Hrm_Hre_Service, "api/Rec_RecruitmentHistory/", id);
     return View(result);
 }
예제 #9
0
 public ActionResult Remove(Guid id)
 {
     var service = new RestServiceClient<Att_WorkdayModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
     var result = service.Delete(_Hrm_Hre_Service, "api/Att_WorkDay/", id);
     return Json(result);
 }
예제 #10
0
 public ActionResult SalCostCentreInfo(string id)
 {
     //bool isAccess;
     //if (!string.IsNullOrEmpty(id))
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Sal_CostCentre);
     //}
     //else
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Sal_CostCentre);
     //}
     //if (!isAccess)
     //{
     //    return PartialView("AccessDenied");
     //}
     if (!string.IsNullOrEmpty(id))
     {
         var id1 = Common.ConvertToGuid(id);
         var service = new RestServiceClient<SalCostCentreModel>(UserLogin);
         service.SetCookies(Request.Cookies, _hrm_Hr_Service);
         var modelResult = service.Get(_hrm_Hr_Service, "api/Sal_CostCentre/", id1);
         return View(modelResult);
     }
     else
     {
         return View();
     }
 }
예제 #11
0
 /// <summary>
 /// Lấy tất cả dữ liệu trong table AttWorkDay
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public ActionResult GetAll([DataSourceRequest] DataSourceRequest request)
 {
     var service = new RestServiceClient<IEnumerable<Att_WorkdayModel>>(UserLogin);
     service.SetCookies(Request.Cookies, _Hrm_Hre_Service);
     var result = service.Get(_Hrm_Hre_Service, "api/Att_WorkDay/");
     return Json(result.ToDataSourceResult(request));
 }
예제 #12
0
 public ActionResult EvaluationContractInfo(string id)
 {
     //bool isAccess;
     //if (!string.IsNullOrEmpty(id))
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Hre_Qualification);
     //}
     //else
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Hre_Qualification);
     //}
     //if (!isAccess)
     //{
     //    return PartialView("AccessDenied");
     //}
     if (!string.IsNullOrEmpty(id))
     {
         var service = new RestServiceClient<Hre_ContractModel>(UserLogin);
         service.SetCookies(Request.Cookies, _hrm_Hr_Service);
         var result = service.Get(_hrm_Hr_Service, "api/Hre_Contract/", id);
         return View(result);
     }
     else
     {
         return View();
     }
 }
예제 #13
0
 public ActionResult CreateOrUpdate(string id)
 {
     //bool isAccess;
     //if (!string.IsNullOrEmpty(id))
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Cat_OrgStructure);
     //}
     //else
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Cat_OrgStructure);
     //}
     //if (!isAccess)
     //{
     //    return PartialView("AccessDenied");
     //}
     if (!string.IsNullOrEmpty(id))
     {
         var idModel = Common.ConvertToGuid(id);
         var service = new RestServiceClient<CatOrgStructureModel>(UserLogin);
         service.SetCookies(Request.Cookies, _hrm_Hr_Service);
         var result = service.Get(_hrm_Hr_Service, "api/CatOrgStructure/", idModel);
         return View(result);
     }
     else
     {
         return View();
     }
 }
예제 #14
0
 public ActionResult Remove(string id)
 {
     var service = new RestServiceClient<CatElementModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
     var result = service.Delete(_hrm_Hr_Service, "api/CatElement/", id);
     return Json(result);
 }
예제 #15
0
 /// <summary>
 /// Lấy tất cả dữ liệu trong table Cat_Brand
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public ActionResult Get([DataSourceRequest] DataSourceRequest request)
 {
     var service = new RestServiceClient<IEnumerable<Cat_SupplierModel>>(UserLogin);
     service.SetCookies(Request.Cookies, _hrm_Hr_Service);
     var result = service.Get(_hrm_Hr_Service, "api/Cat_Brand/");
     return Json(result.ToDataSourceResult(request));
 }
예제 #16
0
 /// <summary>
 /// Lấy tất cả dữ liệu cho control multiselect
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public JsonResult GetMultiselect()
 {
     var service = new RestServiceClient<IEnumerable<CatDistrictModel>>(UserLogin);
     service.SetCookies(Request.Cookies, _hrm_Hre_Service);
     var result = service.Get(_hrm_Hre_Service, "api/CatDistrict/");
     return Json(result, JsonRequestBehavior.AllowGet);
 }
예제 #17
0
 public ActionResult Edit(Guid id)
 {
     var service = new RestServiceClient<Rep_MasterModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Sys_Service);
     var result = service.Get(_hrm_Sys_Service, "api/Rep_Master/", id);
     return View(result);
 }
예제 #18
0
 /// <summary>
 /// Lấy tất cả dữ liệu trong table Sys_DelegateApprove
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public ActionResult Get([DataSourceRequest] DataSourceRequest request)
 {
     var service = new RestServiceClient<IEnumerable<Sys_DelegateApproveModel>>();
     service.SetCookies(Request.Cookies, _hrm_Sys_Service);
     var result = service.Get(_hrm_Sys_Service, "api/Sys_DelegateApprove/");
     return Json(result.ToDataSourceResult(request));
 }
예제 #19
0
 /// <summary>
 /// Lấy tất cả dữ liệu trong table CatDistrict
 /// </summary>
 /// <returns></returns>
 public IEnumerable<CatProvinceModel> GetAllCatProvince()
 {           
     var service = new RestServiceClient<IEnumerable<CatProvinceModel>>(UserLogin);
     service.SetCookies(Request.Cookies, _hrm_Hre_Service);
     var result = service.Get(_hrm_Hre_Service, "api/CatProvince/");
     return result;
 }
예제 #20
0
 public ActionResult Add([Bind] Sys_GroupUserModel model)
 {
     var service = new RestServiceClient<Sys_GroupUserModel>();
     service.SetCookies(this.Request.Cookies, _hrm_Sys_Service);
     var result = service.Put(_hrm_Sys_Service, "api/Sys_GroupUser/", model);
     return Json(result);
 }
 public ActionResult ReportTotalAnnualTaxableInComeConfigElementIfno(string id)
 {
     //bool isAccess;
     //if (!string.IsNullOrEmpty(id))
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Sal_ItemForShop);
     //}
     //else
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Sal_ItemForShop);
     //}
     //if (!isAccess)
     //{
     //    return PartialView("AccessDenied");
     //}
     if (!string.IsNullOrEmpty(id))
     {
         var id1 = Common.ConvertToGuid(id);
         var service = new RestServiceClient<Sys_AllSettingModel>(UserLogin);
         service.SetCookies(Request.Cookies, _Hrm_Sys_Service);
         var modelResult = service.Get(_Hrm_Sys_Service, "api/Sal_ItemForShop/", id1);
         return View(modelResult);
     }
     else
     {
         return View();
     }
 }
예제 #22
0
 public ActionResult ReadGrid([DataSourceRequest] DataSourceRequest request, int id)
 {
     var service = new RestServiceClient<IEnumerable<Sys_GroupUserModel>>();
     service.SetCookies(Request.Cookies, _hrm_Sys_Service);
     var result = service.Put(_hrm_Sys_Service, "api/Sys_GroupUser/", id).ToList();
     return Json(result.ToDataSourceResult(request));
 } 
예제 #23
0
 public ActionResult PerformanceExtendInfo(string id, Guid? PerformanceID)
 {
     //bool isAccess;
     //if (!string.IsNullOrEmpty(id))
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Eva_PerformanceExtend);
     //}
     //else
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Eva_PerformanceExtend);
     //}
     //if (!isAccess)
     //{
     //    return PartialView("AccessDenied");
     //}
     ViewData["PerformanceID"] = PerformanceID;
     if (!string.IsNullOrEmpty(id))
     {
         var service = new RestServiceClient<Eva_PerformanceExtendModel>(UserLogin);
         service.SetCookies(Request.Cookies, _Hrm_Hr_Service);
         var result = service.Get(_Hrm_Hr_Service, "api/Eva_PerformanceExtend/", id);
         return View(result);
     }
     else
     {
         return View();
     }
 }
예제 #24
0
 public ActionResult Remove(Guid id)
 {
     var service = new RestServiceClient<Can_CanteenModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Can_Service);
     var result = service.Delete(_hrm_Can_Service, "api/Can_Canteen/", id);
     return Json(result);
 }
예제 #25
0
        public Test()
        {
            restClient = new RestServiceClient();
            restClient.Proxy.Credentials = CredentialCache.DefaultCredentials;

            //!!! Please provide your application id and password here
            // To create an application and obtain a password,
            // register at http://cloud.ocrsdk.com/Account/Register
            // More info on getting your application id and password at
            // http://ocrsdk.com/documentation/faq/#faq3

            /*
			// Name of application you created
            restClient.ApplicationId = "<your application id>";
			// Password should be sent to your e-mail after application was created
            restClient.Password = "******";
             */

            // Display hint to provide credentials
            if (String.IsNullOrEmpty(restClient.ApplicationId) ||
                String.IsNullOrEmpty(restClient.Password))
            {
                throw new Exception("Please provide access credentials to Cloud OCR SDK service! See Test.cs file for details!");
            }

            Console.WriteLine(String.Format("Application id: {0}\n", restClient.ApplicationId));
        }
예제 #26
0
 public ActionResult HreHDTJobInfo(Guid id)
 {
     //bool isAccess;
     //if (id != null && id != Guid.Empty)
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Hre_HDTJob);
     //}
     //else
     //{
     //    isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Hre_HDTJob);
     //}
     //if (!isAccess)
     //{
     //    return PartialView("AccessDenied");
     //}
     if (id != null && id != Guid.Empty)
     {
        // var id1 = Common.ConvertToGuid(id);
         var service = new RestServiceClient<Hre_HDTJobModel>(UserLogin);
         service.SetCookies(Request.Cookies, _hrm_Hr_Service);
         var result = service.Get(_hrm_Hr_Service, "api/Hre_HDTJob/", id);
         return View(result);
     }
     else
     {
         return View();
     }
 }
예제 #27
0
        public Window1()
        {
            InitializeComponent();

            restClient = new RestServiceClient();
            restClient.Proxy.Credentials = CredentialCache.DefaultCredentials;
            restClient.ServerUrl = Properties.Settings.Default.ServerAddress;

            if (String.IsNullOrEmpty(Properties.Settings.Default.ApplicationId) || String.IsNullOrEmpty(Properties.Settings.Default.Password) )
            {
                changeAppIdAndPwd();
            }


            restClient.ApplicationId = Properties.Settings.Default.ApplicationId;
            restClient.Password = Properties.Settings.Default.Password;

            restClientAsync = new RestServiceClientAsync(restClient);

            restClientAsync.UploadFileCompleted += UploadCompleted;
            restClientAsync.TaskProcessingCompleted += ProcessingCompleted;
            restClientAsync.DownloadFileCompleted += DownloadCompleted;
            restClientAsync.ListTasksCompleted += TaskListObtained;

            fieldLevelImage.RegionSelected += fieldSelected;
        }
예제 #28
0
 /// <summary>
 /// Chuyển trạng thái IsDelete = true
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public ActionResult Remove(Guid id)
 {
     var service = new RestServiceClient<Lau_MarkerModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Hre_Service);
     var result = service.Remove(_hrm_Hre_Service, "api/Lau_Marker/", id);
     return Json(result);
 }
예제 #29
0
        public ActionResult CreateOrUpdate(string id)
        {
           
           
            if (!string.IsNullOrEmpty(id))
            {
                var service = new RestServiceClient<Hre_ProfilePartyUnionModel>(UserLogin);
                service.SetCookies(Request.Cookies, _hrm_Hr_Service);
                var result = service.Get(_hrm_Hr_Service, "api/Hre_ProfilePartyUnion/", id);
                return View(result);
            }
            else
            {
                if (Request["profileID"] != null)
                {
                    string aaa = Request["profileID"].ToString();
                    if (!string.IsNullOrEmpty(aaa))
                    {

                        ViewBag.profileID = aaa;

                    }

                }
                return View();
            }
        }
예제 #30
0
        public ActionResult CreateList(List <Sys_AutoBackupModel> TotalCat_ElementModel, [Bind(Prefix = "models")] List <Sys_AutoBackupModel> updatedCat_ElementModel)
        {
            var service = new RestServiceClient <Sys_AutoBackupModel>();

            service.SetCookies(this.Request.Cookies, _hrm_Sys_Service);
            if (updatedCat_ElementModel != null)
            {
                for (int i = 0; i < updatedCat_ElementModel.Count; i++)
                {
                    service.Post(_hrm_Sys_Service, "api/Sys_AutoBackup/", updatedCat_ElementModel[i]);
                }
            }
            return(Json(updatedCat_ElementModel));
        }
예제 #31
0
        /// <summary>
        /// Xử lí thay doi trang thai cua roster group
        /// </summary>
        /// <param name="contract"></param>
        /// <returns></returns>
        public ActionResult SetStatusSelected(List <Guid> selectedIds, string status)
        {
            var rosterGroup = new Att_RosterGroupModel();

            if (selectedIds != null || selectedIds.Count > 0)
            {
                var service = new RestServiceClient <Att_RosterGroupModel>(UserLogin);
                service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
                rosterGroup.ProfileIds = Common.DotNetToOracle(String.Join(",", selectedIds));
                rosterGroup.Status     = status;
                service.Put(_Hrm_Hre_Service, "api/Att_RosterGroup/", rosterGroup);
            }
            return(Json(""));
        }
예제 #32
0
 public Rec_InterviewModel GetById(Guid?id)
 {
     if (id == null || id == Guid.Empty)
     {
         return(null);
     }
     else
     {
         var service = new RestServiceClient <Rec_InterviewModel>(UserLogin);
         service.SetCookies(Request.Cookies, _Hrm_Hre_Service);
         var result = service.Get(_Hrm_Hre_Service, "api/Rec_Candidate/", (Guid)id);
         return(result);
     }
 }
예제 #33
0
        public ActionResult Remove(Guid id)
        {
            //var isAccess = CheckPermission(UserId, PrivilegeType.Delete, ConstantPermission.Hre_CandidateHistory);
            //if (!isAccess)
            //{
            //    return PartialView("AccessDenied");
            //}
            var service = new RestServiceClient <Hre_CandidateHistoryModel>(UserLogin);

            service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
            var result = service.Remove(_hrm_Hr_Service, "api/CandidateHistory/", id);

            return(Json(result));
        }
예제 #34
0
 /// <summary>
 /// Tab Người Thân
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public ActionResult Hre_RelativesDetail([DataSourceRequest] DataSourceRequest request, Guid id)
 {
     if (id != Guid.Empty)
     {
         var service = new RestServiceClient <IEnumerable <Hre_RelativesModel> >(UserLogin);
         service.SetCookies(Request.Cookies, _hrm_Hr_Service);
         var result = service.Get(_hrm_Hr_Service, "api/Hre_RelativesCustom/", id);
         return(Json(result.ToDataSourceResult(request)));
     }
     else
     {
         return(View());
     }
 }
예제 #35
0
        public ActionResult Create([Bind] Hre_ProfileModel model)
        {
            //var isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.GeneralProfile);
            //if (!isAccess)
            //{
            //    return PartialView("AccessDenied");
            //}
            var service = new RestServiceClient <Hre_ProfileModel>(UserLogin);

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

            return(Json(result));
        }
예제 #36
0
        public ActionResult Tab_Hre(Guid id)
        {
            //var isAccess = CheckPermission(UserId, PrivilegeType.View, ConstantPermission.GeneralProfile);
            //if (!isAccess)
            //{
            //    return PartialView("AccessDenied");
            //}
            var service = new RestServiceClient <Hre_ProfileModel>(UserLogin);

            service.SetCookies(Request.Cookies, _hrm_Hr_Service);
            var result = service.Get(_hrm_Hr_Service, "api/Hre_Profile/", id);

            return(View(result));
        }
예제 #37
0
        public ActionResult Edit(Guid id)
        {
            var service = new RestServiceClient <Att_LeaveDayModel>(UserLogin);

            service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
            var result = service.Get(_Hrm_Hre_Service, "api/Att_Leaveday/", id);

            if (result != null)
            {
                result.HoursFrom = result.DateStart;
                result.HoursTo   = result.DateEnd;
            }
            return(View(result));
        }
예제 #38
0
 public ActionResult InsurancePayBackInfo(string id)
 {
     if (!string.IsNullOrEmpty(id))
     {
         var service = new RestServiceClient <Ins_InsuranceSalaryPaybackModel>(UserLogin);
         service.SetCookies(Request.Cookies, _Hrm_Hr_Service);
         var result = service.Get(_Hrm_Hr_Service, "api/Ins_InsuranceSalaryPayback/", id);
         return(View(result));
     }
     else
     {
         return(View());
     }
 }
예제 #39
0
        public ActionResult SetMethodPaymentSelected(List <Guid> selectedIds, string status)
        {
            var model = new Att_OvertimeModel();

            if (selectedIds != null || selectedIds.Count > 0)
            {
                var service = new RestServiceClient <Att_OvertimeModel>(UserLogin);
                service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
                model.ProfileIds    = String.Join(",", selectedIds);
                model.MethodPayment = status;
                model = service.Put(_Hrm_Hre_Service, "api/Att_Overtime/", model);
            }
            return(Json(model));
        }
예제 #40
0
        public ActionResult Edit(Guid id)
        {
            //var isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Sal_SalaryInformation);
            //if (!isAccess)
            //{
            //    return PartialView("AccessDenied");
            //}
            var service = new RestServiceClient <Sal_SalaryInformationModel>(UserLogin);

            service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
            var result = service.Get(_hrm_Hr_Service, "api/Sal_SalaryInformation/", id);

            return(View(result));
        }
예제 #41
0
        public ActionResult GetByProfileIdGrid([DataSourceRequest] DataSourceRequest request, Guid id)
        {
            //var isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Hre_Discipline);
            //if (!isAccess)
            //{
            //    return PartialView("AccessDenied");
            //}
            var service = new RestServiceClient <IEnumerable <Hre_DisciplineModel> >(UserLogin);

            service.SetCookies(Request.Cookies, _hrm_Hr_Service);
            var result = service.Get(_hrm_Hr_Service, "api/Hre_DisciplineCustom/", id);

            return(Json(result.ToDataSourceResult(request)));
        }
예제 #42
0
        public Att_AttendanceTableModel GetById(Guid id, Guid cutoffId)
        {
            var model = new ProfileIdAndCutOffIdModel()
            {
                ProfileId = id,
                CutOffId  = cutoffId
            };
            var service = new RestServiceClient <Att_AttendanceTableModel>(UserLogin);

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

            return(result);
        }
예제 #43
0
        public ActionResult Edit(Guid id)
        {
            //var isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Hre_Qualification);
            //if (!isAccess)
            //{
            //    return PartialView("AccessDenied");
            //}
            var service = new RestServiceClient <Hre_ProfileLanguageLevelModel>(UserLogin);

            service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
            var result = service.Get(_hrm_Hr_Service, "api/Hre_ProfileLanguage/", id);

            return(View(result));
        }
예제 #44
0
        public ActionResult MultiCreate([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")] IEnumerable <Att_OvertimeModel> attOvertime)
        {
            var service = new RestServiceClient <Att_OvertimeModel>(UserLogin);

            service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
            if (attOvertime != null)
            {
                foreach (var item in attOvertime)
                {
                    service.Put(_Hrm_Hre_Service, "api/Att_Overtime/", item);
                }
            }
            return(Json(attOvertime));
        }
예제 #45
0
        /// <summary>
        /// Xử lí thay doi trang thai cua ngày công
        /// </summary>
        /// <param name="contract"></param>
        /// <returns></returns>
        public ActionResult SetStatusSelected(string selectedIds, string status)
        {
            var model = new Lau_LaundryRecordModel();

            if (selectedIds != null)
            {
                var service = new RestServiceClient <Lau_LaundryRecordModel>(UserLogin);
                service.SetCookies(this.Request.Cookies, _hrm_Lau_Service);
                model.ProfileIDs = selectedIds;
                model.Status     = status;
                service.Put(_hrm_Lau_Service, "api/LaundryRecord/", model);
            }
            return(Json(""));
        }
예제 #46
0
 public ActionResult LocationInfo(Guid id)
 {
     if (id != Guid.Empty)
     {
         var service = new RestServiceClient <LMS_LocationLMSModel>(UserLogin);
         service.SetCookies(Request.Cookies, _hrm_Lau_Service);
         var modelResult = service.Get(_hrm_Lau_Service, "api/Lau_LocationLMS/", id);
         return(View(modelResult));
     }
     else
     {
         return(View());
     }
 }
예제 #47
0
 public ActionResult TabEva_KPIBuilding360(string id)
 {
     if (!string.IsNullOrEmpty(id))
     {
         var service = new RestServiceClient <Eva_KPIBuildingModel>(UserLogin);
         service.SetCookies(Request.Cookies, _Hrm_Hr_Service);
         var result = service.Get(_Hrm_Hr_Service, "api/Eva_KPIBuilding/", id);
         return(View(result));
     }
     else
     {
         return(View());
     }
 }
 public ActionResult RegisterOutInfo(string id)
 {
     if (!string.IsNullOrEmpty(id))
     {
         var service = new RestServiceClient <Hre_HDTJobModel>(UserLogin);
         service.SetCookies(Request.Cookies, _hrm_Hr_Service);
         var result = service.Get(_hrm_Hr_Service, "api/Hre_HDTJob/", id);
         return(View(result));
     }
     else
     {
         return(View());
     }
 }
예제 #49
0
        public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Sys_GroupUserModel model)
        {
            //if (ModelState.IsValid)
            //{
            var service = new RestServiceClient <Sys_GroupUserModel>(UserLogin);

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

            //return Json(result);
            //ViewBag.MsgUpdate = "Update success";
            //}
            return(Json(result));
        }
예제 #50
0
        public ActionResult Create([Bind(Prefix = "performanceModel")] Eva_PerformanceModel model, [Bind(Prefix = "models")] List <Eva_KPIModel> kpiModels)
        {
            if (kpiModels != null && kpiModels.Count != 0)
            {
                model.KPIs = kpiModels;
            }
            var service = new RestServiceClient <Eva_PerformanceModel>(UserLogin);

            service.SetCookies(this.Request.Cookies, _Hrm_Hr_Service);
            var result = service.Post(_Hrm_Hr_Service, "api/Eva_Performance360/", model);

            ViewBag.MsgInsert = "Insert success";
            return(Json(result, JsonRequestBehavior.AllowGet));
        }
예제 #51
0
 public Hre_ContractModel GetById(Guid?id)
 {
     if (id == null || id == Guid.Empty)
     {
         return(null);
     }
     else
     {
         var service = new RestServiceClient <Hre_ContractModel>(UserLogin);
         service.SetCookies(Request.Cookies, _hrm_Hr_Service);
         var result = service.Get(_hrm_Hr_Service, "api/Hre_Contract/", (Guid)id);
         return(result);
     }
 }
예제 #52
0
        /// <summary>
        /// Lấy card history theo profile Id
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        ///

        public ActionResult GetByProfileId(Guid id)
        {
            //var isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Hre_CardHistory);
            //if (!isAccess)
            //{
            //    return PartialView("AccessDenied");
            //}
            var service = new RestServiceClient <Hre_CardHistoryModel>(UserLogin);

            service.SetCookies(Request.Cookies, _hrm_Hr_Service);
            var result = service.Get(_hrm_Hr_Service, "api/Hre_CardHistoryCustom/", id);

            return(View(result));
        }
예제 #53
0
 public ActionResult Sys_CodeObjectInfo(string id)
 {
     if (!string.IsNullOrEmpty(id))
     {
         var guidId  = Common.ConvertToGuid(id);
         var service = new RestServiceClient <Sys_CodeObjectModel>(UserLogin);
         service.SetCookies(Request.Cookies, _hrm_Sys_Service);
         var modelResult = service.Get(_hrm_Sys_Service, "api/Sys_CodeObject/", guidId);
         return(View(modelResult));
     }
     else
     {
         return(View());
     }
 }
예제 #54
0
 public ActionResult HreStopWorkingInfo(Guid id)
 {
     if (id != null && id != Guid.Empty)
     {
         //var id1 = Common.ConvertToGuid(id);
         var service = new RestServiceClient <Hre_StopWorkingModel>(UserLogin);
         service.SetCookies(Request.Cookies, _hrm_Hr_Service);
         var result = service.Get(_hrm_Hr_Service, "api/Hre_StopWorking/", id);
         return(View(result));
     }
     else
     {
         return(View());
     }
 }
예제 #55
0
 public ActionResult TravelRequestRejectInfo(string id)
 {
     if (!string.IsNullOrEmpty(id))
     {
         var id1     = Common.ConvertToGuid(id);
         var service = new RestServiceClient <FIN_TravelRequestModel>(UserLogin);
         service.SetCookies(Request.Cookies, _hrm_Hr_Service);
         var modelResult = service.Get(_hrm_Hr_Service, "api/Fin_TravelRequest/", id1);
         return(View(modelResult));
     }
     else
     {
         return(View());
     }
 }
예제 #56
0
 public ActionResult Cat_TAMScanReasonMissInfo(string id)
 {
     if (!string.IsNullOrEmpty(id))
     {
         var id1     = Common.ConvertToGuid(id);
         var service = new RestServiceClient <Cat_TAMScanReasonMissModel>(UserLogin);
         service.SetCookies(Request.Cookies, _hrm_Hr_Service);
         var result = service.Get(_hrm_Hr_Service, "api/Cat_TAMScanReasonMiss/", id1);
         return(View(result));
     }
     else
     {
         return(View());
     }
 }
 public ActionResult CatAppendixContractTypeInfo(string id)
 {
     if (!string.IsNullOrEmpty(id))
     {
         var id1     = Common.ConvertToGuid(id);
         var service = new RestServiceClient <Cat_AppendixContractTypeModel>(UserLogin);
         service.SetCookies(Request.Cookies, _hrm_Hr_Service);
         var modelResult = service.Get(_hrm_Hr_Service, "api/Cat_AppendixContractType/", id1);
         return(View(modelResult));
     }
     else
     {
         return(View());
     }
 }
예제 #58
0
        public ActionResult CreateAdvancePaymentList(List <CatElementModel> TotalCat_ElementModel, [Bind(Prefix = "models")] List <CatElementModel> updatedCat_ElementModel)
        {
            var service = new RestServiceClient <CatElementModel>(UserLogin);

            service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
            if (updatedCat_ElementModel != null)
            {
                for (int i = 0; i < updatedCat_ElementModel.Count; i++)
                {
                    updatedCat_ElementModel[i].MethodPayroll = MethodPayroll.E_ADNVANCE_PAYMENT.ToString();
                    service.Post(_hrm_Hr_Service, "api/CatElement/", updatedCat_ElementModel[i]);
                }
            }
            return(Json(updatedCat_ElementModel));
        }
        public ActionResult RemoveSelecteds(List <Guid> selectedIds)
        {
            var user = new List <Rec_SourceAdsModel>();

            if (selectedIds != null)
            {
                var service = new RestServiceClient <Rec_CandidateModel>(UserLogin);
                service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
                foreach (var id in selectedIds)
                {
                    service.Delete(_Hrm_Hre_Service, "api/Rec_Candidate/", id);
                }
            }
            return(Json(""));
        }
예제 #60
-1
 public ActionResult Edit(Guid id)
 {
     var service = new RestServiceClient<Cat_SkillModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
     var result = service.Get(_hrm_Hr_Service, "api/Cat_Skill/", id);
     return View(result);
 }