/// <summary>
 /// Registrar Finca
 /// </summary>
 /// <param name="finca"></param>
 /// <param name="asociado"></param>
 /// <param name="direccion"></param>
 public int RegistrarFinca(SIGEEA_Finca finca, SIGEEA_Asociado asociado)
 {
     DataClasses1DataContext dc = new DataClasses1DataContext();
     finca.FK_Id_Asociado = asociado.PK_Id_Asociado;
     finca.FecRegistro_Finca = DateTime.Now;
     finca.FK_Id_Direccion = null;
     dc.SIGEEA_Fincas.InsertOnSubmit(finca);
     dc.SubmitChanges();
     return finca.PK_Id_Finca;
 }
        /// <summary>
        /// Modificar Finca
        /// </summary>
        /// <param name="finca"></param>
        /// <param name="asociado"></param>
        /// <param name="direccion"></param>
        public void ModificarFinca(SIGEEA_Finca finca)
        {
            DataClasses1DataContext dc = new DataClasses1DataContext();
            SIGEEA_Finca editarFinca = dc.SIGEEA_Fincas.First(c => c.PK_Id_Finca == finca.PK_Id_Finca);
            editarFinca.PriNomDuenno_Finca = finca.PriNomDuenno_Finca;
            editarFinca.SegNomDuenno_Finca = finca.SegNomDuenno_Finca;
            editarFinca.PriApeDuenno_Finca = finca.PriApeDuenno_Finca;
            editarFinca.SegApeDuenno_Finca = finca.SegApeDuenno_Finca;
            editarFinca.Codigo_Finca = finca.Codigo_Finca;
            editarFinca.Alquilada_Finca = finca.Alquilada_Finca;
            editarFinca.FK_Id_Direccion = finca.FK_Id_Direccion;
            editarFinca.FK_Id_Asociado = finca.FK_Id_Asociado;
            dc.SubmitChanges();

        }
		private void detach_SIGEEA_Fincas(SIGEEA_Finca entity)
		{
			this.SendPropertyChanging();
			entity.SIGEEA_Asociado = null;
		}
 partial void DeleteSIGEEA_Finca(SIGEEA_Finca instance);
 partial void UpdateSIGEEA_Finca(SIGEEA_Finca instance);
 partial void InsertSIGEEA_Finca(SIGEEA_Finca instance);