// 콤보박스 초기화 private void AddToComboBox() { // cbxOdrNo: 작업지시번호 // cbxWHS: 창고번호 콤보박스 conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); conn.Open(); #region 작업지시번호 cmd = new MySqlCommand("select mngodr_no from production_mngodr order by mngodr_no", conn); adapter = new MySqlDataAdapter(cmd); dt = new DataTable(); adapter.Fill(dt); foreach (DataRow rw in dt.Rows) { cbxOdrNo.Items.Add(rw[0].ToString()); // 콤보박스에 품목코드 넣기 } #endregion #region 창고코드 dt.Rows.Clear(); // dt에 있는 기존행 삭제 cmd = new MySqlCommand("select ware_no from info_warehouse where ware_name = '제품창고'", conn); adapter = new MySqlDataAdapter(cmd); adapter.Fill(dt); foreach (DataRow rw in dt.Rows) { cbxWHS.Items.Add(rw[1].ToString()); // 콤보박스에 창고코드 넣기 } #endregion conn.Close(); }
public info_4_1_BOMMng() { InitializeComponent(); conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); dtHead = new DataTable(); fillcombo(); }
private void mngmnt_2_outputProduct_Load(object sender, EventArgs e) { Thread t = new Thread(() => { conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); conn.Open(); string orderInfoHeadQuery = "SELECT output_idx, DATE_FORMAT(output_date, '%Y-%m-%d') as 'output_date', com_name, mat_name, mat_price * output_count as 'output_totprc', output_admin " + "FROM manage_output, info_material, info_warehouse, info_company " + "WHERE manage_output.mat_no = info_material.mat_no AND manage_output.ware_no = info_warehouse.ware_no AND info_company.com_no = manage_output.com_no " + "" + "ORDER BY output_idx;"; cmd = new MySqlCommand(orderInfoHeadQuery, conn); adapter = new MySqlDataAdapter(cmd); adapter.Fill(dtHead); conn.Close(); }); t.Start(); gridManageoutputHead.DataSource = dtHead; lblHeadCount.Text = gridManageoutputHead.Rows.Count.ToString(); t.Join(); if (gridManageoutputHead.Rows.Count != 0) { gridManageoutputHead_CellContentClick(sender, new DataGridViewCellEventArgs(0, 0)); } }
// 콤보박스 초기화 private void AddToComboBox() { // cbxITEM: 품목번호 콤보박스 // cbxWHS: 창고번호 콤보박스 conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); conn.Open(); #region 품목코드 cmd = new MySqlCommand("select mat_no from info_material where mat_type = '제품' AND mat_name NOT LIKE '%Box'", conn); adapter = new MySqlDataAdapter(cmd); dt = new DataTable(); adapter.Fill(dt); foreach (DataRow rw in dt.Rows) { cbxITEM.Items.Add(rw[0].ToString()); // 콤보박스에 품목코드 넣기 } #endregion #region 창고코드 dt.Rows.Clear(); // dt에 있는 기존행 삭제 cmd = new MySqlCommand("select ware_no from info_warehouse where ware_type = '검수'", conn); adapter = new MySqlDataAdapter(cmd); adapter.Fill(dt); foreach (DataRow rw in dt.Rows) { cbxWHS.Items.Add(rw[1].ToString()); // 콤보박스에 창고코드 넣기 } #endregion conn.Close(); }
public LoginForm() { InitializeComponent(); conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); dt = new DataTable(); }
public mngmnt_1_1_insertData() { Thread thread = new Thread(() => { conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); conn.Open(); string selectWarelistQuery = "SELECT ware_name, ware_no FROM info_warehouse"; cmd = new MySqlCommand(selectWarelistQuery, conn); adapter = new MySqlDataAdapter(cmd); adapter.Fill(dtwareList); dictWarehouse = dtwareList.AsEnumerable().ToDictionary <DataRow, string, int> (row => Convert.ToString(row[0]), row => Convert.ToInt32(row[1])); col_ware_no.DataSource = dtwareList; col_ware_no.DisplayMember = "ware_name"; col_ware_no.ValueMember = "ware_name"; string selectComlistQuery = "SELECT com_name, com_no FROM info_company"; cmd = new MySqlCommand(selectComlistQuery, conn); adapter = new MySqlDataAdapter(cmd); adapter.Fill(dtcomList); dictCompany = dtcomList.AsEnumerable().ToDictionary <DataRow, string, int> (row => Convert.ToString(row[0]), row => Convert.ToInt32(row[1])); col_com_no.DataSource = dtcomList; col_com_no.DisplayMember = "com_name"; col_com_no.ValueMember = "com_name"; conn.Close(); }); dtwareList = new DataTable(); dtcomList = new DataTable(); thread.Start(); InitializeComponent(); dt = new DataTable(); dt.Columns.Add(new DataColumn("mat_no", typeof(int))); dt.Columns.Add(new DataColumn("mat_name", typeof(string))); dt.Columns.Add(new DataColumn("mat_type", typeof(string))); dt.Columns.Add(new DataColumn("mat_price", typeof(int))); dt.Columns.Add(new DataColumn("input_count", typeof(int))); dt.Columns.Add(new DataColumn("input_inspec", typeof(string))); dt.Columns.Add(new DataColumn("ware_name", typeof(string))); dt.Columns.Add(new DataColumn("com_name", typeof(string))); dt.Columns.Add(new DataColumn("input_admin", typeof(string))); dt.Columns.Add(new DataColumn("input_etc", typeof(string))); thread.Join(); }
// 콤보박스 초기 설정 함수 private void AddToComboBox( ) { // cbxWorkNo : 작업지시번호 콤보박스 // cbxMatCode: 품목번호 콤보박스 // cbxWareHouse: 창고번호 콤보박스 conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); conn.Open(); #region 작업지시코드 cmd = new MySqlCommand("SELECT mngodr_no FROM production_mngodr", conn); adapter = new MySqlDataAdapter(cmd); dt = new DataTable(); adapter.Fill(dt); foreach (DataRow rw in dt.Rows) { cbxWorkNo.Items.Add(rw[0].ToString()); // 콤보박스에 작업지시코드 넣기 } #endregion #region 품목코드 dt.Rows.Clear(); // dt에 있는 저장된 행들(데이터) cmd = new MySqlCommand("select mat_no from info_material where mat_type = '제품'", conn); adapter = new MySqlDataAdapter(cmd); adapter.Fill(dt); foreach (DataRow rw in dt.Rows) { cbxMatCode.Items.Add(rw[1].ToString()); // 콤보박스에 품목코드 넣기 } #endregion #region 창고코드 dt.Rows.Clear(); // dt에 있는 기존행 삭제 cmd = new MySqlCommand("select ware_no from info_warehouse", conn); adapter = new MySqlDataAdapter(cmd); adapter.Fill(dt); foreach (DataRow rw in dt.Rows) { cbxWareHouse.Items.Add(rw[2].ToString()); // 콤보박스에 창고코드 넣기 } #endregion conn.Close(); }
// 상단 그리드뷰 초기 설정 함수 private void TopGridViewFill() { conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); conn.Open(); string qry = "SELECT a.mngodr_no as 'WorkNo', a.mngodr_date as 'WorkDate', a.mat_no as 'Mcode', b.mat_name as 'Mname', b.mat_type as 'Mtype', b.mat_spec as 'Mspec', a.mngodr_count as 'Work_count', a.user_id as 'Manager', a.ware_no as 'WareNo'" + "FROM production_mngodr a, info_material b " + "WHERE a.mat_no = b.mat_no order by a.mngodr_no"; cmd = new MySqlCommand(qry, conn); adapter = new MySqlDataAdapter(cmd); dt = new DataTable(); adapter.Fill(dt); gridManageInputHead.DataSource = dt; conn.Close(); // 일단 불러왔으니 DB는 닫자 }
public mngmnt_2_1_insertData() { InitializeComponent(); conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); dtwareList = new DataTable(); dtcomList = new DataTable(); dt = new DataTable(); dt.Columns.Add(new DataColumn("mat_no", typeof(int))); dt.Columns.Add(new DataColumn("mat_name", typeof(string))); dt.Columns.Add(new DataColumn("mat_type", typeof(string))); dt.Columns.Add(new DataColumn("mat_price", typeof(int))); dt.Columns.Add(new DataColumn("output_count", typeof(int))); dt.Columns.Add(new DataColumn("ware_name", typeof(string))); dt.Columns.Add(new DataColumn("com_name", typeof(string))); dt.Columns.Add(new DataColumn("output_admin", typeof(string))); dt.Columns.Add(new DataColumn("output_etc", typeof(string))); }
// 그리드뷰 초기 설정 public void GridViewFill() { conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); conn.Open(); string qry = "select a.prodrecod_no as 'WkRecNo', a.mngodr_no as 'WorkNo', a.prodrecod_date as 'RecDate', c.mat_name as 'Mname', c.mat_spec as 'Mspec', b.mngodr_count as 'OrderQTY', a.prodrecod_good as 'GoodItem', a.prodrecod_err as 'badITEM', a.ware_no as 'WareHS' " + "from production_prodrecod a, production_mngodr b, info_material c " + "where a.mngodr_no = b.mngodr_no AND b.mat_no = c.mat_no order by a.prodrecod_no"; cmd = new MySqlCommand(qry, conn); adapter = new MySqlDataAdapter(cmd); dt = new DataTable(); adapter.Fill(dt); gridManageInputHead.DataSource = dt; conn.Close(); }
// 그리드뷰 데이터 불러오기 private void GridViewFill() { conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); conn.Open(); string qry = "select d.mat_no as 'SubMat_no', d.mat_name as 'subMat_name', c.curmat_count as 'NowStock', d.bom_count as 'UnitCnt', (d.bom_count * 0) as 'Needs' " + "from manage_curmat c,(select a.mat_no, a.mat_name, b.bom_count " + "from info_material a,(select bom_no, bom_count " + "from info_bom " + "where bom_no != " + selectedCode + " AND bom_parent_no = " + selectedCode + ") b " + "where a.mat_no = b.bom_no) d " + "where c.mat_no = d.mat_no"; cmd = new MySqlCommand(qry, conn); adapter = new MySqlDataAdapter(cmd); dt = new DataTable(); adapter.Fill(dt); dataGridView2.DataSource = dt; conn.Close(); }
//문혁 테스트 private void Home_Load(object sender, EventArgs e) { conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); Label[] lbllist = new Label[4] { lblInputCount, lblOrderCount, lblRateCount, lblOutputCount }; #region Graph #region ColumnChart: 생산량 conn.Open(); string getProductionCapacityQuery = "SELECT tmp2.sequential_day, " + " CASE WHEN tmp1.capacity IS NULL " + " THEN '0' " + " ELSE tmp1.capacity END " + " AS capacity " + "FROM " + " (SELECT DATE_FORMAT(mngodr_date, '%Y-%m-%d') AS 'day', " + " SUM(mngodr_count) as 'capacity' FROM production_mngodr GROUP BY day ORDER BY day) " + " as tmp1 " + " RIGHT JOIN " + " (SELECT DATE_FORMAT(NOW() - INTERVAL seq.seq DAY, '%Y-%m-%d') AS sequential_day " + " FROM " + " (SELECT A.N + 5*(B.N + 5*(C.N + 5*(D.N + 5*(E.N)))) AS seq " + " FROM (SELECT 0 AS N UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4) AS A " + " JOIN (SELECT 0 AS N UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4) AS B " + " JOIN (SELECT 0 AS N UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4) AS C " + " JOIN (SELECT 0 AS N UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4) AS D " + " JOIN (SELECT 0 AS N UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4) AS E )" + " AS seq " + " WHERE seq.seq <= 14 ORDER BY sequential_day) " + " as tmp2 " + "ON tmp1.day = tmp2.sequential_day " + "ORDER BY tmp2.sequential_day ASC "; cmd = new MySqlCommand(getProductionCapacityQuery, conn); adapter = new MySqlDataAdapter(cmd); dt = new DataTable(); adapter.Fill(dt); Series s = chartProductionCapacity.Series[0]; s.XValueMember = "sequential_day"; s.XValueType = ChartValueType.DateTime; s.YValueMembers = "capacity"; chartProductionCapacity.DataSource = dt; chartProductionCapacity.DataBind(); Axis ax = chartProductionCapacity.ChartAreas[0].AxisX; ax.LabelStyle.Format = "DD"; ax.IntervalType = DateTimeIntervalType.Days; ax.Interval = 1; conn.Close(); #endregion #region PieChart: 생산률 conn.Open(); // 오늘 기준 한달전까지의 총 양품수량 / 총 불량품 수량 가져옵니다... string getProductionRateQuery = "SELECT COUNT(prodrecod_good), COUNT(prodrecod_err) FROM production_prodrecod " + "WHERE prodrecod_date BETWEEN DATE_ADD(NOW(), INTERVAL-1 MONTH) AND NOW();"; cmd = new MySqlCommand(getProductionRateQuery, conn); adapter = new MySqlDataAdapter(cmd); dt = new DataTable(); dt.Clear(); adapter.Fill(dt); conn.Close(); chartProductionRate.Series[0].Points.AddXY("양품", Convert.ToInt32(dt.Rows[0][0])); chartProductionRate.Series[0].Points[0].Color = Color.SkyBlue; chartProductionRate.Series[0].Points[0].IsValueShownAsLabel = false; chartProductionRate.Series[0].Points.AddXY("불량품", Convert.ToInt32(dt.Rows[0][1])); chartProductionRate.Series[0].Points[1].Color = Color.OrangeRed; chartProductionRate.Series[0].Points[0].IsValueShownAsLabel = false; chartProductionRate.Series[0].IsValueShownAsLabel = false; #endregion #endregion }
// 콤보박스 초기 설정 함수 private void AddToComboBox() { // cbxRecNo : 작업실적번호 콤보박스 // cbxOdrNo : 작업지시번호 콤보박스 // cbxMatCode : 품목코드 콤보박스 // cbxWareHouse: 창고번호 콤보박스 conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); conn.Open(); #region 작업실적코드 cmd = new MySqlCommand("SELECT prodrecod_no FROM production_prodrecod order by prodrecod_no", conn); adapter = new MySqlDataAdapter(cmd); dt = new DataTable(); adapter.Fill(dt); foreach (DataRow rw in dt.Rows) { cbxRecNo.Items.Add(rw[0].ToString()); // 콤보박스에 작업실적코드 넣기 } #endregion #region 작업지시번호 dt.Rows.Clear(); // dt에 있는 저장된 행들(데이터) cmd = new MySqlCommand("select mngodr_no from production_mngodr order by mngodr_no", conn); adapter = new MySqlDataAdapter(cmd); adapter.Fill(dt); foreach (DataRow rw in dt.Rows) { cbxOdrNo.Items.Add(rw[1].ToString()); // 콤보박스에 품목코드 넣기 } #endregion #region 품목코드 dt.Rows.Clear(); // dt에 있는 기존행 삭제 cmd = new MySqlCommand("select mat_no from info_material order by mat_no", conn); adapter = new MySqlDataAdapter(cmd); adapter.Fill(dt); foreach (DataRow rw in dt.Rows) { cbxMatCode.Items.Add(rw[2].ToString()); // 콤보박스에 창고코드 넣기 } #endregion #region 창고코드 dt.Rows.Clear(); // dt에 있는 기존행 삭제 cmd = new MySqlCommand("select ware_no from info_warehouse order by ware_no", conn); // cmd = new MySqlCommand("select ware_no from info_warehouse where ware_name like '" + "%대기%'", conn); adapter = new MySqlDataAdapter(cmd); adapter.Fill(dt); foreach (DataRow rw in dt.Rows) { cbxWareHouse.Items.Add(rw[3].ToString()); // 콤보박스에 창고코드 넣기 } #endregion conn.Close(); }
public mngmnt_3_StockState() { InitializeComponent(); conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); dtHead = new DataTable(); }
public info_1_2_inputacnt() { InitializeComponent(); gridInsertMangeInput.Rows.Add(); conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); }
public mngmnt_4_RealStockTaking() { InitializeComponent(); conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); dtHead = new DataTable(); }
public mngmnt_2_2_materialList() { InitializeComponent(); conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); dt = new DataTable(); }
public info_3_2_inputware() { InitializeComponent(); conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); }
public mngmnt_1_inputProduct() { InitializeComponent(); conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); dtHead = new DataTable(); }
//문혁 테스트 private void Home_Load(object sender, EventArgs e) { conn = new MySqlConnection(DatabaseInfo.DBConnectStr()); Label[] lbllist = new Label[4] { lblInputCount, lblRateCount, lblOrderCount, lblOutputCount }; conn.Open(); string getTodayWork = "SELECT COUNT(*) FROM manage_input WHERE DATE_FORMAT(input_date, '%Y-%m-%d')= CURDATE() " + "UNION ALL " + "SELECT COUNT(*) FROM manage_output WHERE DATE_FORMAT(output_date, '%Y-%m-%d')= CURDATE() " + "UNION ALL " + "SELECT COUNT(*) FROM production_mngodr WHERE DATE_FORMAT(mngodr_date, '%Y-%m-%d')= CURDATE() " + "UNION ALL " + "SELECT COUNT(*) FROM production_prodrecod WHERE DATE_FORMAT(prodrecod_date, '%Y-%m-%d')= CURDATE();"; cmd = new MySqlCommand(getTodayWork, conn); adapter = new MySqlDataAdapter(cmd); dt = new DataTable(); adapter.Fill(dt); conn.Close(); for (int i = 0; i < lbllist.Length; i++) { lbllist[i].Text = dt.Rows[i][0].ToString(); } #region Graph #region ColumnChart: 생산량 conn.Open(); // 주석 부분 /*string getProductionCapacityQuery = * "SELECT tmp2.sequential_day, " + * " CASE WHEN tmp1.capacity IS NULL " + * " THEN '0' " + * " ELSE tmp1.capacity END " + * " AS capacity " + * "FROM " + * " (SELECT DATE_FORMAT(mngodr_date, '%Y-%m-%d') AS 'day', " + * " SUM(mngodr_count) as 'capacity' FROM production_mngodr GROUP BY day ORDER BY day) " + * " as tmp1 " + * " RIGHT JOIN " + * " (SELECT DATE_FORMAT(NOW() - INTERVAL seq.seq DAY, '%Y-%m-%d') AS sequential_day " + * " FROM " + * " (SELECT A.N + 5*(B.N + 5*(C.N + 5*(D.N + 5*(E.N)))) AS seq " + * " FROM (SELECT 0 AS N UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4) AS A " + * " JOIN (SELECT 0 AS N UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4) AS B " + * " JOIN (SELECT 0 AS N UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4) AS C " + * " JOIN (SELECT 0 AS N UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4) AS D " + * " JOIN (SELECT 0 AS N UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4) AS E )" + * " AS seq " + * " WHERE seq.seq <= 14 ORDER BY sequential_day) " + * " as tmp2 " + * "ON tmp1.day = tmp2.sequential_day " + * "ORDER BY tmp2.sequential_day ASC ";*/ string getProductionCapacityQuery = "SELECT DATE_FORMAT(prodrecod_date, '%m-%d') AS 'date', sum(prodrecod_good) AS 'prodrecod_good', sum(prodrecod_err) AS 'prodrecod_err'" + "FROM production_prodrecod " + "WHERE prodrecod_date BETWEEN DATE_ADD(NOW(), INTERVAL - 1 MONTH) AND NOW() " + "GROUP BY date ORDER BY date ASC;"; cmd = new MySqlCommand(getProductionCapacityQuery, conn); adapter = new MySqlDataAdapter(cmd); DataSet data = new DataSet(); adapter.Fill(data); chartProductionCapacity.DataSource = data; chartProductionCapacity.Series[0].XValueMember = "date"; chartProductionCapacity.Series[0].YValueMembers = "prodrecod_good"; chartProductionCapacity.Series[1].YValueMembers = "prodrecod_err"; chartProductionCapacity.Series[0].LegendText = "생산량"; chartProductionCapacity.ChartAreas["ChartArea1"].AxisX.LabelStyle.Interval = 1; chartProductionCapacity.ChartAreas["ChartArea1"].AxisX.MajorGrid.Enabled = false; chartProductionCapacity.ChartAreas["ChartArea1"].AxisY.MajorGrid.Enabled = false; chartProductionCapacity.DataBind(); //주석 /* Series s = chartProductionCapacity.Series[0]; * s.XValueMember = "sequential_day"; * s.XValueType = ChartValueType.DateTime; * s.YValueMembers = "capacity"; * * chartProductionCapacity.DataSource = dt; * chartProductionCapacity.DataBind(); * * Axis ax = chartProductionCapacity.ChartAreas[0].AxisX; * ax.LabelStyle.Format = "DD"; * ax.IntervalType = DateTimeIntervalType.Days; * ax.Interval = 1;*/ conn.Close(); #endregion #region PieChart: 생산률 conn.Open(); // 오늘 기준 한달전까지의 총 양품수량 / 총 불량품 수량 가져옵니다... string getProductionRateQuery = "SELECT SUM(prodrecod_good), SUM(prodrecod_err) FROM production_prodrecod " + "WHERE prodrecod_date BETWEEN DATE_ADD(NOW(), INTERVAL-1 MONTH) AND NOW();"; cmd = new MySqlCommand(getProductionRateQuery, conn); adapter = new MySqlDataAdapter(cmd); dt = new DataTable(); dt.Clear(); adapter.Fill(dt); conn.Close(); chartProductionRate.Series[0].Points.AddXY("양품", Convert.ToInt32(dt.Rows[0][0])); chartProductionRate.Series[0].Points[0].Color = Color.SkyBlue; chartProductionRate.Series[0].Points[0].LegendText = "양품"; chartProductionRate.Series[0].Points.AddXY("불량품", Convert.ToInt32(dt.Rows[0][1])); chartProductionRate.Series[0].Points[1].Color = Color.OrangeRed; chartProductionRate.Series[0].Points[1].LegendText = "불량품"; #endregion #region LineChart: 불량품 conn.Open(); string getProductionErrQuery = "SELECT DATE_FORMAT(prodrecod_date, '%m-%d') AS 'date', SUM(prodrecod_err)/SUM(prodrecod_err + prodrecod_good) * 100 AS 'err_percent' " + "FROM production_prodrecod " + "WHERE prodrecod_date BETWEEN DATE_ADD(NOW(), INTERVAL - 2 WEEK) AND NOW() " + "GROUP BY date ORDER BY date ASC;"; cmd = new MySqlCommand(getProductionErrQuery, conn); adapter = new MySqlDataAdapter(cmd); DataSet Edata = new DataSet(); adapter.Fill(Edata); ChartProductionErr.DataSource = Edata; ChartProductionErr.Series[0].XValueMember = "date"; ChartProductionErr.Series[0].YValueMembers = "err_percent"; ChartProductionErr.Series[0].LegendText = "불량률(%)"; ChartProductionErr.ChartAreas["ChartArea1"].AxisX.LabelStyle.Interval = 1; ChartProductionErr.ChartAreas["ChartArea1"].AxisX.MajorGrid.Enabled = false; ChartProductionErr.ChartAreas["ChartArea1"].AxisY.MajorGrid.Enabled = false; ChartProductionErr.DataBind(); conn.Close(); #endregion #endregion }