Ejemplo n.º 1
0
        private void GetOwner_Click(object sender, EventArgs e)
        {
            DataTable dt = contobj.GetOwnerInfo(Ownerscombobox.Text);

            OwnersData.DataSource = dt;
            OwnersData.Refresh();
        }
Ejemplo n.º 2
0
        private void AddOwner_Click(object sender, EventArgs e)
        {
            if (SSNText.Text == "" || FNText.Text == "" || LNText.Text == "" || PhoneNOText.Text == "" || AddressText.Text == "" || NoOfBuildingsText.Text == "" || IncomeText.Text == "")
            {
                MessageBox.Show("Please enter all fields.");
                return;
            }
            int success = contobj.AddOwner(Convert.ToInt32(SSNText.Text), FNText.Text, LNText.Text, Convert.ToInt32(PhoneNOText.Text), AddressText.Text, Convert.ToInt32(NoOfBuildingsText.Text), Convert.ToInt32(IncomeText.Text));

            if (success == 1)
            {
                MessageBox.Show("Added.");
            }
            else
            {
                MessageBox.Show("Owner not added.");
            }


            OwnersData.Refresh();
        }
Ejemplo n.º 3
0
 private void Refresh_Click(object sender, EventArgs e)
 {
     OwnersData.DataSource = contobj.GetAllOwnerInfo();
     OwnersData.Refresh();
 }