예제 #1
0
        private void MyLandlordDG_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            string value1 = "";

            foreach (DataGridViewRow row in MyLandlordDG.SelectedRows)
            {
                value1 = row.Cells[2].Value.ToString();
            }
            Classes.User user = new Classes.User();
            user = ToLet.Database.DBDataList.getUserProfile(value1);

            Image            pic = ToLet.Database.DBDataList.getUserPic(value1);
            SearchResultForm f   = new SearchResultForm();

            f.SeeResultTabControl.SelectedTab = f.UserProfileTAB;

            f.FirstNameTB.Text   = user.FirstName;
            f.LastNameTB.Text    = user.LastName;
            f.MobileTB.Text      = user.MobileNo.ToString();
            f.EmailTB.Text       = user.Email;
            f.NidTB.Text         = user.NidNo;
            f.AddressTB.Text     = user.Address;
            f.DateOfBirthTB.Text = user.DOB;
            f.ProfilePicPB.Image = pic;
            f.UserNameTB.Text    = user.UserName;
            f.AcceptBTN.Hide();
            f.BackResultBTN.Hide();
            f.Show();
        }
        private void SeeRequestBTN_Click(object sender, EventArgs e)
        {
            Classes.PropertyDetails pd = new Classes.PropertyDetails();

            pd.TenantCategory    = textBox1.Text;
            pd.HomeCategory      = textBox2.Text;
            pd.Location          = textBox3.Text;
            pd.RoomCount         = textBox4.Text;
            pd.DetailedAddress   = AddDetaiedAddressTB.Text;
            pd.AdditionalComment = AddAdditionalCommentsTB.Text;
            pd.RentRange         = AddPriceTB.Text;


            Classes.User        u          = new Classes.User();
            List <int>          useridlist = new List <int>();
            List <Classes.User> cu         = new List <Classes.User>();

            useridlist = ToLet.Database.DBDataList.getRequestResult(pd);

            SearchResultForm srf = new SearchResultForm(m, pd);

            foreach (var item in useridlist)
            {
                cu.AddRange(ToLet.Database.DBDataList.getUserRequestInfo(item, srf));
            }
            srf.SeeResultDG.DataSource         = cu;
            srf.SeeResultDG.Columns[0].Visible = false;
            srf.SeeResultDG.Columns[1].Visible = false;
            srf.SeeResultDG.Columns[3].Visible = false;
            srf.SeeResultDG.Columns[4].Visible = false;
            srf.SeeResultDG.Columns[5].Visible = false;
            srf.SeeResultDG.Columns[8].Visible = false;
            srf.SeeResultDG.Columns[9].Visible = false;



            this.Hide();
            srf.Show();
        }