private void load_contact()
        {
            rpsDataContext dbcon = new rpsDataContext();
            building       b     = dbcon.buildings.SingleOrDefault(x => x.b_id == "1");

            if (b != null)
            {
                label8.Text = b.contact;
            }
        }
Example #2
0
        private void load_house_info()
        {
            rpsDataContext dbcon = new rpsDataContext();
            building       b     = dbcon.buildings.SingleOrDefault(x => x.b_id == "1");

            if (b != null)
            {
                HouseAddressTextbox.Text = b.address;
                textBox1.Text            = b.owner_name;
                textBox2.Text            = b.contact;
            }

            else
            {
                MessageBox.Show("Data not found");
            }
        }
Example #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            rpsDataContext dbcon = new rpsDataContext();


            building b = dbcon.buildings.SingleOrDefault(x => x.contact == search);

            if (b != null)
            {
                b.contact = textBox2.Text;
                dbcon.SubmitChanges();
                MessageBox.Show("Successfully upadated");

                textBox2.Text     = b.contact;
                textBox2.ReadOnly = true;
            }
        }
Example #4
0
 partial void Deletebuilding(building instance);
Example #5
0
 partial void Updatebuilding(building instance);
Example #6
0
 partial void Insertbuilding(building instance);