예제 #1
0
        public UpdateCalendarResponse UpdateBranchCalendar(UpdateBranchCalendarRequest request)
        {
            ThreadContext.Properties["EventClass"]    = ApplicationHelpers.GetCurrentMethod(1);
            ThreadContext.Properties["RemoteAddress"] = ApplicationHelpers.GetClientIP();

            _branchFacade = new BranchFacade();
            return(_branchFacade.UpdateBranchCalendar(request));
        }
예제 #2
0
        public CreateBranchResponse InsertOrUpdateBranch(InsertOrUpdateBranchRequest request)
        {
            ThreadContext.Properties["EventClass"]    = ApplicationHelpers.GetCurrentMethod(1);
            ThreadContext.Properties["RemoteAddress"] = ApplicationHelpers.GetClientIP();

            _branchFacade = new BranchFacade();
            var response = _branchFacade.InsertOrUpdateBranch(request);

            return(response);
        }
예제 #3
0
        public ActionResult AutoCompleteSearchBranchByBranchIds(string keyword, string branchIds)
        {
            Logger.Info(_logMsg.Clear().SetPrefixMsg("Auto Complete Search Branch by BranchIds").ToInputLogString());

            try
            {
                _branchFacade = new BranchFacade();
                List <BranchEntity> result = _branchFacade.GetBranchByBranchIds(keyword, branchIds.Split(',').Select(Int32.Parse).ToList(), AutoCompleteMaxResult);

                return(Json(result.Select(r => new
                {
                    r.BranchId,
                    r.BranchName,
                }).Distinct().ToList()));
            }
            catch (Exception ex)
            {
                Logger.Info(_logMsg.Clear().SetPrefixMsg("Auto Complete Search Branch by BranchIds").ToFailLogString());
                return(Error(new HandleErrorInfo(ex, this.ControllerContext.RouteData.Values["controller"].ToString(),
                                                 this.ControllerContext.RouteData.Values["action"].ToString())));
            }
        }
예제 #4
0
 public BranchesController(IBranchFacade branchFacade)
 {
     _branchFacade = branchFacade;
 }