public async Task <IActionResult> GetAllCommRate()
 {
     try
     {
         CommRates rates = new CommRates();
         return(Ok(await rates.GetAsync(contextWeb)));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
        public async Task <IActionResult> UpdateCommRate([FromForm] CommRates commRates)
        {
            try
            {
                await commRates.UpdateAsync(commRates, contextWeb);

                return(Ok());
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
        public async Task <IActionResult> DeleteCommRat([FromForm] int id)
        {
            try
            {
                var commRates = new CommRates
                {
                    ID = id
                };
                await commRates.DeleteAsync(commRates, contextWeb);

                return(Ok());
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
        public async Task <IActionResult> GetCommRate([FromQuery] string PlanCode)
        {
            try
            {
                CommRates rates = new CommRates();
                AmqPlan   plan  = new AmqPlan();

                if (await plan.IsActivePlan(PlanCode, contextFt))
                {
                    return(Ok(await rates.GetByPlanCodeAsync(PlanCode, contextWeb)));
                }
                else
                {
                    return(Ok());
                }
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }