Exemple #1
0
        protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "Select")
            {
                Session["ThuaDatThaoTac"] = e.CommandArgument.ToString();
                if (Session["LoaiHoSo"] == "DuBi")
                {
                    tblThuaDatThayDoiTrongBienDongDuBi thuadangxet = don.ThuaDuBiDangXet(Session["ThuaDatThaoTac"].ToString());
                    txtThuaDat1.Text     = thuadangxet.ToBanDo;
                    txtToBanDo1.Text     = thuadangxet.SoThua;
                    txtDienTich1.Text    = thuadangxet.DienTich;
                    txtNoiDungKhac1.Text = thuadangxet.NoiDungThayDoiKhac;

                    txtThuaDat2.Text     = thuadangxet.SoThuaMoi;
                    txtToBanDo2.Text     = thuadangxet.ToBanDoMoi;
                    txtDienTich2.Text    = thuadangxet.DienTichMoi;
                    txtNoiDungKhac2.Text = thuadangxet.NoiDungThayDoiKhacMoi;
                }
                else if (Session["LoaiHoSo"] == "ChinhThuc")
                {
                    tblThuaDatThayDoiTrongBienDong thuadangxet = don.ThuaDangXet(Session["ThuaDatThaoTac"].ToString());
                    txtThuaDat1.Text     = thuadangxet.ToBanDo;
                    txtToBanDo1.Text     = thuadangxet.SoThua;
                    txtDienTich1.Text    = thuadangxet.DienTich;
                    txtNoiDungKhac1.Text = thuadangxet.NoiDungThayDoiKhac;

                    txtThuaDat2.Text     = thuadangxet.SoThuaMoi;
                    txtToBanDo2.Text     = thuadangxet.ToBanDoMoi;
                    txtDienTich2.Text    = thuadangxet.DienTichMoi;
                    txtNoiDungKhac2.Text = thuadangxet.NoiDungThayDoiKhacMoi;
                }
                else
                {
                    return;
                }
            }
        }