コード例 #1
0
        public IHttpActionResult SavePermitWaiver(PermitWaiver pw)
        {
            var ua = Models.UserAccess.GetUserAccess(User.Identity.Name);

            if (!ua.impactfee_access)
            {
                return(Unauthorized());
            }
            var permit = PermitImpactFee.Get(pw.Permit_Number, pw.Waiver_Type, "");
            var error  = pw.Validate(permit);

            if (error.Length > 0)
            {
                return(Ok(error));
            }
            string IpAddress = ((HttpContextWrapper)Request.Properties["MS_HttpContext"]).Request.UserHostAddress;

            if (!pw.ApplyWaiver(permit, IpAddress, ua))
            {
                return(Ok("An error occurred while saving this permit's allocation, please try again.  If the error persists, please contact MIS."));
            }

            return(Ok("success"));
        }
コード例 #2
0
        public IHttpActionResult GetPermit(string Permit_Number, string Search_Type, string Agreement_Number = "")
        {
            var permit = PermitImpactFee.Get(Permit_Number, Search_Type, Agreement_Number);

            return(Ok(permit));
        }