private void button6_Click(object sender, EventArgs e) { var dupa = new Traceability(new ConnectionStringModel(_sqlIp, _db, _sqlUser, _sqlPass)); if (!dupa.IsConnection()) { return; } try { var tb = new DataTable(); tb.Load(dupa.Ask_SN("Junior", "750", "26111047", "26111047062173033700", new[] { "1", "abc" })); // tb.Load(dupa.Ask_SN("Junior", "750", "26111047", "26111047062173033700", new[] {"" })); var foo = tb.Rows[0][0].ToString(); MessageBox.Show(foo); } catch (Exception exception) { MessageBox.Show(exception.ToString()); throw; } }
private void button5_Click(object sender, EventArgs e) { //EXEC [dbo].[ASK_SN] @LINE = N'JUNIOR', @OP = 750, @PN = N'26111047', @SN = N'26111047062173033700' var dupa = new Traceability(new ConnectionStringModel(_sqlIp, _db, _sqlUser, _sqlPass)); if (!dupa.IsConnection()) { return; } try { var tb = new DataTable(); tb.Load(dupa.Ask_SN("Junior", "750", "26111047", "26111047062173033700")); var foo = tb.Rows[0][0].ToString(); MessageBox.Show(foo); } catch (Exception exception) { MessageBox.Show(exception.ToString()); throw; } }