private void pictureBox1_Click(object sender, EventArgs e)
        {
            HouseInformationForm h = new HouseInformationForm();

            h.Show();
            Dispose();
        }
Пример #2
0
        private void HouseInformationButton_Click(object sender, EventArgs e)
        {
            HouseInformationForm h = new HouseInformationForm();

            h.Show();
            Dispose();
        }
        private void DeleteButton_Click(object sender, EventArgs e)
        {
            String      id = SearchTextBox.Text;
            OwnerTenant s  = DB.OwnerTenants.SingleOrDefault(x => x.Mobile_No == id);

            if (s != null)
            {
                DB.OwnerTenants.DeleteOnSubmit(s);
                DB.SubmitChanges();
                HouseInformationForm sodf = new HouseInformationForm();
                sodf.Show();
                Close();
                Dispose();
            }
            else
            {
                MessageBox.Show("Data not found");
            }
        }