コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                UserID  = Request.QueryString["id"];
                MotelID = Request.QueryString["homeID"];
                List <UsersInfo> listUser = UsersService.UsersInfo_GetById(UserID);
                //if (listUser[0].Gender == "True")
                //{
                //    txtGender.Text = "Nam";
                //}
                //else
                //{
                //    txtGender.Text = "Nữ";
                //}
                txtGender.Text = "Nam";
                txtUser.Text   = listUser[0].UserName;
                //txtPass.Text = listUser[0].Password;
                txtEmail.Text       = listUser[0].Email;
                txtAddress.Text     = listUser[0].Address;
                txtBirthday.Text    = listUser[0].Birthday;
                txtNumberPhone.Text = listUser[0].MobilePhone;
                txtIdentyCard.Text  = listUser[0].IdentityCard;
                txtFullName.Text    = listUser[0].FullName;
                string chuoi = "";
                chuoi         += "<img src=\"" + listUser[0].Avatar + " \" style=\" width: 40% \" />";
                ltrAvatar.Text = chuoi;

                List <MotelInfo> litMotelInfos = MotelService.MotelInfo_GetById(MotelID);
            }
        }
コード例 #2
0
        protected void btnRentMotel_Click(object sender, ImageClickEventArgs e)
        {
            var objRealEstateOwner = new RealEstateOwnersInfo
            {
                RealEstateOwnersName = txtRealEstateOwner5.Text,
                CLUR = rdCLUR5.SelectedValue,
                RealEstateOwnersType = rdRealEstateOwnerType5.SelectedItem.ToString(),
                Gender       = rdGender5.SelectedValue,
                Address      = txtAddress52.Text,
                IdentityCard = txtIdentyCard5.Text,
                MobilePhone  = txtMobilePhone5.Text,
                Email        = txtEmail5.Text,
            };
            int realEstateOwnerID = RealEstateOwnersService.RealEstateOwnersInfo_Insert(objRealEstateOwner, _reOwnerId);

            var obj2 = new MotelInfo
            {
                MotelTypeID        = ddlMotelType5.SelectedValue,
                Name               = txtTenNha5.Text,
                RealEstateOwnersID = "1",
                IsClosed           = rdIsClose.SelectedValue,
                IsCooker           = rdIsCooker.SelectedValue,
                Furniture          = rdFurniture.SelectedValue,
                RealEstateID       = ddlRealEstate5.SelectedValue,
                Title              = "",
                Tag                  = "",
                CreateBy             = txtTenChuSoHuu5.Text,
                CreateDate           = DateTime.Now.ToShortDateString(),
                RealEstateOwnersName = txtTenChuSoHuu5.Text,
                CityID               = ddlCity5.SelectedValue,
                LocationID           = "",
                TierNumber           = txtTierNum.Text,
                DistrictID           = ddlDistrict5.SelectedValue,
                Address              = txtAddress5.Text + ddlDistrict5.SelectedItem + ddlCity5.SelectedItem,
                Description          = txtDescription5.Text,
                TotalArea            = txtArea5.Text,
                Price                = txtPrice5.Text,
                Image1               = lbImages1.Text,
                Image2               = lbImages2.Text,
                Image3               = lbImages3.Text,
                Image4               = lbImages4.Text,
                Image5               = lbImages5.Text,
                Image6               = lbImages6.Text
            };
            int homeID2 = MotelService.MotelInfo_InsertGetID(obj2, _homeId);

            Response.Redirect("~/ViewPostRentMotel.aspx?reOwnerID=" + realEstateOwnerID + "&homeID=" + homeID2);
        }
