Exemple #1
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);
        }
Exemple #2
0
 public static bool MotelInfo_Update(MotelInfo data)
 {
     return(db.MotelInfo_Update(data));
 }
Exemple #3
0
 public static int MotelInfo_InsertGetID(MotelInfo data, int ID)
 {
     return(db.MotelInfo_InsertGetID(data, ID));
 }
Exemple #4
0
 public static bool MotelInfo_Insert(MotelInfo data)
 {
     return(db.MotelInfo_Insert(data));
 }