public Boolean DeleteOnTable(String table, String cond)
        {
            Boolean flag = false;

            if (GlobalClass.branch != "001" && GlobalClass.DontSendToMain == false)
            {
                thisDatabase2 db2 = new thisDatabase2();
                db2.DeleteOnTable(table, cond);
            }

            try
            {
                this.OpenConn();

                string SQL = "DELETE FROM " + this.schema + "." + table + " WHERE " + cond + ";";
                //MessageBox.Show(SQL);
                NpgsqlCommand command = new NpgsqlCommand(SQL, conn);

                Int32 rowsaffected = command.ExecuteNonQuery();

                this.CloseConn();

                flag = true;
            }
            catch (Exception)
            { flag = false; }

            return(flag);
        }
        public Boolean UpdateOnTable(String table, String col_upd, String cond)
        {
            Boolean flag = false;

            if (GlobalClass.branch != "001" && GlobalClass.DontSendToMain == false)
            {
                thisDatabase2 db2 = new thisDatabase2();
                db2.UpdateOnTable(table, col_upd, cond);
            }

            try
            {
                this.OpenConn();

                if (cond != "")
                {
                    cond = " WHERE " + cond + "";
                }

                string SQL = "UPDATE " + this.schema + "." + table + " SET " + col_upd + "" + cond + ";";
                //MessageBox.Show(SQL);
                NpgsqlCommand command = new NpgsqlCommand(SQL, conn);

                Int32 rowsaffected = command.ExecuteNonQuery();

                this.CloseConn();

                flag = true;
            }
            catch (Exception er)
            {
                flag = false;
                MessageBox.Show(er.Message);
            }

            return(flag);
        }