public Comuna(string xml) { Comuna c = Util.Deserializar <Comuna>(xml); Id = c.Id; NombreComuna = c.NombreComuna; IdProvincia = c.IdProvincia; provincia = c.provincia; }
public string ObtenerComuna() { Comuna c = new Comuna(); try { c.Id = int.Parse(IdComuna.ToString()); c.Read(); } catch (Exception) { throw; } return(c.NombreComuna); }
private List <Comuna> getTodasComunas(List <Dalc.COMUNA> list) { List <Comuna> l = new List <Comuna>(); //string xmlComuna = string.Empty; foreach (Dalc.COMUNA i in list) { Comuna c = new Comuna(/*xmlComuna*/); c.Id = int.Parse(i.ID.ToString()); c.NombreComuna = i.NOMBRE_COMUNA; c.IdProvincia = int.Parse(i.ID_PROVINCIA.ToString()); c.provincia = null; l.Add(c); } return(l); }