Exemple #1
0
        protected void btnLuuThongTin_Click(object sender, EventArgs e)
        {
            if (Session["TaiSanThaoTac"].ToString() == "0")
            {
                if (Session["LoaiHoSo"] == "DuBi")
                {
                    bool success = don.ThemTaiSanThayDoiDuBiTrongBienDong(Session["DangKyBienDong"].ToString(), txtLoaiTaiSan1.Text, txtDienTich1.Text, txtNoiDungKhac1.Text, txtLoaiTaiSan2.Text, txtDienTich2.Text, txtNoiDungKhac2.Text);
                    if (success)
                    {
                        LoadThongTin(Session["DangKyBienDong"].ToString());
                        Session["TaiSanThaoTac"] = "0";
                    }
                }
                else if (Session["LoaiHoSo"] == "ChinhThuc")
                {
                    bool success = don.ThemTaiSanThayDoiTrongBienDong(Session["DangKyBienDong"].ToString(), txtLoaiTaiSan1.Text, txtDienTich1.Text, txtNoiDungKhac1.Text, txtLoaiTaiSan2.Text, txtDienTich2.Text, txtNoiDungKhac2.Text);
                    if (success)
                    {
                        LoadThongTin(Session["DangKyBienDong"].ToString());
                        Session["TaiSanThaoTac"] = "0";
                    }
                }
                else
                {
                    return;
                }
            }
            else
            {
                if (Session["LoaiHoSo"] == "DuBi")
                {
                    bool success = don.SuaTaiSanThayDoiDuBiTrongBienDong(Session["TaiSanThaoTac"].ToString(), txtLoaiTaiSan1.Text, txtDienTich1.Text, txtNoiDungKhac1.Text, txtLoaiTaiSan2.Text, txtDienTich2.Text, txtNoiDungKhac2.Text);
                    if (success)
                    {
                        LoadThongTin(Session["DangKyBienDong"].ToString());
                        Session["TaiSanThaoTac"] = "0";
                    }
                }
                else if (Session["LoaiHoSo"] == "ChinhThuc")
                {
                    bool success = don.SuaTaiSanThayDoiTrongBienDong(Session["TaiSanThaoTac"].ToString(), txtLoaiTaiSan1.Text, txtDienTich1.Text, txtNoiDungKhac1.Text, txtLoaiTaiSan2.Text, txtDienTich2.Text, txtNoiDungKhac2.Text);
                    if (success)
                    {
                        LoadThongTin(Session["DangKyBienDong"].ToString());
                        Session["TaiSanThaoTac"] = "0";
                    }
                }
                else
                {
                    return;
                }
            }

            Session["ThaoTac"] = ThaoTac.KhongNhap;
            ApDungTrangThai();
        }