private void Remove_Click(object sender, EventArgs e)
        {
            Account_BO account_BO = new Account_BO();
            ArrayList  list       = new ArrayList(account_BO.readAccount());

            try
            {
                int temp = index1;

                int i;
                int k = 1;;
                for (i = index1; list[i].ToString() != "*****"; i++)
                {
                    k++;
                }
                list.RemoveRange(temp, k);

                account_BO.createAccount(list);
                MessageBox.Show("Account remove successfull...");

                this.Hide();
                Home_Admin home_Admin = new Home_Admin();
                home_Admin.Show();
            }
            catch
            {
                MessageBox.Show("Wrong!!!");
            }
        }
Ejemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            this.Hide();
            Home_Admin home_Admin = new Home_Admin();

            home_Admin.Show();
        }
Ejemplo n.º 3
0
        private void logIn_Click(object sender, EventArgs e)
        {
            Account_BO account_BO = new Account_BO();

            if (userName.Text == "" || password.Text == "")
            {
                MessageBox.Show("Wrong!!! Enter the information fully");
            }
            else
            {
                if (account_BO.security_Checker(userName.Text, password.Text))
                {
                    this.Hide();
                    Home_Admin home_Admin = new Home_Admin();
                    home_Admin.Show();
                }
                else
                {
                    MessageBox.Show("Wrong UserName or Password");
                    userName.Clear();
                    password.Clear();
                }
            }
        }
 private void home_pnl_Click(object sender, EventArgs e)
 {
     Home_Admin hm = new Home_Admin();
     this.Hide();
     hm.Show();
 }
        private void Pay_btn_Click(object sender, EventArgs e)
        {
            Account_BO account_BO = new Account_BO();
            ArrayList list = new ArrayList(account_BO.readAccount());
            ArrayList userBill = new ArrayList(account_BO.getUserBill());

            try
            {
                int temp = index1;

                int i;
                int k = 1; ;
                for (i = index1; list[i].ToString() != "*****"; i++)
                {
                    k++;
                }

                int m = 0;

                while (userBill[m].ToString() != list[index1].ToString())
                {
                    m++;
                }

                int n;
                int o = 1;
                for (n = m; userBill[n].ToString() != "*"; n++)
                {
                    o++;
                }

                userBill.RemoveRange(m, o);
                list.RemoveRange(temp, k);
                account_BO.createAccount(list);
                account_BO.decreaseTotalUser();
                account_BO.setUserBill(userBill);

                MessageBox.Show("Account remove successfull...");

                this.Hide();
                Home_Admin home_Admin = new Home_Admin();
                home_Admin.Show();
            }
            catch
            {
                MessageBox.Show("Wrong!!!");
            }
        }
