public ActionResult RTEdit(房间类型DTO dto) { 房间类型DTO model = new 房间类型DTO(); if (dto.Id > 0) { model = _iRoomTypeService.GetDTO(dto.Id); } return(View(model)); }
public ActionResult RTSave(房间类型DTO dto) { var json = new { code = 0, msg = "保存成功", count = 0, data = "" }; _iRoomTypeService.Save(dto); return(Json(json)); }
public JsonResult RTDelete(房间类型DTO dto) { var json = new { code = 0, msg = "删除成功", count = 0, data = "" }; if (dto.Id > 0) { _iRoomTypeService.Del(dto); } return(Json(json)); }
public JsonResult RTList(房间类型DTO dTO) { var 房间 = _iRoomTypeService.List(dTO); if (房间.Count < 1) { dTO.CompanyId = 0; 房间 = _iRoomTypeService.List(dTO); } var json = new { code = 0, msg = "", count = 0, data = 房间.ToArray() }; return(Json(json, JsonRequestBehavior.AllowGet)); }
public JsonResult GetRTList(int?cid) { if (cid == null) { cid = 0; } var dto = new 房间类型DTO() { CompanyId = cid }; var rtlist = _iRTService.List(dto); if (rtlist.Count < 1) { dto.CompanyId = 0; rtlist = _iRTService.List(dto); } var gdto = new 客人类型DTO() { CompanyId = cid }; var gtlist = _iGTService.List(gdto); if (gtlist.Count < 1) { gdto.CompanyId = 0; gtlist = _iGTService.List(gdto); } var json = new { rtlist = rtlist.ToArray(), gtlist = gtlist.ToArray(), info = gdto }; return(Json(json, JsonRequestBehavior.AllowGet)); }