Пример #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();
        }
Пример #3
0
        private void SeeResultDG_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            string value1 = "";

            foreach (DataGridViewRow row in SeeResultDG.SelectedRows)
            {
                value1 = row.Cells[2].Value.ToString();
            }

            user = ToLet.Database.DBDataList.getUserProfile(value1);

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

            this.SeeResultTabControl.SelectedTab = this.UserProfileTAB;
            FirstNameTB.Text   = user.FirstName;
            LastNameTB.Text    = user.LastName;
            MobileTB.Text      = user.MobileNo.ToString();
            EmailTB.Text       = user.Email;
            NidTB.Text         = user.NidNo;
            AddressTB.Text     = user.Address;
            DateOfBirthTB.Text = user.DOB;
            ProfilePicPB.Image = pic;
            UserNameTB.Text    = user.UserName;
        }