Ejemplo n.º 6
0
        private void logIn_Click(object sender, EventArgs e)
        {
            Account_BO account_BO = new Account_BO();
            if (userName.Text == "" || password.Text == "")
            {
                MessageBox.Show("Wrong!!! Enter the information fully");
            }
            else
            {
                if (account_BO.security_Checker(userName.Text, password.Text))
                {

                    Home_Admin home_Admin = new Home_Admin();
                    home_Admin.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Wrong UserName or Password");
                    userName.Clear();
                    password.Clear();
                }
            }
        }
        private void Create_Click_1(object sender, EventArgs e)
        {
            Account_BO account_Bo = new Account_BO();
            Account_ENTITY account_Entity = new Account_ENTITY();
            ArrayList bill = new ArrayList(account_Bo.getUserBill());
            ArrayList listAccount = new ArrayList(account_Bo.readAccount());
            try
            {
                if (userName.Text != "" &&entryDate_dtp.Text != null && ocupation_TextBox.Text != null && userID.Text != "" && genderCombo.Text != null && address.Text != "" && phoneNo.Text != "" && landline.Text != null && emailID.Text != null && this.dateOfBirth.Text != null && regFee != null && imagePath != null)
                {
                    if (Convert.ToDouble(regFee.Text) == 120)
                    {

                        int flag = 0;
                        for (int i = 0; i < listAccount.Count; i++)
                        {

                            if (listAccount[i].ToString() == userID.Text)
                            {
                                MessageBox.Show("Wrong!!! This User ID is already in used");
                                flag = 1;
                                break;
                            }
                        }
                        account_Entity.identity = "*****";
                        account_Entity.userID = userID.Text;
                        account_Entity.userName = userName.Text;
                        account_Entity.address = address.Text;
                        account_Entity.gender = genderCombo.Text;
                        account_Entity.dateOfBirth = dateOfBirth.Text;
                        account_Entity.occupation = ocupation_TextBox.Text;
                        account_Entity.regFee = Convert.ToInt32(regFee.Text);
                        account_Entity.phoneNo = phoneNo.Text;
                        account_Entity.landlineNo = landline.Text;
                        account_Entity.emailID = emailID.Text;
                        account_Entity.imagePath = imagePath;
                        account_Entity.entryDate = entryDate_dtp.Text;

                        if (flag == 0)
                        {

                            listAccount.Add(account_Entity.userID);
                            listAccount.Add(account_Entity.userName);
                            listAccount.Add(account_Entity.address);
                            listAccount.Add(account_Entity.gender);
                            listAccount.Add(account_Entity.dateOfBirth);
                            listAccount.Add(account_Entity.occupation);
                            listAccount.Add(account_Entity.regFee);
                            listAccount.Add(account_Entity.phoneNo);
                            listAccount.Add(account_Entity.landlineNo);
                            listAccount.Add(account_Entity.emailID);
                            listAccount.Add(account_Entity.entryDate);
                            listAccount.Add(imagePath);
                            listAccount.Add(account_Entity.identity);

                            account_Bo.createAccount(listAccount);

                            account_Bo.increaseTotalUser();

                            bill.Add(account_Entity.userID);
                            bill.Add(account_Entity.entryDate);
                            bill.Add(account_Entity.regFee);
                            bill.Add("0");
                            bill.Add("*");
                            account_Bo.setUserBill(bill);

                            try
                            {
                                Account_BO account_BO = new Account_BO();
                                ArrayList cost = new ArrayList();
                                ArrayList temp = new ArrayList();
                                cost = account_BO.getOwnerincome();
                                int f = 0;
                                for (int i = 0; i < cost.Count; i++)
                                {
                                    temp.Add(cost[i].ToString());

                                    if (cost[i].ToString() == entryDate_dtp.Text)
                                    {

                                        temp.Add("Bill");
                                        temp.Add(regFee.Text);
                                        for (int m = i + 1; m < cost.Count; m++)
                                        {
                                            temp.Add(cost[m].ToString());
                                        }
                                        account_BO.setOwerIncome(temp);
                                        f = 1;
                                    }

                                }
                                if (f == 0)
                                {

                                    cost.Add(entryDate_dtp.Text);
                                    cost.Add("Bill");
                                    cost.Add(regFee.Text);
                                    cost.Add("*");
                                    account_BO.setOwerIncome(cost);

                                }
                            }
                            catch
                            {

                            }

                            MessageBox.Show("The Account create successful");
                            account_Bo.setID_Generator();
                            Home_Admin ha = new Home_Admin();
                            this.Hide();
                            ha.Show();

                        }

                    }
                    else
                    {
                        MessageBox.Show("Wrong!! You have to must deposit at least 120TK");
                        regFee.Clear();
                    }
                }
                else
                    MessageBox.Show("Wrong!!! Enter the information fully");

            }
            catch (Exception e1)
            {

                MessageBox.Show(e1.Message);
            }
        }
 private void button2_Click(object sender, EventArgs e)
 {
     this.Hide();
     Home_Admin home_Admin = new Home_Admin();
     home_Admin.Show();
 }
 private void homeCrossPanel_Click(object sender, EventArgs e)
 {
     this.Hide();
     Home_Admin home_Admin = new Home_Admin();
     home_Admin.Show();
 }
Ejemplo n.º 10
0
        private void Create_Click(object sender, EventArgs e)
        {
            Account_BO     account_Bo     = new Account_BO();
            Account_ENTITY account_Entity = new Account_ENTITY();

            ArrayList listAccount = new ArrayList(account_Bo.readAccount());

            try
            {
                if (userName.Text != "" && userID.Text != "" && address.Text != "" && phoneNo.Text != "" && this.dateTimePicker1.Text != null && regFee != null && imagePath != null)
                {
                    if (Convert.ToDouble(regFee.Text) == 120)
                    {
                        int flag = 0;
                        for (int i = 0; i < listAccount.Count; i++)
                        {
                            if (listAccount[i].ToString() == userID.Text)
                            {
                                MessageBox.Show("Wrong!!! This User ID is already in used");
                                flag = 1;
                                break;
                            }
                        }
                        account_Entity.identity = "*****";
                        account_Entity.userID   = userID.Text;
                        account_Entity.userName = userName.Text;
                        account_Entity.address  = address.Text;
                        account_Entity.phoneNo  = phoneNo.Text;
                        account_Entity.regFee   = Convert.ToInt32(regFee.Text);
                        account_Entity.date     = this.dateTimePicker1.Text;


                        if (flag == 0)
                        {
                            listAccount.Add(account_Entity.userID);
                            listAccount.Add(account_Entity.userName);
                            listAccount.Add(account_Entity.address);
                            listAccount.Add(account_Entity.phoneNo);
                            listAccount.Add(account_Entity.regFee);
                            listAccount.Add(account_Entity.date);
                            listAccount.Add(imagePath);
                            listAccount.Add(account_Entity.identity);



                            account_Bo.createAccount(listAccount);
                            MessageBox.Show("The Account create successful");
                            this.Hide();
                            Home_Admin home_admin = new Home_Admin();
                            home_admin.Show();
                        }

                        userID.Clear();
                        userName.Clear();
                        address.Clear();
                        phoneNo.Clear();
                        regFee.ResetText();
                    }
                    else
                    {
                        MessageBox.Show("Wrong!! You have to must deposit at least 120TK");
                    }
                }
                else
                {
                    MessageBox.Show("Wrong!!! Enter the information fully");
                }
            }
            catch (Exception)
            {
                MessageBox.Show("Error!!! Please Retry");
            }
        }