Esempio n. 1
0
 protected void ddlUserWisePropertyForPicture_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlUserWisePropertyForPicture.SelectedIndex > 0)
     {
         ddlApartmentNo.DataSource =
             ApartmentBiz.GetApartmentDetailByPeopertyId(Convert.ToInt32(ddlUserWisePropertyForPicture.SelectedValue));
         ddlApartmentNo.DataBind();
     }
 }
Esempio n. 2
0
        private int SendRequestToSave()
        {
            try
            {
                objApartment = new Apartment();

                int result = 0;

                objApartmentBiz = new ApartmentBiz();


                objApartment.PropertyId        = string.IsNullOrEmpty(ddlUserWiseProperty.SelectedValue.Trim()) ? 0 : Convert.ToInt32(ddlUserWiseProperty.SelectedValue.Trim());
                objApartment.ApartmentNoOrName = txtApartmentNoOrName.Text.Trim();
                objApartment.LandloadId        = objUserDetail.UserID.Trim();
                objApartment.FloorNo           = string.IsNullOrEmpty(ddlFloorNo.SelectedValue.Trim()) ? 0 : Convert.ToInt32(ddlFloorNo.SelectedValue.Trim());
                objApartment.ApartmentSpace    = string.IsNullOrEmpty(txtApartmentSpace.Text.Trim()) ? 0 : Convert.ToInt32(txtApartmentSpace.Text.Trim());
                objApartment.Beds           = string.IsNullOrEmpty(txtBeds.Text.Trim()) ? 0 : Convert.ToInt32(txtBeds.Text.Trim());
                objApartment.AttachBatch    = string.IsNullOrEmpty(ddlAttachBatch.SelectedValue.Trim()) ? 0 : Convert.ToInt32(ddlAttachBatch.SelectedValue.Trim());
                objApartment.CommonBath     = string.IsNullOrEmpty(ddlCommonBath.SelectedValue.Trim()) ? 0 : Convert.ToInt32(ddlCommonBath.SelectedValue.Trim());
                objApartment.DiningPosition = ddlDiningPosition.SelectedValue.Trim();

                objApartment.StaffRoom      = string.IsNullOrEmpty(ddlStaffRoom.SelectedValue.Trim()) ? 0 : Convert.ToInt32(ddlStaffRoom.SelectedValue.Trim());
                objApartment.StaffToilet    = string.IsNullOrEmpty(ddlStaffToilet.SelectedValue.Trim()) ? 0 : Convert.ToInt32(ddlStaffToilet.SelectedValue.Trim());
                objApartment.Balconies      = string.IsNullOrEmpty(ddlBalconies.SelectedValue.Trim()) ? 0 : Convert.ToInt32(ddlBalconies.SelectedValue.Trim());
                objApartment.FloorTypeId    = string.IsNullOrEmpty(ddlFloorType.SelectedValue.Trim()) ? 0 : Convert.ToInt32(ddlFloorType.SelectedValue.Trim());
                objApartment.Rent           = string.IsNullOrEmpty(txtRent.Text.Trim()) ? 0 : Convert.ToInt32(txtRent.Text.Trim());
                objApartment.Advance        = string.IsNullOrEmpty(txtAdvance.Text.Trim()) ? 0 : Convert.ToInt32(txtAdvance.Text.Trim());
                objApartment.SecurityAmount = string.IsNullOrEmpty(txtSecurityAmount.Text.Trim()) ? 0 : Convert.ToInt32(txtSecurityAmount.Text.Trim());
                objApartment.ServiceCharge  = string.IsNullOrEmpty(txtServiceCharge.Text.Trim()) ? 0 : Convert.ToInt32(txtServiceCharge.Text.Trim());
                objApartment.GasBill        = string.IsNullOrEmpty(ddlGasBill.SelectedValue.Trim()) ? 0 : Convert.ToDecimal(ddlGasBill.SelectedValue.Trim());
                objApartment.CableTvBill    = string.IsNullOrEmpty(txtCableTvBill.Text.Trim()) ? 0 : Convert.ToDecimal(txtCableTvBill.Text.Trim());
                objApartment.InternetBill   = string.IsNullOrEmpty(txtInternetBill.Text.Trim()) ? 0 : Convert.ToDecimal(txtInternetBill.Text.Trim());
                //objApartment.InternetBill = Convert.ToDecimal(txtInternetBill.Text.Trim());
                objApartment.Description     = txtDescription.Text.Trim();
                objApartment.VacancyStatusId = string.IsNullOrEmpty(ddlVacancyStatus.SelectedValue.Trim()) ? 1 : Convert.ToInt32(ddlVacancyStatus.SelectedValue.Trim());

                result = objApartmentBiz.SaveApartmentInfo(objApartment);

                return(result);
            }
            catch (Exception exception)
            {
                MessageBox(exception.Message);
                return(0);
            }
        }