private void button1_Click(object sender, EventArgs e) { List <byte[]> list = new List <byte[]>(); list.Add(ImageToByteArray(pictureBox1.Image)); list.Add(ImageToByteArray(pictureBox2.Image)); list.Add(ImageToByteArray(pictureBox3.Image)); var x = bl.ThemMoiBangVe(int.Parse(txtDai.Text), int.Parse(txtRong.Text), int.Parse(comboBox1.SelectedValue.ToString()) , ConvertInt(txtTang.Text), ConvertInt(txtPhongKhach.Text), ConvertInt(txtPhongNgu.Text), ConvertInt(txtVeSinh.Text), ConvertInt(txtBep.Text), cboTruocSau.SelectedItem.ToString(), list ); if (x == true) { this.Close(); MessageBox.Show("thành công"); frm_ThemMoiThietKe frm = new frm_ThemMoiThietKe(); frm.Show(); } else { this.Close(); MessageBox.Show("thất bại"); } }
private void btnLogin_Click(object sender, EventArgs e) { if (Login() != null) { Constants.KIENTRUCSU = Login(); this.Close(); frm_ThemMoiThietKe frm = new frm_ThemMoiThietKe(); frm.Show(); } else { MessageBox.Show("sai mật khẩu hoặc email"); } }