Exemple #1
0
        private void btnAddFlat_Click(object sender, EventArgs e)
        {
            FlatManager f = new FlatManager();
            f.BuildingID = BuildingID;
            f.FlatNo = txtFlatNo.Text;
            f.Price = Convert.ToInt64(txtPrice.Text);
            f.DownPayment = 0;
            f.AmountPayed = 0;
            f.IsSelled = false;

            bool res = f.AddFlat(f);
            if (res)
            {
                MessageBox.Show("Record Inserted Successfully");
                bindFlatGrid();
                switchpnl(false);
            }
            else
            {
                MessageBox.Show("Error");
            }
        }