private void DeleteCus_Click(object sender, EventArgs e)
        {
            try {
                //after fetching the details delete the particular record from the database
                int Id = Convert.ToInt32(CustomerID.Text.ToString());
                DatabaseModule.Customer obj_Cust = new DatabaseModule.Customer(1, txtfName.Text.ToString(), txtLName.Text.ToString(), txtAddress.Text.ToString(), txtMobile.Text.ToString());
                if (obj_Cust.srchCutomerData(Id) == 0)
                {
                    //obj_Cust.delCustomer(Id);
                    MessageBox.Show("Selected Customer is Deleted from the Database ");
                }
                else
                {
                    MessageBox.Show("Customer already have movie on booking ");
                }


                //after saving all the details all the component make empty
                txtfName.Text   = "";
                txtLName.Text   = "";
                txtAddress.Text = "";
                txtMobile.Text  = "";

                CustomerID.Text = "";
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message.ToString());
            }
        }
 private void ShowCustomer_Click(object sender, EventArgs e)
 {
     DatabaseModule.Customer obj = new DatabaseModule.Customer(1, "txtfName.Text.ToString(", " txtLName.Text.ToString()", "txtAddress.Text.ToString()", " txtMobile.Text.ToString()");
     obj.Datarecord(Database);
     customer = 1;
     rent     = 0;
     movie    = 0;
 }
 private void AddCus_Click(object sender, EventArgs e)
 {
     //check the compoenent of the cusotmer portal to save the details of the customer
     if (txtfName.Text.ToString().Equals("") || txtLName.Text.ToString().Equals("") || txtAddress.Text.ToString().Equals("") || txtMobile.Text.ToString().Equals(""))
     {
         MessageBox.Show("Enter all the details first to store the details of the customer ");
     }
     else
     {
         //if all the details are accurate then create the instance object of the customer class and pass the details to the customer class
         DatabaseModule.Customer obj_Cust = new DatabaseModule.Customer(1, txtfName.Text.ToString(), txtLName.Text.ToString(), txtAddress.Text.ToString(), txtMobile.Text.ToString());
         obj_Cust.addCustomer();
         MessageBox.Show("Customer Record is saved in the Database");
         //after saving all the details all the component make empty
         txtfName.Text   = "";
         txtLName.Text   = "";
         txtAddress.Text = "";
         txtMobile.Text  = "";
     }
 }
 private void btnMostCustomer_Click(object sender, EventArgs e)
 {
     DatabaseModule.Customer obj_Cust = new DatabaseModule.Customer(1, " txtfName.Text.ToString()", "txtLName.Text.ToString()", " txtAddress.Text.ToString()", " txtMobile.Text.ToString()");
     MessageBox.Show("the Best Customer is " + obj_Cust.mostCustomer());
 }