Minor changes
This commit is contained in:
		
							parent
							
								
									c6a1e2a475
								
							
						
					
					
						commit
						1e0c05d33a
					
				| 
						 | 
				
			
			@ -86,11 +86,11 @@
 | 
			
		|||
            this.dateTimePicker1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
 | 
			
		||||
            | System.Windows.Forms.AnchorStyles.Left) 
 | 
			
		||||
            | System.Windows.Forms.AnchorStyles.Right)));
 | 
			
		||||
            this.dateTimePicker1.Checked = false;
 | 
			
		||||
            this.dateTimePicker1.Location = new System.Drawing.Point(156, 78);
 | 
			
		||||
            this.dateTimePicker1.Name = "dateTimePicker1";
 | 
			
		||||
            this.dateTimePicker1.Size = new System.Drawing.Size(350, 26);
 | 
			
		||||
            this.dateTimePicker1.TabIndex = 4;
 | 
			
		||||
            this.dateTimePicker1.Value = new System.DateTime(2019, 3, 15, 0, 0, 0, 0);
 | 
			
		||||
            // 
 | 
			
		||||
            // browseButton
 | 
			
		||||
            // 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,12 +36,6 @@ namespace trayToDB
 | 
			
		|||
        private List<SiPMData> listOfData;
 | 
			
		||||
        private DateTime shippingDate;
 | 
			
		||||
 | 
			
		||||
        private static string server = "localhost";
 | 
			
		||||
        private static string user = "sipm";
 | 
			
		||||
        private static string database = "sipmtest";
 | 
			
		||||
        private static string port = "3306";
 | 
			
		||||
        //private static string password = "";
 | 
			
		||||
 | 
			
		||||
        public MainWindow()
 | 
			
		||||
        {
 | 
			
		||||
            InitializeComponent();
 | 
			
		||||
| 
						 | 
				
			
			@ -51,7 +45,7 @@ namespace trayToDB
 | 
			
		|||
            openFileDialog1.Filter = "Excel sheets (*.xls;*.xlsx)|*.xls;*.xlsx";
 | 
			
		||||
            openFileDialog1.Multiselect = false;
 | 
			
		||||
            openFileDialog1.CheckFileExists = true;
 | 
			
		||||
 | 
			
		||||
            dateTimePicker1.MaxDate = DateTime.Today;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private void Form1_Load(object sender, EventArgs e)
 | 
			
		||||
| 
						 | 
				
			
			@ -183,7 +177,7 @@ namespace trayToDB
 | 
			
		|||
            MySqlConnection conn = new MySqlConnection(connStr);
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
                statusTextbox.AppendText("Connecting to " + user + "@" + server + ":" + port + "\n");
 | 
			
		||||
                statusTextbox.AppendText("Connecting to " + Properties.Settings.Default.user + "@" + Properties.Settings.Default.server + ":" + Properties.Settings.Default.port + "\n");
 | 
			
		||||
                conn.Open();
 | 
			
		||||
                statusTextbox.AppendText("Successfully connected\n");
 | 
			
		||||
                // Perform database operations
 | 
			
		||||
| 
						 | 
				
			
			@ -258,7 +252,8 @@ namespace trayToDB
 | 
			
		|||
                        for (int j = 0; j < listOfData[i].noOfSipm; j++)
 | 
			
		||||
                        {
 | 
			
		||||
                            cmd.Parameters.Clear();
 | 
			
		||||
                            cmd.CommandText = "INSERT INTO sipmtable (hamamatsutrayid, hamamatsutrayposition, outputtrayid, outputtrayposition) VALUES (@trayid ,@j , 1, 1)";
 | 
			
		||||
                            //cmd.CommandText = "INSERT INTO sipmtable (hamamatsutrayid, hamamatsutrayposition, outputtrayid, outputtrayposition) VALUES (@trayid ,@j , 1, 1)";
 | 
			
		||||
                            cmd.CommandText = "INSERT INTO sipmtable (hamamatsutrayid, hamamatsutrayposition) VALUES (@trayid ,@j)";
 | 
			
		||||
                            cmd.Parameters.AddWithValue("@shipping", shippingDate);
 | 
			
		||||
                            cmd.Parameters.AddWithValue("@trayid", trayid);
 | 
			
		||||
                            cmd.Parameters.AddWithValue("@trayno", listOfData[i].trayNo);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue