protected void btnAssign_Click(object sender, EventArgs e)
        {
            System.Threading.Thread.Sleep(2000);
            offServ = new OfficerServicesClient();

            OfficerHandlesAccommo offHandlsAcc = new OfficerHandlesAccommo();

            offHandlsAcc.OfficerID  = assgnOfficer.ID;
            offHandlsAcc.AccommoID  = AccoId;
            offHandlsAcc.AssignDate = DateTime.Now.ToString();


            string outcome = offServ.assignAccommodations(offHandlsAcc);

            if (outcome.Contains("Success"))
            {
                ModalPopupExtenderSuccess.Show();
                System.Threading.Thread.Sleep(2000);
            }
            else if (outcome.Contains("Failed"))
            {
                ModalPopupExtenderFailed.Show();
                System.Threading.Thread.Sleep(2000);
            }
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            System.Threading.Thread.Sleep(2000);
            OwnerServicesClient oServ = new OwnerServicesClient();
            OwnersCompany       comp  = new OwnersCompany()
            {
                OwnerId     = Convert.ToInt32(Session["ID"]),
                CompanyName = txtCompName.Text,
                ContactNum  = txtTeleNo.Text,
                Email       = txtEmail.Text,
                RegNum      = txtCompRegNo.Text
            };
            string outcome = oServ.insertCompany(comp);

            if (outcome.Contains("Success"))
            {
                ModalPopupExtenderSuccess.Show();
                System.Threading.Thread.Sleep(2000);
            }
            else if (outcome.Contains("Failed"))
            {
                ModalPopupExtenderFailed.Show();
                System.Threading.Thread.Sleep(2000);
            }
        }
示例#3
0
        protected void btnSaveChanges_Click(object sender, EventArgs e)
        {
            System.Threading.Thread.Sleep(2000);

            AccommoServicesClient   accServ    = new AccommoServicesClient();
            AccommodationAddDetails addDetails = new AccommodationAddDetails();

            //AddDetails
            addDetails.NumSingleRooms     = Convert.ToInt32(txtNumSingles.Text);
            addDetails.NumTwoSharingRooms = Convert.ToInt32(txtNumSharing.Text);
            addDetails.NumBathrooms       = Convert.ToInt32(txtNumBathrooms.Text);
            addDetails.RentSingle         = Convert.ToDouble(txtPricSingle.Text);
            addDetails.RentSharing        = Convert.ToDouble(txtPricSharing.Text);
            addDetails.GenderAllowed      = drpGender.SelectedItem.Text;

            //Features
            if (Gym.Checked)
            {
                addDetails.Gym = 1;
            }
            else
            {
                addDetails.Gym = 0;
            }
            if (Cleaning.Checked)
            {
                addDetails.CleaningService = 1;
            }
            else
            {
                addDetails.CleaningService = 0;
            }
            if (Laundry.Checked)
            {
                addDetails.WashingMachine = 1;
            }
            else
            {
                addDetails.WashingMachine = 0;
            }
            if (Parking.Checked)
            {
                addDetails.ParkingPort = 1;
            }
            else
            {
                addDetails.ParkingPort = 0;
            }
            if (Wifi.Checked)
            {
                addDetails.WiFi = 1;
            }
            else
            {
                addDetails.WiFi = 0;
            }
            if (TvArea.Checked)
            {
                addDetails.DSTV = 1;
            }
            else
            {
                addDetails.DSTV = 0;
            }
            if (EntArea.Checked)
            {
                addDetails.EntertainmentArea = 1;
            }
            else
            {
                addDetails.EntertainmentArea = 0;
            }
            if (StudyArea.Checked)
            {
                addDetails.DedicatedStudyArea = 1;
            }
            else
            {
                addDetails.DedicatedStudyArea = 0;
            }
            if (TransServ.Checked)
            {
                addDetails.TransportShuttle = 1;
            }
            else
            {
                addDetails.TransportShuttle = 0;
            }
            AccommodationAddDetails outcome = new AccommodationAddDetails();

            outcome = accServ.updateAccommoAddDetails(Request.QueryString["AccommID"], addDetails);
            if (outcome != null)
            {
                ModalPopupExtenderSuccess.Show();
                System.Threading.Thread.Sleep(2000);
            }
            else if (outcome == null)
            {
                ModalPopupExtenderFailed.Show();
                System.Threading.Thread.Sleep(2000);
            }
        }