Exemplo n.º 1
0
        private void tableView3_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
        {
            return;
            //var x = tableView3.FocusedRow;
            //var xx = (System.Data.DataRowView)x;
            //var xxx = xx.Row;

            //var row = (SQLInformation.Data.ApplicationDataSet.DatabasesRow)xxx;

            //var v = row.ID;

            //var tables = Common.ApplicationDataSet.DBTables.Where(t => t.Database_ID == v);

            //foreach (var t in tables)
            //{
            //    System.Diagnostics.Debug.WriteLine(t.Name_Table);
            //}

            //try
            //{
            //    gc_Tables.ItemsSource = tables.ToArray();
            //}
            //catch (Exception ex)
            //{

            //}

            ////gc_Tables.ItemsSource = tables.ToList();
            //var foo = e;
        }
        private void OnFocusedRowChanged_DataFile(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
        {
            var row = e.NewRow;

            if (row == null)
            {
                // TODO(crhodes): Perhaps clear the series datasources

                seriesDFS.DataSource  = null;
                seriesDFS1.DataSource = null;
                seriesDFS2.DataSource = null;
                //seriesDFS3.DataSource = null;

                seriesDFA.DataSource  = null;
                seriesDFA1.DataSource = null;
                seriesDFA2.DataSource = null;
                seriesDFA3.DataSource = null;

                return;
            }

            var row2 = (SQLInformation.Data.ApplicationDataSet.DBDataFilesRow)((DataRowView)row).Row;
            var dbID = row2.Database_ID;

            var chartSource = EyeOnLife.Common.ApplicationDataSet.DBDataFileInfo
                              .Where(di => di.Database_ID == dbID)
                              .Select(i => new
            {
                SnapShotDate = i.SnapShotDate,
                //BytesReadFromDisk = (System.DBNull.Value.Equals(i.BytesReadFromDisk) ? 0 : i.BytesReadFromDisk),
                //BytesWrittenToDisk = (System.DBNull.Value.Equals(i.BytesWrittenToDisk) ? 0 : i.BytesWrittenToDisk),
                //NumberOfDiskReads = (System.DBNull.Value.Equals(i.NumberOfDiskReads) ? 0 : i.NumberOfDiskReads),
                //NumberOfDiskWrites = (System.DBNull.Value.Equals(i.NumberOfDiskWrites) ? 0 : i.NumberOfDiskWrites),
                //BytesReadFromDisk = ((Nullable<long>)i.BytesReadFromDisk != null ? i.BytesReadFromDisk : 0),
                //BytesWrittenToDisk = ((Nullable<long>)i.BytesWrittenToDisk != null ? i.BytesWrittenToDisk : 0),
                //NumberOfDiskReads = ((Nullable<long>)i.NumberOfDiskReads != null ? i.NumberOfDiskReads : 0),
                //NumberOfDiskWrites = ((Nullable<long>)i.NumberOfDiskWrites != null ? i.NumberOfDiskWrites : 0),
                AvailableSpace = i.AvailableSpace / 1024.0,
                Size           = i.Size / 1024.0,
                UsedSpace      = i.UsedSpace / 1024.0
                                 //VolumeFreeSpace = i.VolumeFreeSpace / 1024.0
            });

            try
            {
                seriesDFS.DataSource  = chartSource;
                seriesDFS1.DataSource = chartSource;
                seriesDFS2.DataSource = chartSource;
                //seriesDFS3.DataSource = chartSource;

                seriesDFA.DataSource  = chartSource;
                seriesDFA1.DataSource = chartSource;
                seriesDFA2.DataSource = chartSource;
                seriesDFA3.DataSource = chartSource;
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 3
0
 private void getUserInfo(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
 {
     maBoPhan  = ((MTPMSWIN.Model.DM_BoPhan)(e.NewRow)).mabophan;
     tenBoPhan = ((MTPMSWIN.Model.DM_BoPhan)(e.NewRow)).tenbophan;
     crud      = new CRUDHandling(grdNguoiDung, tblView, colMaNV, MTROLE, MTButton, TABLE_NAME, ID_NAME, CODE_NAME,
                                  CODE_HEADER, String.Format(SQL_LOAD_ALL_ND, maBoPhan), SQL_DELETE_ND);
     crud.GridForm_Loaded();
 }
        private void OnFocusedRowChanged_LogFile(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
        {
            var row = e.NewRow;

            if (row == null)
            {
                // TODO(crhodes): Perhaps clear the series datasources

                //seriesLFS_AvailableSpace.DataSource = null;
                seriesLFS_Size.DataSource      = null;
                seriesLFS_UsedSpace.DataSource = null;

                //seriesLFA_BytesRead.DataSource = null;
                //seriesLFA_BytesWritten.DataSource = null;
                //seriesLFA_NumberReads.DataSource = null;
                //seriesLFA_NumberWrites.DataSource = null;

                return;
            }

            var row2      = (SQLInformation.Data.ApplicationDataSet.DBLogFilesRow)((DataRowView)row).Row;
            var dbID      = row2.Database_ID;
            var logFileID = row2.ID;

            var chartSource = EyeOnLife.Common.ApplicationDataSet.DBLogFileInfo
                              .Where(di => di.DBLogFile_ID == logFileID)
                              .Select(i => new
            {
                SnapShotDate = i.SnapShotDate,
                //BytesReadFromDisk = ((long?)i.BytesReadFromDisk != null ? (long?)i.BytesReadFromDisk : (long?)0),
                //BytesWrittenToDisk = ((long?)i.BytesWrittenToDisk != null ? (long?)i.BytesWrittenToDisk : (long?)0),
                //NumberOfDiskReads = ((long?)i.NumberOfDiskReads != null ? (long?)i.NumberOfDiskReads : (long?)0),
                //NumberOfDiskWrites = ((long?)i.NumberOfDiskWrites != null ? (long?)i.NumberOfDiskWrites : (long?)0),
                Size      = i.Size / 1024.0,
                UsedSpace = i.UsedSpace / 1024.0
                            //VolumeFreeSpace = i.VolumeFreeSpace / 1024.0
            });

            try
            {
                //seriesLFS_AvailableSpace.DataSource = chartSource;
                seriesLFS_Size.DataSource      = chartSource;
                seriesLFS_UsedSpace.DataSource = chartSource;

                // More AvailableSpace to second axis
                //XYDiagram2D.SetSeriesAxisY(seriesDFS2, ((XYDiagram2D)chartDataFileSpace.Diagram).SecondaryAxesY[0]);
                //seriesDFS3.DataSource = chartSource;

                //seriesLFA_BytesRead.DataSource = chartSource;
                //seriesLFA_BytesWritten.DataSource = chartSource;

                //seriesLFA_NumberReads.DataSource = chartSource;
                //seriesLFA_NumberWrites.DataSource = chartSource;
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 5
0
        private void onFocusRowChange(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
        {
            nhomquyenID = grdNhomQuyen.GetCellValue(tblViewGrp.FocusedRowHandle, colsoid).ToString();
            crud        = new CRUDHandling(grdQuyenHan, tblView, colChucNang, MTROLE, MTButton, TABLE_NAME, ID_NAME, CODE_NAME,
                                           CODE_HEADER, String.Format(SQL_LOAD_ALL_QHCN, nhomquyenID), string.Format(SQL_DELETE_QH, nhomquyenID));

            String err = crud.GridForm_Loaded();

            MTGlobal.SetGridReadOnly(grdQuyenHan, tblView, true);
        }
Exemplo n.º 6
0
        private void tblViewGrp_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
        {
            try
            {
                mBangGiaId = grdBangGia.GetCellValue(tblViewBG.FocusedRowHandle, colBanggiaID).ToString();
                crud       = new CRUDHandling(grdBangGiaCT, tblViewCT, colMasp, MTROLE, MTButton, TABLE_NAME, ID_NAME, CODE_NAME,
                                              CODE_HEADER, String.Format(SQL_LOAD_ALL_BGCT, mBangGiaId), SQL_DELETE_BGCT);

                String err = crud.GridForm_Loaded();
                MTGlobal.SetGridReadOnly(grdBangGiaCT, tblViewCT, true);
            }
            catch { }
        }
Exemplo n.º 7
0
        private void tblViewGrp_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
        {
            try
            {
                mNhomspid = grdProductGroup.GetCellValue(tblViewGrp.FocusedRowHandle, colManhomSPID1).ToString();
                crud      = new CRUDHandling(grdProduct, tblView, colMasp, MTROLE, MTButton, TABLE_NAME, ID_NAME, CODE_NAME,
                                             CODE_HEADER, String.Format(SQL_LOAD_ALL_SP, mNhomspid), SQL_DELETE_SP);

                String err = crud.GridForm_Loaded();
                MTGlobal.SetGridReadOnly(grdProduct, tblView, true);
            }
            catch { }
        }
Exemplo n.º 8
0
        private void OnFocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
        {
            //var row = e.NewRow;
            //var row2 = (SQLInformation.Data.ApplicationDataSet.DatabasesRow)((DataRowView)row).Row;
            //var sse = row2.SnapShotError;

            //if (sse != "")
            //{
            //    ; // Turn transparent
            //}
            //else
            //{
            //    ; // Turn Red
            //}
        }
Exemplo n.º 9
0
        private void tblView_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
        {
            pGiaTriChon = grdChonDM.GetCellValue(tblView.FocusedRowHandle, colTen).ToString();
            pMaso       = grdChonDM.GetCellValue(tblView.FocusedRowHandle, colMaso).ToString();
            if (pLoaiDM == "LYDO")
            {
                pTKNo = grdChonDM.GetCellValue(tblView.FocusedRowHandle, colCol1).ToString();
                pTKCo = grdChonDM.GetCellValue(tblView.FocusedRowHandle, colCol2).ToString();
            }

            if (pLoaiDM == "DV")
            {
                pDiaChi = grdChonDM.GetCellValue(tblView.FocusedRowHandle, colCol2).ToString();
            }
        }
Exemplo n.º 10
0
 private void tblViewTCList_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
 {
     try
     {
         if (tblViewTCList.FocusedRowHandle < 0)
         {
             return;
         }
         pPhieuID = grdPhieuTC.GetCellValue(tblViewTCList.FocusedRowHandle, colPhieutcid).ToString();
         if (pPhieuID != "")
         {
             BindDataCT(pPhieuID);
         }
     }
     catch (Exception ex) { ex.Data.Clear(); }
 }
Exemplo n.º 11
0
        void View_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
        {
            //string name = griddetail.View.FocusedRowData.CellData[0].Value.ToString();
            if (e.NewRow == null)
            {
                return;
            }
            Station s = e.NewRow as Station; //line.Stations.SingleOrDefault(x => x.Name == name);

            if (s != null)
            {
                stationname.Text       = s.Name;
                stationtotal.Text      = s.Cameras.Count.ToString();
                stationwarn.Text       = s.Cameras.Count(x => x.Status == "异常").ToString();
                griddetail.ItemsSource = s.Cameras;
            }
        }
        private void OnFocusedRowChanged_Database(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
        {
            var row = e.NewRow;

            if (row == null)
            {
                // TODO(crhodes): Perhaps clear the series datasources

                seriesDB_SpaceAvailable.DataSource = null;
                seriesDB_Size.DataSource           = null;
                seriesDB_IndexSpace.DataSource     = null;
                seriesDB_DataSpace.DataSource      = null;

                return;
            }

            var row2 = (SQLInformation.Data.ApplicationDataSet.DatabasesRow)((DataRowView)row).Row;
            var dbID = row2.ID;

            var chartSource = EyeOnLife.Common.ApplicationDataSet.DatabaseInfo
                              .Where(di => di.Database_ID == dbID)
                              .Select(i => new
            {
                SnapShotDate    = i.SnapShotDate,
                IndexSpaceUsage = i.IndexSpaceUsage / 1024.0,
                DataSpaceUsage  = i.DataSpaceUsage / 1024.0,
                SpaceAvailable  = i.SpaceAvailable / 1024.0,
                Size            = i.Size
            });

            try
            {
                System.Diagnostics.Debug.WriteLine(((XYDiagram2D)cht_Database.Diagram).Panes.Count);
                seriesDB_SpaceAvailable.DataSource = chartSource;
                seriesDB_Size.DataSource           = chartSource;
                seriesDB_IndexSpace.DataSource     = chartSource;
                seriesDB_DataSpace.DataSource      = chartSource;
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 13
0
        private void tableView_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
        {
            var zz = (SQLInformation.Data.ApplicationDataSet.CrawlerExpandSettingsRow)((System.Data.DataRowView)e.NewRow).Row;

            switch (zz.TargetObject)
            {
            case "Database":
                SQLInformation.ExpandMask.DatabaseExpandSetting dbES = new SQLInformation.ExpandMask.DatabaseExpandSetting(zz.ExpandSetting);
                lc_ExpandDatabaseCurrent.DataContext = dbES;
                break;

            case "Instance":
                SQLInformation.ExpandMask.InstanceExpandSetting inES = new SQLInformation.ExpandMask.InstanceExpandSetting(zz.ExpandSetting);
                lc_ExpandInstanceCurrent.DataContext = inES;
                break;

            case "JobServer":
                SQLInformation.ExpandMask.JobServerExpandSetting jsES = new SQLInformation.ExpandMask.JobServerExpandSetting(zz.ExpandSetting);
                lc_ExpandJobServerCurrent.DataContext = jsES;
                break;
            }
        }
Exemplo n.º 14
0
        void View_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
        {
            //string name = griddetail.View.FocusedRowData.CellData[0].Value.ToString();
            if (e.NewRow == null)
            {
                return;
            }
            HistoryStation s = e.NewRow as HistoryStation; //line.Stations.SingleOrDefault(x => x.Name == name);

            if (s != null)
            {
                stationInoutChart.ItemsSource = s.StationInOut;
                detailchart.DataSource        = s.Personrates;
                //stationTimeOutChart.DataSource = s.Personrates;
                int lineid = 0;
                if (chkLine.IsChecked.HasValue)
                {
                    lineid = chkLine.IsChecked.Value ? 0 : 1;
                }
                DataCenter.Instance.UpdateTrafficRight_DetailStation(DataCenter.Instance.SelectTime, lineid, s.StaGUID);
            }
        }
        private void OnFocusedRowChanged_Database(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
        {
            var row = e.NewRow;

            if (row == null)
            {
                // TODO(crhodes): Perhaps clear the series datasources

                series1.DataSource  = null;
                series1a.DataSource = null;
                series1b.DataSource = null;

                return;
            }

            var row2 = (SQLInformation.Data.ApplicationDataSet.DatabasesRow)((DataRowView)row).Row;
            var dbID = row2.ID;

            var chartSource = EyeOnLife.Common.ApplicationDataSet.DatabaseInfo
                              .Where(di => di.Database_ID == dbID)
                              .Select(i => new
            {
                SnapShotDate    = i.SnapShotDate,
                IndexSpaceUsage = i.IndexSpaceUsage / 1024.0,
                DataSpaceUsage  = i.DataSpaceUsage / 1024.0,
                SpaceAvailable  = i.SpaceAvailable / 1024.0
            });

            try
            {
                series1.DataSource  = chartSource;
                series1a.DataSource = chartSource;
                series1b.DataSource = chartSource;
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 16
0
 private void tblView_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
 {
 }
 private void TableView_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
 {
     UpdateListBoxes();
 }
 private void OnFocusedRowChanged_FileGroup(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
 {
 }
 private void tblDSPhieu_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
 {
     if (tblDSPhieu.IsRowSelected(tblDSPhieu.FocusedRowHandle) == true)
     {
     }
 }
Exemplo n.º 20
0
 private void tableView4_FocusedRowChanged(object sender, DevExpress.Xpf.Grid.FocusedRowChangedEventArgs e)
 {
     var foo = e;
 }