/** * Agrega una regla al negocio. **/ public bool AgregarRegla(Regla pRegla) { try { SIFRegla _sifRegla = new SIFRegla(); _sifRegla.num_prioridad = pRegla.Posicion; _sifRegla.txt_estado = pRegla.Estado; _sifRegla.txt_nombre = pRegla.Nombre; _sifRegla.txt_script = pRegla.StoredProcedure; _objConexionBase = new Inclutec_BDEntities(); _objConexionBase.AddToSIFReglas(_sifRegla); _objConexionBase.SaveChanges(); _objConexionBase.Connection.Close(); return true; } catch (Exception) { return false; } }
/// <summary> /// Deprecated Method for adding a new object to the SIFReglas EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToSIFReglas(SIFRegla sIFRegla) { base.AddObject("SIFReglas", sIFRegla); }
/// <summary> /// Create a new SIFRegla object. /// </summary> /// <param name="id_Regla">Initial value of the id_Regla property.</param> /// <param name="txt_nombre">Initial value of the txt_nombre property.</param> /// <param name="num_prioridad">Initial value of the num_prioridad property.</param> /// <param name="txt_estado">Initial value of the txt_estado property.</param> public static SIFRegla CreateSIFRegla(global::System.Int32 id_Regla, global::System.String txt_nombre, global::System.Int32 num_prioridad, global::System.String txt_estado) { SIFRegla sIFRegla = new SIFRegla(); sIFRegla.id_Regla = id_Regla; sIFRegla.txt_nombre = txt_nombre; sIFRegla.num_prioridad = num_prioridad; sIFRegla.txt_estado = txt_estado; return sIFRegla; }