Inheritance: System.Data.Objects.DataClasses.EntityObject
Exemple #1
0
        public void GuardarPatologia(int id, string diagnostico)
        {
            try
            {
                DataAccess.diagnostico diag = new DataAccess.diagnostico();
                diag.id = id;
                diag.diagnostico1 = diagnostico;

                entities.diagnosticos.AddObject(diag); //Se guarda en memoria
                entities.SaveChanges();//Se guarda en la base de datos

            }
            catch (Exception err)
            {

                throw new Exception(err.ToString() + "--Diagnostico.cs / GuardarDiagnostico()");
            }
        }
Exemple #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the diagnosticos EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTodiagnosticos(diagnostico diagnostico)
 {
     base.AddObject("diagnosticos", diagnostico);
 }
Exemple #3
0
 /// <summary>
 /// Create a new diagnostico object.
 /// </summary>
 /// <param name="diagnostico1">Initial value of the diagnostico1 property.</param>
 /// <param name="id">Initial value of the id property.</param>
 public static diagnostico Creatediagnostico(global::System.String diagnostico1, global::System.Int64 id)
 {
     diagnostico diagnostico = new diagnostico();
     diagnostico.diagnostico1 = diagnostico1;
     diagnostico.id = id;
     return diagnostico;
 }