Beispiel #1
0
 /// <summary>
 /// Create a new Patient object.
 /// </summary>
 /// <param name="patientID">Initial value of the PatientID property.</param>
 public static Patient CreatePatient(global::System.Int32 patientID)
 {
     Patient patient = new Patient();
     patient.PatientID = patientID;
     return patient;
 }
Beispiel #2
0
 public int AddPatientNewForDiagnosis(Patient obj)
 {
     var some = db.Patients.Max(o => o.PatientID);
     int patientNumber = int.Parse(some.ToString());
     patientNumber++;
     obj.PrintedResults = 0;
     obj.PatientID = patientNumber;
     obj.DateAdd = DateTime.Now;
     obj.DateUpdate = DateTime.Now;
     obj.CardReadyDate = DateTime.Now;
     obj.Suser = System.Web.Security.Membership.GetUser().ToString();
     string tempSex = "";
     switch (obj.Sex)
     {
         case "1":
             tempSex = "Неизвестно";
             break;
         case "2":
             tempSex = "Мужской";
             break;
         case "3":
             tempSex = "Женский";
             break;
         default:
             tempSex = "Неизвестно";
             break;
     }
     obj.Sex = tempSex;
     db.Patients.AddObject(obj);
     db.SaveChanges();
     return obj.PatientID;
 }
Beispiel #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Patients EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToPatients(Patient patient)
 {
     base.AddObject("Patients", patient);
 }