Exemplo n.º 1
0
        //Default Selection
        public static ControlCategorySettingsDto GetControlCategorySettings(this IRepository<CatDefault> repository, string Username)
        {
            ControlCategorySettingsDto ControlCategorySettingsDto = new ControlCategorySettingsDto();

            var CatSettings = repository.Queryable();

            CatDefault CatDefault = CatSettings.Where(t=>t.UserName == Username).First();
            ControlCategorySettingsDto.CatAssisted = Enum.GetName(typeof(CatAssistedEnum), CatDefault.CatAssistedEnum);
            ControlCategorySettingsDto.CatBand = Enum.GetName(typeof(CatBandEnum), CatDefault.CatBandEnum);
            ControlCategorySettingsDto.CatNoOfTx = Enum.GetName(typeof(CatNoOfTxEnum), CatDefault.CatNoOfTxEnum);
            ControlCategorySettingsDto.CatOperator = Enum.GetName(typeof(CatOperatorEnum), CatDefault.CatOperatorEnum);
            ControlCategorySettingsDto.CatPower = Enum.GetName(typeof(CatPowerEnum), CatDefault.CatPowerEnum);
            return ControlCategorySettingsDto;
        }
Exemplo n.º 2
0
 public async Task<IHttpActionResult> PostCallsRequest(ControlCategorySettingsDto ControlCategorySettingsDto)
 {
     DataCalls DataCalls = null;
     if (DataCalls == null)
     {
         return NotFound();
     }
     else
     {
         return Ok(DataCalls);
     }
 }