Example #1
0
        private void SingerMgr_DataGridView_Sorted(object sender, EventArgs e)
        {
            if (Global.SingerMgrDataGridViewRestoreSelectList.Count > 0)
            {
                if (Global.SingerMgrDataGridViewRestoreCurrentRow != "")
                {
                    var query = from row in SingerMgr_DataGridView.Rows.Cast <DataGridViewRow>()
                                where row.Cells["Singer_Id"].Value.Equals(Global.SingerMgrDataGridViewRestoreCurrentRow)
                                select row;

                    if (query.Count() > 0)
                    {
                        foreach (DataGridViewRow row in query)
                        {
                            SingerMgr_DataGridView.CurrentCell = row.Cells[0];
                        }
                    }
                }

                SingerMgr_DataGridView.ClearSelection();
                foreach (string str in Global.SingerMgrDataGridViewRestoreSelectList)
                {
                    var query = from row in SingerMgr_DataGridView.Rows.Cast <DataGridViewRow>()
                                where row.Cells["Singer_Id"].Value.ToString().Equals(str)
                                select row;

                    foreach (DataGridViewRow row in query)
                    {
                        row.Selected = true;
                    }
                }
                Global.SingerMgrDataGridViewRestoreSelectList.Clear();
            }
        }
Example #2
0
 public MainForm()
 {
     InitializeComponent();
     SongQuery_DataGridView.MakeDoubleBuffered(true);
     SongAdd_DataGridView.MakeDoubleBuffered(true);
     SingerMgr_DataGridView.MakeDoubleBuffered(true);
     Cashbox_DataGridView.MakeDoubleBuffered(true);
 }