Beispiel #1
0
        protected void btnLuuThongTin_Click(object sender, EventArgs e)
        {
            if (Session["ThuaDatThaoTac"].ToString() == "0")
            {
                if (Session["LoaiHoSo"] == "DuBi")
                {
                    bool success = don.ThemThuaDatThayDoiTrongBienDongDuBi(Session["DangKyBienDong"].ToString(), txtToBanDo1.Text, txtThuaDat1.Text, txtDienTich1.Text, txtNoiDungKhac1.Text, txtToBanDo2.Text, txtThuaDat2.Text, txtDienTich2.Text, txtNoiDungKhac2.Text);
                    if (success)
                    {
                        LoadThongTin(Session["DangKyBienDong"].ToString());
                        Session["ThuaDatThaoTac"] = "0";
                    }
                }
                else if (Session["LoaiHoSo"] == "ChinhThuc")
                {
                    bool success = don.ThemThuaDatThayDoiTrongBienDong(Session["DangKyBienDong"].ToString(), txtToBanDo1.Text, txtThuaDat1.Text, txtDienTich1.Text, txtNoiDungKhac1.Text, txtToBanDo2.Text, txtThuaDat2.Text, txtDienTich2.Text, txtNoiDungKhac2.Text);
                    if (success)
                    {
                        LoadThongTin(Session["DangKyBienDong"].ToString());
                        Session["ThuaDatThaoTac"] = "0";
                    }
                }
                else
                {
                    return;
                }
            }
            else
            {
                if (Session["LoaiHoSo"] == "DuBi")
                {
                    bool success = don.SuaThuaDatThayDoiDuBiTrongBienDong(Session["ThuaDatThaoTac"].ToString(), txtToBanDo1.Text, txtThuaDat1.Text, txtDienTich1.Text, txtNoiDungKhac1.Text, txtToBanDo2.Text, txtThuaDat2.Text, txtDienTich2.Text, txtNoiDungKhac2.Text);
                    if (success)
                    {
                        LoadThongTin(Session["DangKyBienDong"].ToString());
                        Session["ThuaDatThaoTac"] = "0";
                    }
                }
                else if (Session["LoaiHoSo"] == "ChinhThuc")
                {
                    bool success = don.SuaThuaDatThayDoiTrongBienDong(Session["ThuaDatThaoTac"].ToString(), txtToBanDo1.Text, txtThuaDat1.Text, txtDienTich1.Text, txtNoiDungKhac1.Text, txtToBanDo2.Text, txtThuaDat2.Text, txtDienTich2.Text, txtNoiDungKhac2.Text);
                    if (success)
                    {
                        LoadThongTin(Session["DangKyBienDong"].ToString());
                        Session["ThuaDatThaoTac"] = "0";
                    }
                }
                else
                {
                    return;
                }
            }

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