private void btn_add_Click(object sender, EventArgs e) { if (txt_maShipper.Text == "" && txt_tenShipper.Text == "") { MessageBox.Show("Không thể thêm nếu không có dữ liệu."); } else { if (shipper.Add_Shipper(txt_maShipper.Text, txt_tenShipper.Text, "1", txt_mail.Text, txt_birthday.Text, txt_sdt.Text, cbx_Quan.Text, "1")) { MessageBox.Show("Thêm mới shipper thành công"); } else { MessageBox.Show("Thêm mới không thành công!"); } } }
private void btn_add_Click(object sender, EventArgs e) { if (txt_maShipper.Text == "" && txt_tenShipper.Text == "") { MessageBox.Show("Không thể thêm nếu không có dữ liệu."); } else { if (shipper.Add_Shipper(txt_maShipper.Text, txt_tenShipper.Text, rNam.Checked ? true : false, txt_mail.Text, txt_birthday.Text, txt_sdt.Text, cbx_Quan.SelectedValue.ToString(), "true")) { MessageBox.Show("Thêm mới shipper thành công"); dataGridView1.DataSource = shipper1.Load_On(); } else { MessageBox.Show("Thêm mới không thành công!"); } } }