Ejemplo n.º 1
0
 public async Task <IDataReader> List()
 {
     using (var oSqlDataAdapter = new SqlDataAdapter(this.ConnectionString))
     {
         return(await oSqlDataAdapter.QueryAsync("[ES].usp_selDrivers_impersonate"));
     }
 }
Ejemplo n.º 2
0
 public async Task <IDataReader> List()
 {
     using (var oSqlDataAdapter = new SqlDataAdapter(this.ConnectionString))
     {
         return(await oSqlDataAdapter.QueryAsync("[EmailFax].[uspGet_PM_Servers]"));
     }
 }
 public async Task <IDataReader> ListStatuses()
 {
     using (var oSqlDataAdapter = new SqlDataAdapter(this.ConnectionString))
     {
         return(await oSqlDataAdapter.QueryAsync("[ES].[usp_selStatuses]"));
     }
 }
Ejemplo n.º 4
0
        public async Task <IDataReader> List(int iRunID)
        {
            var lstParameters = new List <IDbDataParameter>();

            using (var oSqlDataAdapter = new SqlDataAdapter(this.ConnectionString))
            {
                var oSqlParameter = oSqlDataAdapter.AddParameter("@RunNumber", DbType.Int32, iRunID, ParameterDirection.Input);
                lstParameters.Add(oSqlParameter);

                return(await oSqlDataAdapter.QueryAsync("[ES].[usp_selDriverStops]", lstParameters));
            }
        }
Ejemplo n.º 5
0
        public async Task <IDataReader> List(string sLocationCode)
        {
            var lstParameters = new List <IDbDataParameter>();

            using (var oSqlDataAdapter = new SqlDataAdapter(this.ConnectionString))
            {
                var oSqlParameter = oSqlDataAdapter.AddParameter("@LocationCode", DbType.String, sLocationCode, ParameterDirection.Input, 2);
                lstParameters.Add(oSqlParameter);

                return(await oSqlDataAdapter.QueryAsync("[ES].[usp_selStatuses]", lstParameters));
            }
        }
Ejemplo n.º 6
0
        public async Task <IDataReader> Get(int iRunNo)
        {
            var lstParameters = new List <IDbDataParameter>();

            using (var oSqlDataAdapter = new SqlDataAdapter(this.ConnectionString))
            {
                var oSqlParameter = oSqlDataAdapter.AddParameter("@Run_No", DbType.Int32, iRunNo, ParameterDirection.Input);
                lstParameters.Add(oSqlParameter);

                return(await oSqlDataAdapter.QueryAsync("[ES].[usp_chkDLog_GetRunInfo]", lstParameters));
            }
        }
Ejemplo n.º 7
0
        public async Task <IDataReader> GetRunInfo(string sDriverCode)
        {
            var lstParameters = new List <IDbDataParameter>();

            using (var oSqlDataAdapter = new SqlDataAdapter(this.ConnectionString))
            {
                var oSqlParameter = oSqlDataAdapter.AddParameter("@Drv_CD", DbType.String, sDriverCode, ParameterDirection.Input, 4);
                lstParameters.Add(oSqlParameter);

                return(await oSqlDataAdapter.QueryAsync("[ES].[usp_sel_GetDriverInfo]", lstParameters));
            }
        }
Ejemplo n.º 8
0
        public async Task <IDataReader> Authenticate(string sUserID, string sPassword)
        {
            var lstParameters = new List <IDbDataParameter>();

            using (var oSqlDataAdapter = new SqlDataAdapter(this.ConnectionString))
            {
                var oSqlParameter = oSqlDataAdapter.AddParameter("@User_name", DbType.String, sUserID, ParameterDirection.Input, 25);
                lstParameters.Add(oSqlParameter);

                byte[] aPasswordBytes = Md5Hash.Current.Compute(sPassword);
                oSqlParameter = oSqlDataAdapter.AddParameter("@Password", DbType.Binary, aPasswordBytes, ParameterDirection.Input);
                lstParameters.Add(oSqlParameter);

                return(await oSqlDataAdapter.QueryAsync("[ES].[usp_sel_GetAuthenticatedUser]", lstParameters));
            }
        }
Ejemplo n.º 9
0
        public async Task <IDataReader> Update(int iRunNo, string sNote, byte[] aSignature)
        {
            var lstParameters = new List <IDbDataParameter>();

            using (var oSqlDataAdapter = new SqlDataAdapter(this.ConnectionString))
            {
                var oSqlParameter = oSqlDataAdapter.AddParameter("@Run_No", DbType.Int32, iRunNo, ParameterDirection.Input);
                lstParameters.Add(oSqlParameter);

                oSqlParameter = oSqlDataAdapter.AddParameter("@Note", DbType.String, sNote, ParameterDirection.Input);
                lstParameters.Add(oSqlParameter);

                oSqlParameter = oSqlDataAdapter.AddParameter("@Signature", DbType.Binary, aSignature, ParameterDirection.Input, -1);
                lstParameters.Add(oSqlParameter);


                return(await oSqlDataAdapter.QueryAsync("[ES].usp_updDLog_RunHeader", lstParameters));
            }
        }