public ActionResult _ContactEdit(string agreeCompId = "", long id = 0) { if (id <= 0) { return(View(new AgreeCompanyContact() { AgreeCompId = agreeCompId, HotelId = UserContext.CurrentUser.HotelId })); } var info = AgreeCompanyContactBll.GetById(id); return(View(info)); }
public ActionResult ContactDelete(long id) { var apiResult = new APIResult(); try { AgreeCompanyContactBll.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 EditContact(AgreeCompanyContact model) { var apiResult = new APIResult(); var user = UserContext.CurrentUser; try { AgreeCompanyContactBll.AddOrUpdate(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)); }
public string GetContactList(string agreeCompId) { var datas = AgreeCompanyContactBll.GetList(UserContext.CurrentUser.HotelId, agreeCompId); return(JsonConvert.SerializeObject(datas)); }