Exemple #1
0
        public ActionResult _KhxyEdit(string agreeCompId = "", long id = 0)
        {
            if (id <= 0)
            {
                return(View(new AgreeCompanyKhxy()
                {
                    AgreeCompId = agreeCompId, HotelId = UserContext.CurrentUser.HotelId
                }));
            }
            var info = AgreeCompanyKhxyBll.GetById(id);

            return(View(info));
        }
Exemple #2
0
        public ActionResult KhxyDelete(long id)
        {
            var apiResult = new APIResult();

            try
            {
                AgreeCompanyKhxyBll.DeleteById(id);
            }
            catch (Exception ex)
            {
                apiResult.Ret = -1;
                apiResult.Msg = ex.Message;
                if (!(ex is OperationExceptionFacade))
                {
                    LogFactory.GetLogger().Log(LogLevel.Error, ex);
                }
            }
            return(Json(apiResult));
        }
Exemple #3
0
        public JsonResult EditXynr(AgreeCompanyKhxy model)
        {
            var apiResult = new APIResult();
            var user      = UserContext.CurrentUser;

            try
            {
                AgreeCompanyKhxyBll.AddOrUpdateXynr(model, user.Id, user.Name, user.HotelId);
            }
            catch (Exception ex)
            {
                apiResult.Ret = -1;
                apiResult.Msg = ex.Message;
                if (!(ex is OperationExceptionFacade))
                {
                    LogFactory.GetLogger().Log(LogLevel.Error, ex);
                }
            }

            return(Json(apiResult));
        }
Exemple #4
0
        /// <summary>
        /// 获取客户协议列表
        /// </summary>
        /// <param name="agreeCompId"></param>
        /// <returns></returns>
        public string GetKhxyList(string agreeCompId)
        {
            var datas = AgreeCompanyKhxyBll.GetList(UserContext.CurrentUser.HotelId, agreeCompId);

            return(JsonConvert.SerializeObject(datas));
        }