void StyleDatagridview(DataGridView dgv)
{
dgv.AllowUserToResizeColumns = false;
dgv.AllowUserToResizeRows = false;
dgv.RowHeadersVisible = false;
dgv.EnableHeadersVisualStyles = false;
dgv.MultiSelect = false;
dgv.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dgv.BorderStyle = BorderStyle.None;
dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.FromArgb(238,239,249);
dgv.CellBorderStyle = DataGridViewCellBorderStyle.SingleHorizontal;
dgv.DefaultCellStyle.SelectionBackColor = Color.SeaGreen;
dgv.DefaultCellStyle.SelectionForeColor = Color.WhiteSmoke;
dgv.BackgroundColor = Color.FromArgb(100, 100, 100);
dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
dgv.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
dgv.RowsDefaultCellStyle.Font = new Font("맑은 고딕", 9);
dgv.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
dgv.ColumnHeadersDefaultCellStyle.Font = new Font("맑은 고딕", 9);
dgv.ColumnHeadersDefaultCellStyle.BackColor = Color.FromArgb(50, 50, 50);
dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.White;
dgv.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
}