Example #1
0
        //Grant quyen voi admin option
        public CapQuyenOption Grant_Priv_With_Admin_Option_In_Database(CapQuyenOption cq)
        {
            OracleConnection conn = Connect();
            OracleCommand    orc  = new OracleCommand();

            orc.Connection  = conn;
            orc.CommandText = "sp_grant";
            orc.Parameters.Add(new OracleParameter("username", OracleDbType.Varchar2)).Value   = $"{cq.username}";
            orc.Parameters.Add(new OracleParameter("name_privs", OracleDbType.Varchar2)).Value = $"{cq.name_privs}";
            orc.Parameters.Add(new OracleParameter("option", OracleDbType.Varchar2)).Value     = $"{cq.option}";
            orc.CommandType = System.Data.CommandType.StoredProcedure;
            orc.ExecuteNonQuery();
            conn.Close();
            return(cq);
        }
Example #2
0
        public CapQuyenOption Grant_privs_option(CapQuyenOption capquyenoption)
        {
            var respon = new DAL();

            return(respon.Grant_Priv_With_Admin_Option_In_Database(capquyenoption));
        }