Esempio n. 1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Samples EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSamples(Sample sample)
 {
     base.AddObject("Samples", sample);
 }
Esempio n. 2
0
        public int AddSampleNewForDiagnosisPaid(Sample obj)
        {
            obj.DateAdd = DateTime.Now;
            obj.DateUpdate = DateTime.Now;
            obj.Suser = System.Web.Security.Membership.GetUser().ToString();

            // Получаем организм по умолчанию
            obj.OrganismTypeID = 1;
            // Получаем центр и проект
            //  obj.CenterProjectID = 2;
            // получаем код платного образца
            obj.SamplePaymentTypeID = 2;
            // Получаем код RemoveReason
            obj.RemoveReasonID = 1;
            // Получаем SampleNumber
            var some = db.Samples.Max(o => o.SampleID);
            int sampleNumber = int.Parse(some.ToString());
            sampleNumber++;
            obj.SampleID = sampleNumber;
            obj.SampleNumber = sampleNumber;
            db.Samples.AddObject(obj);
            db.SaveChanges();
            return sampleNumber;
        }
Esempio n. 3
0
 /// <summary>
 /// Create a new Sample object.
 /// </summary>
 /// <param name="sampleID">Initial value of the SampleID property.</param>
 /// <param name="patientID">Initial value of the PatientID property.</param>
 /// <param name="clinicMaterialID">Initial value of the ClinicMaterialID property.</param>
 /// <param name="doctorID">Initial value of the DoctorID property.</param>
 /// <param name="clinicID">Initial value of the ClinicID property.</param>
 /// <param name="datetimeCapture">Initial value of the DatetimeCapture property.</param>
 /// <param name="datetimeDelivery">Initial value of the DatetimeDelivery property.</param>
 public static Sample CreateSample(global::System.Int32 sampleID, global::System.Int32 patientID, global::System.Int32 clinicMaterialID, global::System.Int32 doctorID, global::System.Int32 clinicID, global::System.DateTime datetimeCapture, global::System.DateTime datetimeDelivery)
 {
     Sample sample = new Sample();
     sample.SampleID = sampleID;
     sample.PatientID = patientID;
     sample.ClinicMaterialID = clinicMaterialID;
     sample.DoctorID = doctorID;
     sample.ClinicID = clinicID;
     sample.DatetimeCapture = datetimeCapture;
     sample.DatetimeDelivery = datetimeDelivery;
     return sample;
 }