예제 #1
0
        public OracleCommand GetDataCommandForOracle()
        {
            OracleCommand cmd = null;

            ErrorObject.Flag = Errors.Ok;
            OracleConnection conn = (OracleConnection)RDBMSConnection.DbConn;

            try
            {
                if (Dataconnection.OpenConnection() == ConnectionState.Open)
                {
                    cmd = conn.CreateCommand();
                }
                else
                {
                    cmd = null;

                    DMEEditor.AddLogMessage("Fail", $"Error in Creating Data Command, Cannot get DataSource", DateTime.Now, -1, DatasourceName, Errors.Failed);
                }
            }
            catch (Exception ex)
            {
                cmd = null;

                DMEEditor.AddLogMessage("Fail", $"Error in Creating Data Command {ex.Message}", DateTime.Now, -1, ex.Message, Errors.Failed);
            }
            return(cmd);
        }
예제 #2
0
 public ConnectionState Openconnection()
 {
     ConnectionStatus = Dataconnection.OpenConnection();
     if (ConnectionStatus == ConnectionState.Open)
     {
         LoadView();
     }
     return(ConnectionStatus);
 }
예제 #3
0
 public bool CheckEntityExist(string EntityName)
 {
     if (Dataconnection.OpenConnection() == ConnectionState.Open)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #4
0
        public ConnectionState Openconnection()
        {
            ConnectionStatus = Dataconnection.OpenConnection();

            if (ConnectionStatus == ConnectionState.Open)
            {
                if (DMEEditor.ConfigEditor.LoadDataSourceEntitiesValues(FileName) == null)
                {
                    //GetEntityStructures(true);
                }
                else
                {
                    Entities = DMEEditor.ConfigEditor.LoadDataSourceEntitiesValues(FileName).Entities;
                };
                CombineFilePath = Path.Combine(Dataconnection.ConnectionProp.FilePath, Dataconnection.ConnectionProp.FileName);
            }

            return(ConnectionStatus);
        }