Ejemplo n.º 1
0
        public bool addModuleToClient(ClientBusiness_Module_Entity clientBusiness_Module)
        {
            bool response = false;

            try
            {
                sqlConnection.Open();
                sqlCommand             = new SqlCommand("add_clientBusiness_module", sqlConnection);
                sqlCommand.CommandType = CommandType.StoredProcedure;

                SqlParameter p_idCliente = new SqlParameter();
                p_idCliente.ParameterName = "@idClient";
                p_idCliente.SqlDbType     = SqlDbType.Int;
                p_idCliente.Value         = clientBusiness_Module.clientBusiness.id_client_business;

                SqlParameter p_idModule = new SqlParameter();
                p_idModule.ParameterName = "@idModule";
                p_idModule.SqlDbType     = SqlDbType.VarChar;
                p_idModule.Value         = clientBusiness_Module.module.id_module;

                sqlCommand.Parameters.Add(p_idCliente);
                sqlCommand.Parameters.Add(p_idModule);

                sqlCommand.ExecuteNonQuery();

                response = true;
            }
            catch (Exception e)
            {
                throw;
            }

            return(response);
        }
Ejemplo n.º 2
0
 public bool addModuleToClient(ClientBusiness_Module_Entity clientBusiness_Module)
 {
     return(module_Data.addModuleToClient(clientBusiness_Module));
 }