Example #1
0
        public DataTable RetornarLogin(String strUsuario, string strPaswword)
        {
            DataTable dtbLogin = new DataTable();

            ServicioProperTime.ServicioProperTimeClient objServicioProperTime;
            objServicioProperTime = new ServicioProperTime.ServicioProperTimeClient();

            try
            {
                objServicioProperTime.Open();
                dtbLogin = objServicioProperTime.RetornarDatosLogin(strUsuario, strPaswword).Tables[0];
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (objServicioProperTime != null && objServicioProperTime.State == System.ServiceModel.CommunicationState.Opened)
                {
                    objServicioProperTime.Close();
                }
            }
            return(dtbLogin);
        }