Exemple #1
0
        private void Update_form()
        {
            SaveButton.Enabled = false;
            Clear_form();
            modify = false;
            DataFile.user_list.Clear();
            ResultList.Items.Clear();
            backnum = 0;
            ProofAttachedDropDownList.SelectedIndex = 1;
            DataFile.total_user_number = 0;
            DataFile f = new DataFile();

            f.update_data();
            foreach (UserInfo NewUser in DataFile.user_list)//add all file data to list view
            {
                string[]     new_user = { NewUser.Get_full_name(), NewUser.PhoneNumber };
                ListViewItem n_user   = new ListViewItem(new_user);
                n_user.Tag = NewUser.UserID;
                ResultList.Items.Add(n_user);
            }
        }
Exemple #2
0
        private void RebateForm_Load(object sender, EventArgs e)
        {
            backnum = 0;
            Clear_form();
            StartTimeBox.Text = "";

            ProofAttachedDropDownList.SelectedIndex = 1;
            DateReceivedPicker.Value   = DateTime.Today;
            DateReceivedPicker.MaxDate = DateTime.Today;

            DataFile.user_list.Clear();
            DataFile.total_user_number = 0;
            ResultList.Items.Clear();
            DataFile f = new DataFile();

            f.update_data();
            foreach (UserInfo NewUser in DataFile.user_list)
            {
                string[]     new_user = { NewUser.Get_full_name(), NewUser.PhoneNumber };
                ListViewItem n_user   = new ListViewItem(new_user);
                n_user.Tag = NewUser.UserID;
                ResultList.Items.Add(n_user);
            }
        }