private void view1_btn_Click(object sender, EventArgs e)
        {
            Account_BO account_BO = new Account_BO();
            ArrayList cost = new ArrayList();
            cost = account_BO.getOwnerincome();
            int f = 0;
            Home_Admin_Owner_Income_Details he = new Home_Admin_Owner_Income_Details();
            for (int i = 0; i < cost.Count; i++)
            {

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

                    he.giveIndex(i);
                    this.Hide();
                    he.Show();
                    f = 1;
                    break;

                }
            }
            if (f == 0)
                MessageBox.Show("This date is not exist");
        }
        private void view2_btn_Click(object sender, EventArgs e)
        {
            Account_BO account_BO = new Account_BO();
             if (year1 != null && month != null)
            {
                ArrayList cost = new ArrayList();
                cost = account_BO.getOwnerincome();

                int[] index = new int[200];
                int[] index2 = new int[200];
                int j = 0;
                int i1;
                for (i1 = 0; i1 < cost.Count; i1++)
                {

                    if (cost[i1].ToString() == "*")
                    {
                        index[j] = i1 + 1;
                        j++;
                    }
                }
                index[j - 1] = 0;
                int month_value = 0;
                int year_value = 0;
                try
                {
                    year_value = Convert.ToInt32(year1.Text);
                }
                catch
                {

                }
                if (month.Text == "January")
                {
                    month_value = 1;
                }

                else if (month.Text == "February")
                {
                    month_value = 2;
                }
                else if (month.Text == "March")
                {
                    month_value = 3;
                }
                else if (month.Text == "April")
                {
                    month_value = 4;
                }
                else if (month.Text == "May")
                {
                    month_value = 5;
                }
                else if (month.Text == "June")
                {
                    month_value = 6;
                }
                else if (month.Text == "July")
                {
                    month_value = 7;
                }
                else if (month.Text == "August")
                {
                    month_value = 8;
                }
                else if (month.Text == "September")
                {
                    month_value = 9;
                }
                else if (month.Text == "October")
                {
                    month_value = 10;
                }
                else if (month.Text == "November")
                {
                    month_value = 11;
                }
                else if (month.Text == "December")
                {
                    month_value = 12;
                }
                int d1 = 0, d2 = 0;
                DateTime dt = DateTime.Parse(cost[0].ToString());
                int m = dt.Month;
                int y = dt.Year;
                int k = 0;
                if (month_value == m && year_value == y)
                {
                    index2[0] = 1;
                    k = 1;
                    d1 = 1;
                }

                for (int i = 0; index[i] != 0; i++)
                {
                    DateTime dt1 = DateTime.Parse(cost[index[i]].ToString());
                    int m1 = dt1.Month;
                    int y1 = dt1.Year;
                    if (month_value == m1 && year_value == y1)
                    {
                        index2[k] = index[i];
                        k++;
                        d2 = 1;
                    }
                }
                if (d1 != 1 && d2 != 1)
                {
                    MessageBox.Show("This month or year is not exist");
                }
                else
                {
                    Home_Admin_Owner_Income_Details he = new Home_Admin_Owner_Income_Details();
                    he.giveIndex1(index2);
                    this.Hide();
                    he.Show();
                }

            }
            else
            {
                MessageBox.Show("Enter the information fully");
                month.ResetText();
                year1.ResetText();
            }
        }
        private void veiwdetils_btn2_Click(object sender, EventArgs e)
        {
            Account_BO account_BO = new Account_BO();
            if (year2 != null)
            {
                ArrayList cost = new ArrayList();
                cost = account_BO.getOwnerincome();

                int[] index = new int[200];
                int[] index2 = new int[200];
                int j = 0;
                int i1;
                for (i1 = 0; i1 < cost.Count; i1++)
                {

                    if (cost[i1].ToString() == "*")
                    {
                        index[j] = i1 + 1;
                        j++;
                    }
                }
                index[j - 1] = 0;
                int year_value = 0;

                try
                {
                    year_value = Convert.ToInt32(year2.Text);
                }
                catch
                {

                }
                int d1 = 0, d2 = 0;
                DateTime dt = DateTime.Parse(cost[0].ToString());
                int y = dt.Year;
                int k = 0;
                if (year_value == y)
                {
                    index2[0] = 1;
                    k = 1;
                    d1 = 1;
                }

                for (int i = 0; index[i] != 0; i++)
                {
                    DateTime dt1 = DateTime.Parse(cost[index[i]].ToString());
                    int y1 = dt1.Year;
                    if (year_value == y1)
                    {
                        index2[k] = index[i];
                        k++;
                        d2 = 1;
                    }
                }
                if (d1 != 1 && d2 != 1)
                {
                    MessageBox.Show("This month or year is not exist");
                }
                else
                {

                    Home_Admin_Owner_Income_Details he = new Home_Admin_Owner_Income_Details();
                    he.giveIndex1(index2);
                    this.Hide();
                    he.Show();
                }

            }
            else
            {
                MessageBox.Show("Enter the information fully");
                year2.ResetText();
            }
        }