private void saveButton_Click(object sender, EventArgs e)
        {
            SQLQuery mSQLQuery = new SQLQuery();

            if (childName.Text.Length >= 2)
            {
                ImageOperation OP = new ImageOperation();
                Program.parentSignUpForm.ChildOfParent(childName.Text, DOBpicker.Value, Gender, OP.ImageToBinary(image));

                MessageBox.Show("Requset has been sent", "Request sent", MessageBoxButtons.OK, MessageBoxIcon.None);
                this.Hide();
            }
            else
            {
                MessageBox.Show("Please Enter atleast 2 letter", "Invaild Child Name", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
        private void viewGride()
        {
            DataTable pennding  = new DataTable();
            DataTable pennding2 = new DataTable();
            SQLQuery  MyQuery   = new SQLQuery();


            // staff pennding list veiw load
            pennding = MyQuery.getPendingStaff();
            foreach (DataRow row in pennding.Rows)
            {
                ListViewItem item = new ListViewItem(row[1].ToString());
                for (int i = 2; i <= 4; i++)
                {
                    item.SubItems.Add(row[i].ToString());
                }
                staffListView.Items.Add(item);
            }
            staffListView.View          = View.Details;
            staffListView.FullRowSelect = true;

            // parents pennding list veiw  laod
            pennding = MyQuery.getPendingParent();
            foreach (DataRow row in pennding.Rows)
            {
                ListViewItem item = new ListViewItem(row[1].ToString());

                item.SubItems.Add(row[2].ToString());
                item.SubItems.Add(row[4].ToString());
                item.SubItems.Add(row[6].ToString());

                parentsListView.Items.Add(item);
            }
            parentsListView.View          = View.Details;
            parentsListView.FullRowSelect = true;

            // Child Pending listview laod
            pennding = MyQuery.getPendingChild();

            foreach (DataRow row in pennding.Rows)
            {
                ListViewItem item = new ListViewItem(row[0].ToString());

                item.SubItems.Add(row[1].ToString());
                Int64 x = Int64.Parse(row[2].ToString());
                pennding2 = MyQuery.getParentByID(x);
                string parentName = "";
                foreach (DataRow row2 in pennding2.Rows)
                {
                    parentName = row[1].ToString();
                }
                item.SubItems.Add(parentName);
                ImageOperation OP       = new ImageOperation();
                byte[]         location = (byte[])(row[7]);
                Image          img      = OP.BinaryToImage(location);
                childImageList.Images.Add(row[0].ToString(), img);
                childImage.Image = img;
                childListView.Items.Add(item);
            }
            childListView.View          = View.Details;
            childListView.FullRowSelect = true;
        }