Example #1
0
        async Task <DTOODTCustom[]> LoadODTs()
        {
            DTOODTCustom[] Odts = null;

            return(await Task.Factory.StartNew(() =>
            {
                OperationClient WS = null;

                try{
                    WS = Utils.InitializeServiceClient();
                    Odts = WS.GetODTByCuadrilleroID(int.Parse(Utils.UsuarioApp.Iduser));
                }catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (WS != null)
                    {
                        WS.Close();
                    }
                }
                return Odts;
            }));
        }