public void comboTown()
        {
            townImpl = new TownImpl();
            DataTable town = townImpl.Select(sValue);

            comboMuni.ItemsSource       = town.DefaultView;
            comboMuni.DisplayMemberPath = "name";
            comboMuni.SelectedValuePath = "id".ToString();
            comboMuni.SelectedIndex     = 0;
        }
        public void comboTown()
        {
            townImpl = new TownImpl();
            DataTable town = townImpl.Select(idprovince.ToString());

            comboMuni.ItemsSource       = town.DefaultView;
            comboMuni.DisplayMemberPath = "NAME";
            comboMuni.SelectedValuePath = "ID".ToString();
            comboMuni.SelectedIndex     = 0;
        }
        public void getIdTown()
        {
            try
            {
                townImpl = new TownImpl();
                town     = townImpl.GetID(sValue, sValuep, sValueT);

                idTown = byte.Parse(town.Id.ToString());
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        public void llamarmuni(int id)
        {
            townImpl = new TownImpl();
            DataTable town = townImpl.SelectList(id);

            comboMuniMod.ItemsSource       = town.DefaultView;
            comboMuniMod.DisplayMemberPath = "name";
            int count = 0;

            foreach (DataRow row in town.Rows)
            {
                int ids = int.Parse(row["id"].ToString());
                if (idmodi == ids)
                {
                    comboMuniMod.SelectedIndex = count;
                    idTown  = byte.Parse(idmodi.ToString());
                    sValueT = row["name"].ToString();
                }
                idprovince = int.Parse(row["province"].ToString());
                count++;
            }
            llamarprovince(idprovince);
        }