private void btncustsignin_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
            LoginCustomer customerloginpage = new LoginCustomer();

            customerloginpage.Show();
        }
        private void btnsubmit_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Customer CustomerAdd = new Customer();
                CustomerAdd.UserName     = txtusername.Text;
                CustomerAdd.Password     = txtpassword.Password;
                CustomerAdd.Address      = txtaddress.Text;
                CustomerAdd.Name         = txtname.Text;
                CustomerAdd.MobileNumber = mobilenum.Text;
                CustomerAdd.Email        = txtemail.Text;

                CustomerBL Customervalidate = new CustomerBL();
                bool       addresult        = Customervalidate.AddCustomerBL(CustomerAdd);
                if (addresult == true)
                {
                    this.Close();
                    LoginCustomer login = new LoginCustomer();
                    login.Show();
                }
            }
            catch (RecipeIngredientSystemExceptions ex)     //
            {                                               //
                System.Windows.MessageBox.Show(ex.Message); //
            }//
        }
        //back button
        private void backbtn_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
            LoginCustomer objlogin = new LoginCustomer();

            //redirect to customer login page
            objlogin.Show();
        }
        private void changepassbtn_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Customer Changepass = new Customer();
                if (!String.IsNullOrEmpty(txtusername.Text))
                {
                    Changepass.UserName = txtusername.Text;
                }
                if (!String.IsNullOrEmpty(txtmobilenum.Text))
                {
                    Changepass.MobileNumber = txtmobilenum.Text;
                }
                if (!String.IsNullOrEmpty(txtpassword.Password))
                {
                    Changepass.Password = txtpassword.Password;
                }
                if (!String.IsNullOrEmpty(txtconfirmpaassword.Password))
                {
                    Changepass.NewPassword = txtconfirmpaassword.Password;
                }

                if ((!String.IsNullOrEmpty(txtpassword.Password)) || (!String.IsNullOrEmpty(txtconfirmpaassword.Password)))
                {
                    if (Changepass.Password.Equals(Changepass.NewPassword))
                    {
                        CustomerBL Passvalidate = new CustomerBL();
                        bool       addresult    = Passvalidate.CustomerChangePaasBL(Changepass);
                        if (addresult == true)
                        {
                            this.Close();
                            LoginCustomer login = new LoginCustomer();
                            login.Show();
                        }
                    }
                    else
                    {
                        MessageBox.Show(" Password Does Not Match !");
                    }
                }
            }
            catch (RecipeIngredientSystemExceptions ex)//
            {
                System.Windows.MessageBox.Show(ex.Message);
            }
        }