Пример #1
0
 public KpsgAdapter(IProgressConnection connection) : base(connection)
 {
     try
     {
         this.proxyAppObject = new KPProxyAppObject(connection.Connection);
         this.pdsContext     = new pdsContextDataSet();
         this.dataSet        = new pdskpsgDataSet()
         {
             DataSetName = DataSetName
         };
         this.kpsgTableControlKey = this.dataSet.ttblkpsg.GetTableControlParametersKey();
         this.icspTableControlKey = this.dataSet.ttblicsp.GetTableControlParametersKey();
         if (!this.tempTableControlParameters.ContainsKey(this.kpsgTableControlKey))
         {
             this.CreateTableControlParameters(this.kpsgTableControlKey);
         }
         if (!this.tempTableControlParameters.ContainsKey(this.icspTableControlKey))
         {
             this.CreateTableControlParameters(this.icspTableControlKey);
         }
         this.OnCreated();
     }
     catch (Exception ex)
     {
         NLogLogger.ErrorException("Failed in adapter ", ex);
         ErrorReportingHelper.ReportProgramErrors($"Error in KpsgAdapter constructor - {ex.Message}");
     }
 }
Пример #2
0
        public AskpinquiryAdapter(IProgressConnection connection) : base(connection)
        {
            try
            {
                this.proxyAppObject = new KPProxyAppObject(connection.Connection);
                this.pdsContext     = new pdsContextDataSet();

                this.OnCreated();
            }
            catch (Exception ex)
            {
                NLogLogger.ErrorException("Failed in adapter ", ex);
                ErrorReportingHelper.ReportProgramErrors($"Error in AskpinquiryAdapter constructor - {ex.Message}");
            }
        }