private void StockOutButton_Click(object sender, EventArgs e) { StockOutForm stockOutForm = new StockOutForm(); stockOutForm.Show(); this.Hide(); }
//录入出货单 private void toolIntoStock_Click(object sender, EventArgs e) { var db = new BathDBDataContext(LogIn.connectionString); StockOutForm inStockForm = new StockOutForm(db,null); if (inStockForm.ShowDialog() == DialogResult.OK) dgv_show(); }
private void toolEdit_Click(object sender, EventArgs e) { if (dgv.CurrentCell != null) { int stockoutid; try { stockoutid = Convert.ToInt32(dgv.CurrentRow.Cells[0].Value); } catch (System.Exception ex) { MessageBox.Show("请选择一种商品!"); return; } var db = new BathDBDataContext(LogIn.connectionString); StockOut stkout = db.StockOut.FirstOrDefault(x => x.id == stockoutid); if (stkout!=null) { StockOutForm editstockoutform = new StockOutForm(db, stkout); if (editstockoutform.ShowDialog()==DialogResult.OK) dgv_show(); } } else MessageBox.Show("请先选择一行!"); }