public JsonResult EditCffy(long id, int rtype, decimal money1, decimal money2)
        {
            var user      = UserContext.CurrentUser;
            var apiResult = new APIResult();

            try
            {
                if (rtype == 1)
                {
                    RoomRegFfRecordBll.EditCffy(id, money1, money2, user.Id, user.Name);
                }
                else if (rtype == 2)
                {
                    RoomRegGoodsDetailsBll.EditCffy(id, money1, money2, user.Id, user.Name);
                }
                else if (rtype == 3)
                {
                    RoomRegSwpcDetailsBll.EditCffy(id, money1, money2, user.Id, user.Name);
                }
                else if (rtype == 4)
                {
                    RoomRegQtfyBll.EditCffy(id, money1, money2, user.Id, user.Name);
                }
            }
            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 EditKdRemark(long id, int rtype, string kdRemark)
        {
            var apiResult = new APIResult();

            try
            {
                if (rtype == 1)
                {
                    RoomRegFfRecordBll.EditKdRemark(id, kdRemark);
                }
                else if (rtype == 2)
                {
                    RoomRegGoodsDetailsBll.EditKdRemark(id, kdRemark);
                }
                else if (rtype == 3)
                {
                    RoomRegSwpcDetailsBll.EditKdRemark(id, kdRemark);
                }
                else if (rtype == 4)
                {
                    RoomRegQtfyBll.EditKdRemark(id, kdRemark);
                }
                else if (rtype == 5)
                {
                    RoomRegHcDetailBll.EditKdRemark(id, kdRemark);
                }
                else if (rtype == 6)
                {
                    RoomRegYhBll.EditKdRemark(id, kdRemark);
                }
                else if (rtype == 7)
                {
                    RoomRegJfyhBll.EditKdRemark(id, kdRemark);
                }
            }
            catch (Exception ex)
            {
                apiResult.Ret = -1;
                apiResult.Msg = ex.Message;
                if (!(ex is OperationExceptionFacade))
                {
                    LogFactory.GetLogger().Log(LogLevel.Error, ex);
                }
            }
            return(Json(apiResult));
        }
Ejemplo n.º 3
0
        public JsonResult Del(long id)
        {
            var apiResult = new APIResult();

            try
            {
                RoomRegQtfyBll.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));
        }
Ejemplo n.º 4
0
 // GET: RoomRegQtfy
 public ActionResult Index(long roomRegId, long itemId = 0)
 {
     if (itemId == 0)
     {
         return(View(new RoomRegQtfy()
         {
             RoomRegId = roomRegId, FsTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm")
         }));
     }
     else
     {
         var model = RoomRegQtfyBll.GetById(itemId);
         if (model == null)
         {
             model = new RoomRegQtfy();
         }
         return(View(model));
     }
 }
        public ActionResult _Cffy(long id, int rtype)
        {
            var data = new RoomRegZw();

            if (rtype == 1)
            {
                var model = RoomRegFfRecordBll.GetById(id);
                data.Id       = model.Id.ToString();
                data.DjNum    = string.Empty;
                data.Remark   = model.Remark;
                data.KdRemark = model.KdRemark;
                data.Money    = model.Money.ToString();
            }
            else if (rtype == 2)
            {
                var model = RoomRegGoodsDetailsBll.GetById(id);
                data.Id       = model.Id.ToString();
                data.DjNum    = string.Empty;
                data.Remark   = model.Remark;
                data.KdRemark = model.KdRemark;
                data.Money    = model.Money.ToString();
            }
            else if (rtype == 3)
            {
                var model = RoomRegSwpcDetailsBll.GetById(id);
                data.Id       = model.Id.ToString();
                data.DjNum    = string.Empty;
                data.Remark   = model.Remark;
                data.KdRemark = model.KdRemark;
                data.Money    = model.Money.ToString();
            }
            else if (rtype == 4)
            {
                var model = RoomRegQtfyBll.GetById(id);
                data.Id       = model.Id.ToString();
                data.DjNum    = string.Empty;
                data.Remark   = model.Remark;
                data.KdRemark = model.KdRemark;
                data.Money    = model.Money.ToString();
            }

            return(View(data));
        }
Ejemplo n.º 6
0
        public JsonResult AddOrUpdate(RoomRegQtfy model)
        {
            var apiResult = new APIResult();
            var user      = UserContext.CurrentUser;

            try
            {
                RoomRegQtfyBll.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));
        }
        /// <summary>
        /// 获取其他费用
        /// </summary>
        /// <returns></returns>
        public string GetQtfyList(long roomRegId)
        {
            List <RoomRegHcDetail> fyList = new List <RoomRegHcDetail>();
            var list = RoomRegQtfyBll.GetList(roomRegId, 0);

            if (list != null && list.Count > 0)
            {
                foreach (var item in list)
                {
                    fyList.Add(new RoomRegHcDetail
                    {
                        Id        = 0,
                        RoomRegId = item.RoomRegId,
                        RType     = 4,
                        TargetId  = item.Id,
                        FeeName   = item.Name,
                        HotelId   = item.HotelId,
                        FeeMoney  = item.Money,
                        CzMoney   = 0
                    });
                }
            }
            return(JsonConvert.SerializeObject(fyList));
        }