public ActionResult ReturnEdit(string id)
        {
            var unitService = new UnitService();
            var vendors     = unitService.GetVendorsByHospital(this.UserContext.CurrentHospital);

            if (string.IsNullOrEmpty(id))
            {
                ViewBag.Context = new
                {
                    FormNo    = IdentityCreatorService.New(IdentityKey.APPLY_FORM, this.UserContext.CurrentHospital),
                    ApplyDate = DateTime.Now,
                    Vendors   = vendors
                };
            }
            else
            {
                var entity = new ReturnFormService().Get(id);
                if (entity == null)
                {
                    throw new Exception("The return form does not exist.");
                }

                ViewBag.Context = new
                {
                    Form    = entity,
                    Vendors = vendors
                };
            }

            return(View());
        }
        public JsonNetResult QueryReturn(ReturnQueryCondition condition, PagerInfo pager)
        {
            try
            {
                condition.HospitalId = this.UserContext.CurrentHospital;

                var list = new ReturnFormService().Query(condition, pager);

                return(JsonNet(new ResponseResult(true, list, pager)));
            }
            catch (Exception e)
            {
                return(JsonNet(new ResponseResult(false, e)));
            }
        }