public ActionResult Receipts(string hospitalId)
        {
            ViewBag.HospitalId = hospitalId;
            var list = new ReceiptInfoService().GetByHospital(hospitalId);

            return(View(list));
        }
        public ActionResult JsonReceipts(string hospitalId)
        {
            if (string.IsNullOrWhiteSpace(hospitalId))
            {
                return(JsonNet(new ResponseResult(false, null)));
            }
            var           list         = new ReceiptInfoService().GetByHospital(hospitalId).ToList();
            List <object> receiptsList = new List <object>();

            list.ForEach(m =>
            {
                receiptsList.Add(new
                {
                    Id         = m.Id,
                    HospitalId = m.HospitalId,
                    Title      = m.Title,
                    Tax        = m.Tax,
                    display    = true,
                    edit       = false
                });
            });
            return(JsonNet(new ResponseResult(true, new
            {
                Receipts = receiptsList,
                hospitalId
            })));
        }
        private IDictionary <string, ReceiptInfoModel> GetHospitalReceipts(string hospitalId)
        {
            var list = new ReceiptInfoService().GetByHospital(hospitalId);

            var dic = new Dictionary <string, ReceiptInfoModel>();

            foreach (var item in list)
            {
                dic[item.Id] = item;
            }

            return(dic);
        }
예제 #4
0
 public ReceiptInfoController()
 {
     serviceRoom = new ReceiptInfoService(db);
 }