public bool Read() { try { Dalc.PROVINCIA c = CommonBC.Modelo.PROVINCIA.First(cl => cl.ID == Id); Id = int.Parse(c.ID.ToString()); NombreProvincia = c.NOMBRE_PROVINCIA; return(true); } catch (Exception ex) { return(false); } }
public bool Read() { try { Dalc.COMUNA c = CommonBC.Modelo.COMUNA.First(cl => cl.ID == Id); Id = int.Parse(c.ID.ToString()); NombreComuna = c.NOMBRE_COMUNA; IdProvincia = (int)c.ID_PROVINCIA; Dalc.PROVINCIA cd = CommonBC.Modelo.PROVINCIA.First(x => x.ID == IdProvincia); provincia.Id = (int)cd.ID; provincia.NombreProvincia = cd.NOMBRE_PROVINCIA; return(true); } catch (Exception ex) { return(false); } }