private void button2_Click(object sender, EventArgs e) { if (textBox1.Text != "") { string SanphamID; SanphamID = (GridView_SanPham.CurrentRow != null) ? GridView_SanPham.CurrentRow.Cells[0].Value.ToString() : "0"; QuanLySanPham.Nhapkho nk = new QuanLySanPham.Nhapkho(int.Parse(textBox1.Text), int.Parse(SanphamID)); nk.ShowDialog(); } else { MessageBox.Show("Lựa chọn kho"); } }
private void button2_Click(object sender, EventArgs e) { if (textBox1.Text != "") { string SanphamID; SanphamID = (GridView_SanPham.CurrentRow != null) ? GridView_SanPham.CurrentRow.Cells[0].Value.ToString() : "0"; QuanLySanPham.Nhapkho nk = new QuanLySanPham.Nhapkho(int.Parse(textBox1.Text),int.Parse(SanphamID)); nk.ShowDialog(); } else { MessageBox.Show("Lựa chọn kho"); } }