private void BtnRefesh_Click(object sender, RoutedEventArgs e)
        {
            StaffName.Clear();
            StaffAddress.Clear();
            PhoneName.Clear();
            BirthDate.Text = "";
            comboPosition.SelectedIndex = -1;
            combosex.SelectedIndex      = -1;
            BitmapImage image = new BitmapImage();

            image.BeginInit();
            image.UriSource = new Uri("pack://application:,,/Images/Image.png");
            image.EndInit();
            imgStaff.Source = image;
            imgStaff.Tag    = null;
        }
Example #2
0
 public void FormControls(string CLR)
 {
     if (CLR == "CLR")
     {
         StaffID.Clear();
         StaffName.Clear();
         StaffType.Text = "Select";
         StaffAddress.Clear();
         StaffCity.Clear();
         StaffContact.Clear();
         StaffID.Enabled      = false;
         StaffName.Enabled    = false;
         StaffType.Enabled    = false;
         StaffAddress.Enabled = false;
         StaffCity.Enabled    = false;
         StaffContact.Enabled = false;
         btnsave.Enabled      = false;
         btnedit.Enabled      = false;
         btndelete.Enabled    = false;
         btnadd.Enabled       = true;
         btnfind.Enabled      = true;
         Left1.Enabled        = false;
         Right1.Enabled       = false;
     }
     if (CLR == "Save")
     {
         btnsave.Enabled      = true;
         btnadd.Enabled       = false;
         btnfind.Enabled      = false;
         btndelete.Enabled    = false;
         btnedit.Enabled      = false;
         StaffName.Enabled    = true;
         StaffType.Enabled    = true;
         StaffAddress.Enabled = true;
         StaffCity.Enabled    = true;
         StaffContact.Enabled = true;
         StaffName.Focus();
     }
 }