Beispiel #1
0
        public PermitFee GetPermitFee()
        {
            PermitFee result = new PermitFee();

            try
            {
                result = context.PermitFee.FirstOrDefault();
            }
            catch (Exception ex)
            {
                result = null;
            }
            return(result);
        }
Beispiel #2
0
        public PermitFee UpdatePermitFee(PermitFee model)
        {
            PermitFee result = new PermitFee();

            try
            {
                var permitFee = context.PermitFee.Where(x => x.PermitFeeId.Equals(model.PermitFeeId)).FirstOrDefault();
                if (permitFee != null)
                {
                    permitFee.MaximumFee       = model.MaximumFee;
                    permitFee.MinimumFee       = model.MinimumFee;
                    permitFee.NewMaximumFee    = model.NewMaximumFee;
                    permitFee.NewMinimumFee    = model.NewMinimumFee;
                    permitFee.NewEffectiveDate = model.NewEffectiveDate;
                    context.SaveChanges();
                }
                result = permitFee;
            }
            catch (Exception ex)
            {
                result = null;
            }
            return(result);
        }