public bool ChanegeUserPasswod_DBH(string un, string oldpass, string newpass)
        {
            bool ret = false;

            ret = this.Execute_Insert(MyQueryBuilder.ChangePassword(un, oldpass, newpass));
            return(ret);
        }
        } // Add_SalesMan_Force(string un, string pas)

        public bool Add_Rates_ToDB(String frm, String to, float rate, uint collectid)
        {
            String st = MyQueryBuilder.Insert_Rate(++Rate_ID, frm, to,
                                                   collectid, rate);

            //MessageBox.Show("Insert :" + st); //--
            return(Execute_Insert(st));
        }
        } // Add_SalesMan(string un, string pas)

        private bool Add_SalesMan_Force(string un, string pas)
        {
            bool ret = false;

            if (Execute_Insert(MyQueryBuilder.Insert_Salesman(un, pas)))
            {
                ret = true;
            }
            return(ret);
        } // Add_SalesMan_Force(string un, string pas)
        private bool Add_Customer_Force(string name, string cnic, string cell)
        {
            bool ret = false;
            int  id  = int.Parse((++Customer_ID) + "");

            if (Execute_Insert(MyQueryBuilder.Insert_Customer(id, name, cnic, cell)))
            {
                ret = true;
            }
            return(ret);
        } // Add_Customer_Force(string name, string cnic, string cell)
        } // Valid_SalesMan(string un, string pas)

        public bool SalesMan_Exist(string un)
        {
            bool             ret = false;
            OracleDataReader odr;

            odr = Execute_Query(MyQueryBuilder.Select_Salesman_Only(un));
            if (odr.Read() && odr.GetOracleValue(0).ToString().Equals(un))
            {
                ret = true;
            }
            return(ret);
        } // SalesMan_Exist(string un)
        } // Execute_Insert(string st)

        public bool Valid_SalesMan(string un, string pas)
        {
            bool             ret = false;
            OracleDataReader odr;

            odr = Execute_Query(MyQueryBuilder.Select_Salesman_Pass(un, pas));
            if (odr.Read() && odr.GetOracleValue(0).ToString().Equals(un))
            {
                ret = true;
            }
            return(ret);
        } // Valid_SalesMan(string un, string pas)
        public DataSet GetCurrSaleReports(String cur, DateTime fm, DateTime to)
        {
            OracleCommand     ocmd;
            OracleDataAdapter adp;
            DataSet           ds   = new DataSet();
            String            temp = "";

            try
            {
                ocmd = oracleconnection.CreateCommand();
                temp = MyQueryBuilder.CurrSaleReport(cur,
                                                     MyDateTimeFormatter.Convert_To_OracleDate(fm), MyDateTimeFormatter.Convert_To_OracleDate(to));

                /*  //----//
                 * TextBoxForm tbf = new TextBoxForm();
                 * tbf.textBox1.Text = temp;
                 * tbf.Show();
                 * MessageBox.Show("Temp:\n" + temp);
                 * // */

                ocmd.CommandText = temp;
                adp = new OracleDataAdapter(ocmd);
                adp.Fill(ds);
            }
            catch (InvalidOperationException ex)
            {
                MessageBox.Show("InvalidOperationException in " +
                                "\nMoney_Exchanger_Owner_Side-DBHandling-GetCurrSaleReports(" + cur + ")\n" +
                                ex.Message);
                ds.Clear();
            }
            catch (OracleException ex)
            {
                MessageBox.Show("OracleException in " +
                                "\nMoney_Exchanger_Owner_Side-DBHandling-GetCurrSaleReports(" + cur + ")\n" +
                                ex.Message);
                ds.Clear();
            }

            catch (SystemException ex)
            {
                MessageBox.Show("Exception in "
                                + "\nMoney_Exchanger_Owner_Side-DBHandling-GetCurrSaleReports(" + cur + ")\n" +
                                ex.Message);
                ds.Clear();
            }
            return(ds);
        }
        } // Add_Customer_Force(string name, string cnic, string cell)

        public int Customer_Exist(string cnic)
        {
            int ret = -1;
            OracleDataReader odr;

            try
            {
                odr = Execute_Query(MyQueryBuilder.Select_CustomerID_Only(cnic));
                if (odr.Read())
                {
                    ret = int.Parse(odr.GetOracleValue(0).ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("DBHandling.Customer_Exist():" + ex.Message);
                ret = -1;
            }
            return(ret);
        } // SalesMan_Exist(string un)
        } // eof public DataSet GetCurrRates

        public int RateID(string cur, bool by, float rate)
        {
            int id = -1;
            OracleDataReader odr;

            try
            {
                odr = this.Execute_Query(MyQueryBuilder.Query_RateID(cur, by, rate));
                if (odr.Read())
                {
                    id = int.Parse(odr.GetOracleValue(0).ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("DBHandling.RateID():" + ex.Message);
                id = -1;
            }
            return(id);
        }
        } // SalesMan_Exist(string un)

        public int Exchange(string operat, int cust_id, int rates_id, float exchanges_amount)
        {
            int    id    = -1;
            string query = "";

            try
            {
                id    = int.Parse((++Exchange_ID) + "");
                query = MyQueryBuilder.Insert_Exchange(id, cust_id, rates_id, operat,
                                                       exchanges_amount, MyDateTimeFormatter.Convert_To_OracleDate(DateTime.Now));
                if (!this.Execute_Insert(query))
                {
                    id = -1;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("DBHandling.Exchange():" + ex.Message);
                id = -1;
            }
            return(id);
        }
        public DataSet GetSalesManReportDBH(String salesman, DateTime fm, DateTime to)
        {
            OracleCommand     ocmd;
            OracleDataAdapter adp;
            DataSet           ds   = new DataSet();
            String            temp = "";

            try
            {
                ocmd = oracleconnection.CreateCommand();
                temp = MyQueryBuilder.SalesManReport(salesman,
                                                     MyDateTimeFormatter.Convert_To_OracleDate(fm), MyDateTimeFormatter.Convert_To_OracleDate(to));
                ocmd.CommandText = temp;
                adp = new OracleDataAdapter(ocmd);
                adp.Fill(ds);
            }
            catch (InvalidOperationException ex)
            {
                MessageBox.Show("InvalidOperationException in " +
                                "\nMoney_Exchanger_Owner_Side-DBHandling-GetSalesManReportDBH\n" +
                                ex.Message);
                ds.Clear();
            }
            catch (OracleException ex)
            {
                MessageBox.Show("OracleException in " +
                                "\nMoney_Exchanger_Owner_Side-DBHandling-GetSalesManReportDBH\n" +
                                ex.Message);
                ds.Clear();
            }
            catch (SystemException ex)
            {
                MessageBox.Show("Exception in "
                                + "\nMoney_Exchanger_Owner_Side-DBHandling-GetSalesManReportDBH\n" +
                                ex.Message);
                ds.Clear();
            }
            return(ds);
        }
        } // SalesMan_Exist(string un)

        public bool Add_SalesMan(string un, string pas)
        {
            OracleDataReader odr;
            bool             ret = false;

            try
            {
                if (!SalesMan_Exist(un))
                {
                    Add_SalesMan_Force(un, pas);
                }
                odr = Execute_Query("" + MyQueryBuilder.Select_Salesman_Pass(un, pas));
                if (odr.Read() && odr.GetOracleValue(0).ToString().Equals(un))
                {
                    ret = true;
                }
            }
            catch (OracleException ex)
            {
                return(ret);
            }
            return(ret);
        } // Add_SalesMan(string un, string pas)
        public DataSet GetCurrRates(String cur)
        {
            OracleCommand     ocmd;
            OracleDataAdapter adp;
            DataSet           ds = new DataSet();

            try
            {
                ocmd             = oracleconnection.CreateCommand();
                ocmd.CommandText = "" + MyQueryBuilder.Query_Currency_Buy_Sell(cur, Collections_ID);
                adp = new OracleDataAdapter(ocmd);
                adp.Fill(ds);
            }
            catch (InvalidOperationException ex)
            {
                MessageBox.Show("InvalidOperationException in " +
                                "\nMoney_Exchanger_Server_Side-DBHandling-GetCurrRates(" + cur + ")\n" +
                                ex.Message);
                ds.Clear();
            }
            catch (OracleException ex)
            {
                MessageBox.Show("OracleException in " +
                                "\nMoney_Exchanger_Server_Side-DBHandling-GetCurrRates(" + cur + ")\n" +
                                ex.Message);
                ds.Clear();
            }

            catch (SystemException ex)
            {
                MessageBox.Show("Exception in "
                                + "\nMoney_Exchanger_Server_Side-DBHandling-GetCurrRates(" + cur + ")\n" +
                                ex.Message);
                ds.Clear();
            }
            return(ds);
        } // eof public DataSet GetCurrRates