Пример #1
0
 public int AddAdditionalServiceToSample(int sampleId, int addServiceId)
 {
     SamplesAndAdditionalService obj = new SamplesAndAdditionalService();
     obj.SampleID = sampleId;
     obj.AdditionalServiceID = addServiceId;
     obj.DateAdd = DateTime.Now;
     obj.DateUpdate = DateTime.Now;
     obj.Suser = System.Web.Security.Membership.GetUser().ToString();
     db.SamplesAndAdditionalServices.AddObject(obj);
     db.SaveChanges();
     return obj.SampleAndAdditionalServiceID;
 }
Пример #2
0
 /// <summary>
 /// Create a new SamplesAndAdditionalService object.
 /// </summary>
 /// <param name="sampleAndAdditionalServiceID">Initial value of the SampleAndAdditionalServiceID property.</param>
 public static SamplesAndAdditionalService CreateSamplesAndAdditionalService(global::System.Int32 sampleAndAdditionalServiceID)
 {
     SamplesAndAdditionalService samplesAndAdditionalService = new SamplesAndAdditionalService();
     samplesAndAdditionalService.SampleAndAdditionalServiceID = sampleAndAdditionalServiceID;
     return samplesAndAdditionalService;
 }
Пример #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the SamplesAndAdditionalServices EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSamplesAndAdditionalServices(SamplesAndAdditionalService samplesAndAdditionalService)
 {
     base.AddObject("SamplesAndAdditionalServices", samplesAndAdditionalService);
 }