Example #1
0
        public int getSQLIntValue(string sql)
        {
            int value = 0;

            tq.Que _q = tq.Que.Execute(_ConnectionString, sql, tq.Que.ExecutionEnum.ExecuteReader);
            if (_q.DataTable.Rows.Count > 0)
            {
                value = int.Parse(_q.DataTable.Rows[0][0].ToString());
            }
            _q.Dispose();

            return(value);
        }
Example #2
0
        public string getSQLStringValue(string sql)
        {
            string value = "";

            tq.Que _q = tq.Que.Execute(this.ConnectionString, sql, tq.Que.ExecutionEnum.ExecuteReader);
            if (_q.DataTable.Rows.Count > 0)
            {
                value = _q.DataTable.Rows[0][0].ToString();
            }
            _q.Dispose();

            return(value);
        }
Example #3
0
        public decimal getSQLDecimalValue(string sql)
        {
            decimal value = 0;

            tq.Que _q = tq.Que.Execute(this.ConnectionString, sql, tq.Que.ExecutionEnum.ExecuteReader);
            if (_q.DataTable.Rows.Count > 0)
            {
                value = (decimal)_q.DataTable.Rows[0][0];
            }
            _q.Dispose();

            return(value);
        }
Example #4
0
        /**
         * temporary set to non blocking code.
         * always return boolean true
         */
        public bool queueFailedRequest(string module, string reference_id, long lPartID, bool isdeleted)
        {
            bool response = true;

            tq.Que processSql = null;

            if (string.IsNullOrEmpty(module) || string.IsNullOrEmpty(reference_id))
            {
                return(response);
            }

            string sql = "call usp_tmpUpdates('" + module + "','" + reference_id + "'," + lPartID + "," + Convert.ToInt16(isdeleted) + ",0)";

            processSql = tq.Que.Execute(this.ConnectionString.ToString(),
                                        sql, tq.Que.ExecutionEnum.ExecuteNonQuery);

            return(response);
        }
Example #5
0
        public DataTable getTable(string sql)
        {
            DataTable table = new DataTable();

            try
            {
                tq.Que q = tq.Que.Execute(this.ConnectionString, sql, tq.Que.ExecutionEnum.ExecuteReader);
                if (q.Rows > 0)
                {
                    table = q.DataTable;
                }
            }
            catch (Exception e)
            {
                _ErrorMessage = e.Message;;
            }

            return(table);
        }
Example #6
0
 public DataTable getDataTable(string sqlcommand)
 {
     tq.Que _q = tq.Que.Execute(this.ConnectionString, sqlcommand, TarsierEyes.MySQL.Que.ExecutionEnum.ExecuteReader);
     return(_q.DataTable);
 }