Beispiel #1
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            string msp     = txt_msp.Text;
            string tensp   = txt_ten.Text;
            string idBrand = cmb_Brand.SelectedValue.ToString();
            string idColor = cmb_Color.SelectedValue.ToString();
            string idStype = cmb_Stype.SelectedValue.ToString();
            string tt      = txt_tt.Text;
            string gia     = txt_gia.Text;

            if (dao.UpdateSP(msp, idBrand, idColor, idStype, TenAnh.Text, tt, gia.ToString(), tensp, PhanQuyenDao.maNguoiQuanLy))
            {
                if (check)
                {
                    System.IO.File.Copy(urlnameluu, paths + "\\Images\\" + TenAnh.Text);
                    check = false;
                }



                MessageBox.Show("Đã sửa thành công");
                setNull();
                getListSP();
            }
            else
            {
                MessageBox.Show("Xảy ra lỗi mời thử lại");
            }
        }