private void EditBtn_Click(object sender, RoutedEventArgs e)
        {
            if (CoName.Text == "")
            {
                l1.Foreground = new SolidColorBrush(Colors.Red);
            }
            else
            {
                l1.Foreground = new SolidColorBrush(Colors.Black);
            }
            if (NationalId.Text == "")
            {
                l2.Foreground = new SolidColorBrush(Colors.Red);
            }
            else
            {
                l2.Foreground = new SolidColorBrush(Colors.Black);
            }
            if (RegNumTxt.Text == "")
            {
                l3.Foreground = new SolidColorBrush(Colors.Red);
            }
            else
            {
                l3.Foreground = new SolidColorBrush(Colors.Black);
            }
            if (CompanyType.SelectedIndex == -1)
            {
                l4.Foreground = new SolidColorBrush(Colors.Red);
            }
            else
            {
                l4.Foreground = new SolidColorBrush(Colors.Black);
            }
            if (AddressTxt.Text == "")
            {
                l5.Foreground = new SolidColorBrush(Colors.Red);
            }
            else
            {
                l5.Foreground = new SolidColorBrush(Colors.Black);
            }
            if (EmailTxt.Text == "")
            {
                l6.Foreground = new SolidColorBrush(Colors.Red);
            }
            else
            {
                l6.Foreground = new SolidColorBrush(Colors.Black);
            }
            if (FaxTxt.Text == "")
            {
                l7.Foreground = new SolidColorBrush(Colors.Red);
            }
            else
            {
                l7.Foreground = new SolidColorBrush(Colors.Black);
            }
            if (CoPhoneTxt.Text == "")
            {
                l8.Foreground = new SolidColorBrush(Colors.Red);
            }
            else
            {
                l8.Foreground = new SolidColorBrush(Colors.Black);
            }
            if (FNameTxt.Text == "")
            {
                l9.Foreground = new SolidColorBrush(Colors.Red);
            }
            else
            {
                l9.Foreground = new SolidColorBrush(Colors.Black);
            }
            if (LNamrTxt.Text == "")
            {
                l10.Foreground = new SolidColorBrush(Colors.Red);
            }
            else
            {
                l10.Foreground = new SolidColorBrush(Colors.Black);
            }
            if (ContTick.IsChecked == false && ConsTick.IsChecked == false)
            {
                l11.Foreground = new SolidColorBrush(Colors.Red);
            }
            else
            {
                l11.Foreground = new SolidColorBrush(Colors.Black);
            }
            if (TypeTick1.IsChecked == false && TypeTick2.IsChecked == false && TypeTick3.IsChecked == false && TypeTick4.IsChecked == false)
            {
                l12.Foreground = new SolidColorBrush(Colors.Red);
            }
            else
            {
                l12.Foreground = new SolidColorBrush(Colors.Black);
            }
            if (AddressTxt.Text == "" || NationalId.Text == "" || FaxTxt.Text == "" || EmailTxt.Text == "" || CoName.Text == "" || CompanyType.SelectedIndex == -1 || CoPhoneTxt.Text == "" || FNameTxt.Text == "" || LNamrTxt.Text == "" || RegNumTxt.Text == "" || (ContTick.IsChecked == false && ConsTick.IsChecked == false) || TypeTick1.IsChecked == false && TypeTick2.IsChecked == false && TypeTick3.IsChecked == false)
            {
                ErrorHandler.NotifyUser("برخی اطلاعات ضروری وارد نشده اند");
                return;
            }

            int?x = null;
            int?y = null;

            try
            {
                x = Int32.Parse(Base1.Text);
            }
            catch (System.Exception ex)
            {
            }
            try
            {
                y = Int32.Parse(Base2.Text);
            }
            catch (System.Exception ex)
            {
            }
            DataManagement.EditContractor(CurrentCont.ContractorId, CoName.Text, CommercialName.Text, CompanyType.Text, StateTxt.Text, CityTxt.Text, AddressTxt.Text, PostCodetxt.Text, null, CoPhoneTxt.Text, FaxTxt.Text, FNameTxt.Text, LNamrTxt.Text, "social number", EmailTxt.Text, PhoneTxt.Text, CellTxt.Text, (bool)ContTick.IsChecked, (bool)ConsTick.IsChecked, (bool)TypeTick1.IsChecked, (bool)TypeTick2.IsChecked, (bool)TypeTick3.IsChecked, Reshte1.Text, Reshte2.Text, x, y, false, true, null, false, null, false, null,
                                          false, null, false, null, null, RegNumTxt.Text, NationalId.Text, (bool)TypeTick1.IsChecked, (bool)TypeTick2.IsChecked, (bool)TypeTick3.IsChecked, (bool)TypeTick4.IsChecked, false, TaxTxt.Text);
            ErrorHandler.NotifyUser("ویرایش انجام شد لطفا به صفحه قبل برگردید");
        }