Title: wizard code with dataset                                 If you need copy same format use firefox or chrome or safari but iexplorer not work


Preview of Code
load
 private void frmuser_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the `db_citizin_securityDataSet.tbusers` table. You can move, or remove it, as needed.
            this.tbusersTableAdapter.Fill(this.db_citizin_securityDataSet.tbusers);
            this.Width = 752;
            this.Height = 694;
            this.BackColor = Color.Maroon;
        }
____________________________________________________________________________________________
عرض
 private void xP_Button3_Click(object sender, EventArgs e)
        {
            this.tbusersTableAdapter.Fill(this.db_citizin_securityDataSet.tbusers);
 
        }
_____________________________________________________________________________________________        
عودة
  private void xP_Button1_Click(object sender, EventArgs e)
        {
            this.db_citizin_securityDataSet.Clear();
            this.Close();
        }
_____________________________________________________________________________________________
حفظ
   private void savedata()
        {
            this.Validate();
            this.tbusersBindingSource.EndEdit();
            this.tbusersTableAdapter.Update(this.db_citizin_securityDataSet.tbusers);
        }
 
        private void xP_Button4_Click(object sender, EventArgs e)
        {
           try
           {
            savedata();
             }
        catch (Exception ex)
           {
            MessageBox.Show(ex.Message);
        }
        }
_____________________________________________________________________________________________
اضافة جديدة
 private void xP_Button2_Click(object sender, EventArgs e)
        {
            this.comboBox1.Items.Clear();
            this.db_citizin_securityDataSet.Clear();
            this.tbusersBindingSource.AddNew();
            this.comboBox1.Items.Add("مستخدم");
            this.comboBox1.Items.Add("مشرف");
        }
_____________________________________________________________________________________________
حذف
 private void xP_Button5_Click(object sender, EventArgs e)
        {
 
            try
            {
                DialogResult a = MessageBox.Show("هل تريد حذف السجل", "", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                if (a == DialogResult.Yes)
                {
                    if (this.tbusersBindingSource.Count > 0)
                    {
                        this.tbusersBindingSource.RemoveAt(this.tbusersBindingSource.Position);
                        savedata();
                        this.db_citizin_securityDataSet.Clear();
                        this.tbusersTableAdapter.Fill(this.db_citizin_securityDataSet.tbusers);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
          }
_____________________________________________________________________________________________
الاول
        private void xP_Button9_Click(object sender, EventArgs e)
        {
            this.tbusersBindingSource.Position = 0;
        }
_____________________________________________________________________________________________
التالي    
    private void xP_Button8_Click(object sender, EventArgs e)
        {
            this.tbusersBindingSource.Position++;
        }
_____________________________________________________________________________________________
السابق      
      private void xP_Button7_Click(object sender, EventArgs e)
        {
            this.tbusersBindingSource.Position--;
 
        }
_____________________________________________________________________________________________
الاخير
        private void xP_Button6_Click(object sender, EventArgs e)
        {
            this.tbusersBindingSource.Position = this.tbusersBindingSource.Count - 1;
        }
_____________________________________________________________________________________________
clear مسح   
   private void xP_Button10_Click(object sender, EventArgs e)
        {
            this.db_citizin_securityDataSet.Clear();
        }
_____________________________________________________________________________________________
count = 1 of 5
        int count, index;
        private void tbusersBindingSource_CurrentItemChanged(object sender, EventArgs e)
        {
            count = tbusersBindingSource.Count;
            index = tbusersBindingSource.Position + 1;
            n1.Text = index.ToString();
            n2.Text = count.ToString();
        }
_____________________________________________________________________________________________
بحث
 private void xP_Button4_Click(object sender, EventArgs e)
        {
 
            inspectorTableAdapter.FillByinspec(this.db_citizin_securityDataSet.inspector, textBox1.Text + "%");
        }
_______________________________________________________________________________________________