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)); }
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)); }
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)); }
/// <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)); }