| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Runtime.InteropServices;
- using System.Text;
- using System.Text.RegularExpressions;
- using System.Windows.Forms;
- using System.Windows.Forms.DataVisualization.Charting;
- using UAS_MES.CustomControl.DataGrid_View;
- using UAS_MES.DataOperate;
- using UAS_MES.PublicForm;
- using UAS_MES.PublicMethod;
- namespace UAS_MES
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- [DllImport("kernel32.dll")]
- public static extern bool d(int freq, int duration);
- private void button3_Click(object sender, EventArgs e)
- {
- d(800, 600);
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- DataGridViewCheckBoxColumn checkboxCol = new DataGridViewCheckBoxColumn();
- checkboxCol.Name = "全选";
- //创建复选框列头单元格
- DataGridViewCheckBoxHeaderCell ch = new DataGridViewCheckBoxHeaderCell(TestDGV, checkboxCol);
- //设置复选框那列的单元格为复选框
- checkboxCol.HeaderCell = ch;
- this.TestDGV.Columns.Add(checkboxCol);
- blurSearch1.TableName = "Make";
- blurSearch1.Field = "ma_code";
- DataHelper dh = new DataHelper();
- ViewChart((DataTable)dh.ExecuteSql("select nvl(ms_nextstepcode ,'已完工')ms_nextstepcode ,count(*) from makeserial left join makecraftdetail on ms_makecode=mcd_macode and ms_nextstepcode =mcd_nextstepcode where ms_makecode='MB17050022' group by ms_nextstepcode", "select"), "TExt");
- }
- private void ViewChart(DataTable _dt, string _title)
- {
- List<string> xData = new List<string>();
- List<int> yData = new List<int>();
- for (int i = 0; i < _dt.Rows.Count; i++)
- {
- xData.Add(_dt.Rows[i]["ms_nextstepcode"].ToString());
- yData.Add(int.Parse(_dt.Rows[i]["count(*)"].ToString()));
- }
- ct_coll.Series[0]["PieLineColor"] = "Red";//绘制黑色的连线。
- this.ct_coll.Series[0].ToolTip = "#VAL{D}件";//鼠标移动到上面显示的文字
- this.ct_coll.Series[0].BackSecondaryColor = Color.DarkCyan;
- this.ct_coll.Series[0].BorderColor = Color.DarkOliveGreen;
- this.ct_coll.Series[0].LabelBackColor = Color.Transparent;
- ct_coll.ChartAreas[0].Area3DStyle.Enable3D = true;
- ct_coll.Series[0].Points.DataBindXY(xData, yData);
- }
- private void normalButton2_Click(object sender, EventArgs e)
- {
- DataHelper dh = new DataHelper();
- string ErrorMessage = "";
- string makecode = "";
- string IMEI1 = "";
- string IMEI2 = "";
- string IMEI3 = "";
- string IMEID = "";
- string NetCode = "";
- string PSN = "";
- string MAC = "";
- string BT = "";
- string Code1 = "";
- string Code2 = "";
- string Code3 = "";
- string ID1 = "";
- string ID2 = "";
- string ID3 = "";
- LogicHandler.GetSNAllInfo("123133",out IMEI1,out IMEI2,out IMEI3,out IMEID,out NetCode,out PSN,out MAC,out BT,out Code1,out Code2,out Code3,out ID1,out ID2,out ID3,out ErrorMessage);
- Console.WriteLine(IMEI1);
- Console.WriteLine(IMEI2);
- Console.WriteLine(IMEI3);
- Console.WriteLine(IMEID);
- Console.WriteLine(NetCode);
- Console.WriteLine(PSN);
- Console.WriteLine(MAC);
- Console.WriteLine(BT);
- Console.WriteLine(Code1);
- Console.WriteLine(Code2);
- Console.WriteLine(Code3);
- Console.WriteLine(ID1);
- Console.WriteLine(ID2);
- Console.WriteLine(ID3);
- Console.WriteLine(ErrorMessage);
- }
- private void normalButton3_Click(object sender, EventArgs e)
- {
- DataHelper dh = new DataHelper();
- string ErrorMessage = "";
- string makecode = "";
- string IMEI1 = "";
- string IMEI2 = "";
- string IMEI3 = "";
- string IMEID = "";
- string NetCode = "";
- string PSN = "";
- string MAC = "";
- string BT = "";
- string ID1 = "";
- string ID2 = "";
- string ID3 = "";
- LogicHandler.GetIMEIOrNetCodeRange("123133", "MAKED800", "IME1", "NETCODE", out IMEI1, out IMEI2, out IMEI3, out IMEID, out NetCode, out PSN, out ID1, out ID2, out ID3, out ErrorMessage);
- Console.WriteLine(IMEI1);
- Console.WriteLine(IMEI2);
- Console.WriteLine(IMEI3);
- Console.WriteLine(IMEID);
- Console.WriteLine(NetCode);
- Console.WriteLine(PSN);
- Console.WriteLine(MAC);
- Console.WriteLine(BT);
- Console.WriteLine(ID1);
- Console.WriteLine(ID2);
- Console.WriteLine(ID3);
- Console.WriteLine(ErrorMessage);
- }
- private void normalButton2_Click_1(object sender, EventArgs e)
- {
- DataHelper dh = new DataHelper();
- string ErrorMessage = "";
- string makecode = "";
- string MAC = "";
- string BT = "";
- string Code1 = "";
- string Code2 = "";
- string Code3 = "";
- LogicHandler.GetAddressRangeByMakeCode("123133", "MAKED800", out MAC,out BT, out Code1, out Code2, out Code3, out ErrorMessage);
- Console.WriteLine(MAC);
- Console.WriteLine(BT);
- Console.WriteLine(Code1);
- Console.WriteLine(Code2);
- Console.WriteLine(Code3);
- Console.WriteLine(ErrorMessage);
- }
- }
- }
|