コード例 #3
0
        private void LoadSaleApartments()
        {
            string           chuoi = "";
            List <MotelInfo> listApartmentInfos = new List <MotelInfo>();

            listApartmentInfos = MotelService.MotelInfo_GetByAll();
            if (listApartmentInfos.Count > 0)
            {
                for (int i = 0; i < listApartmentInfos.Count; i++)
                {
                    chuoi += "<div class=\" row \" style=\"line-height: 25px;\">";
                    chuoi += "<h3><span style=\" color: blue;\"> <a href = \" Default2.aspx?mod=" + listApartmentInfos[i].Tag + "\">" + listApartmentInfos[i].Title +
                             "</a> </span></h3>";

                    //cột trái
                    chuoi += "<div class=\"span3\">";
                    chuoi += "<img src=\"" + listApartmentInfos[i].Image1 + "\" />";
                    chuoi += "</div>";
                    //cột phải
                    chuoi += "<div class=\"span6\">";
                    chuoi += "<p>" + listApartmentInfos[i].Description + "</p>";
                    chuoi += "<p>" + "Giá cho thuê: " + "<span style=\"color: red; font-weight:bold;\">" + listApartmentInfos[0].Price + "</span>" + " VND" + " | " + "Tổng diện tích: " + "<span style=\"color: red; font-weight:bold;\">" + listApartmentInfos[0].TotalArea + "</span>" + " | " + "Phòng thuộc tầng: " + "<span style=\"color: red; font-weight:bold;\">" + listApartmentInfos[0].TierNumber + "</span>" + " | " +
                             "Khép kín: " + "<span style=\"color: red; font-weight:bold;\">" + listApartmentInfos[0].IsClosed + "</span>" + " | " + "Có bếp: " + "<span style=\"color: red; font-weight:bold;\">" +
                             listApartmentInfos[0].IsCooker + "</span>" + "</p>";
                    chuoi += "<p>" + "<table><tr><td width=\"60%\">Địa chỉ: " + "<span style=\"color: blue; font-weight:bold;\">" + listApartmentInfos[i].Address + "</span>" + "</td><td width=\"40%\">Người đăng: " + "<span style=\"color: blue; font-weight:bold;\">" + listApartmentInfos[i].CreateBy + "</span>" + "</td></tr></table></p>";
                    chuoi += "</div>";
                    chuoi += "</div>";
                    //chuoi += "<hr style=\" border: 1px solid grey;\">";
                }
            }
            else
            {
                chuoi += "<p>" + "Không có dữ liều nào để hiển thị </p>";
            }
            ltrTab1.Text = chuoi;
            //ltrTab2.Text = chuoi;
            listApartmentInfos.Clear();
        }
コード例 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                _realEstateOwnerID = Request.QueryString["reOwnerID"];
                _MotelID           = Request.QueryString["homeID"];
                List <RealEstateOwnersInfo> listUser      = RealEstateOwnersService.RealEstateOwnersInfo_GetById(_realEstateOwnerID);
                List <MotelInfo>            txtMotelInfos = MotelService.MotelInfo_GetById(_MotelID);
                //if (listUser[0].Gender == "True")
                //{
                //    txtGender.Text = "Nam";
                //}
                //else
                //{
                //    txtGender.Text = "Nữ";
                //}
                txtRealEstateOwner.Text     = listUser[0].RealEstateOwnersName;
                txtCLUR5.Text               = listUser[0].CLUR;
                txtRealEstateOwnerType.Text = listUser[0].RealEstateOwnersType;
                txtGender.Text              = "Nam";
                txtEmail.Text               = listUser[0].Email;
                txtAddress.Text             = listUser[0].Address;
                txtMobilePhone.Text         = listUser[0].MobilePhone;
                txtIdentyCard.Text          = listUser[0].IdentityCard;
                //string chuoi = "";
                //chuoi += "<img src=\"" + listUser[0].Avatar + " \" style=\" width: 40% \" />";
                //ltrAvatar.Text = chuoi;



                //Motel
                txtMotelType.Text  = txtMotelInfos[0].MotelTypeID;
                txtRealEstate.Text = txtMotelInfos[0].RealEstateID;
                txtTenNha.Text     = txtMotelInfos[0].Name;
                txtIsClose.Text    = txtMotelInfos[0].IsClosed;
                txtIsCooker.Text   = txtMotelInfos[0].IsCooker;
                txtFurniture.Text  = txtMotelInfos[0].Furniture;
                txtAddress1.Text   = txtMotelInfos[0].Address;
                txtDes.Text        = txtMotelInfos[0].Description;
                txtArea.Text       = txtMotelInfos[0].TotalArea;
                Label1.Text        = txtMotelInfos[0].Price;
                txtThuocTang.Text  = txtMotelInfos[0].TierNumber;
                string chuoi = "";
                chuoi       += "<img src=\"" + txtMotelInfos[0].Image1 + " \" style=\" width: 90% \" />";
                ltrAnh1.Text = chuoi;
                string chuoi2 = "";
                chuoi2      += "<img src=\"" + txtMotelInfos[0].Image2 + " \" style=\" width: 90% \" />";
                ltrAnh2.Text = chuoi2;
                string chuoi3 = "";
                chuoi3      += "<img src=\"" + txtMotelInfos[0].Image3 + " \" style=\" width: 90% \" />";
                ltrAnh3.Text = chuoi3;
                string chuoi4 = "";
                chuoi4      += "<img src=\"" + txtMotelInfos[0].Image4 + " \" style=\" width: 90% \" />";
                ltrAnh4.Text = chuoi4;
                string chuoi5 = "";
                chuoi5      += "<img src=\"" + txtMotelInfos[0].Image5 + " \" style=\" width: 90% \" />";
                ltrAnh5.Text = chuoi5;
                string chuoi6 = "";
                chuoi6      += "<img src=\"" + txtMotelInfos[0].Image6 + " \" style=\" width: 90% \" />";
                ltrAnh6.Text = chuoi6;
            }
        }