public void ServisGuncelle(SPA_Therapy therapy)
 {
     therapy.ID = Guid.Parse(serviceID);
     therapy.TherapyName = txtServisAdi.Text;
     therapy.ServisTime = Convert.ToInt32(nmuPersonelSayisi.Value);
     therapy.Price = txtServisFiyat.Text == null ? 0 : Convert.ToDecimal(txtServisFiyat.Text);
     therapy.IsTax = chkKDV.IsChecked ?? chkKDV.IsChecked == false;
     therapy.IsActive = chkAktif.IsChecked ?? chkAktif.IsChecked == false;
     context.SubmitChanges();
 }
Example #2
0
        public void ServisEkle()
        {
            decimal price = 0;
            SPA_Therapy servis = new SPA_Therapy();
            servis.ID = Guid.NewGuid();
            servis.TherapyName = txtServisAdi.Text;
            servis.ServisTime = Convert.ToInt32(nmuPersonelSayisi.Value);
            servis.IsActive = chkAktif.IsChecked;
            if (txtServisFiyat.EditValue != null)
            {
                servis.Price = decimal.Parse(txtServisFiyat.EditValue.ToString());
            }

            servis.IsTax = chkKDV.IsChecked;
            _atozContext.SPA_Therapies.Add(servis);
            _atozContext.SubmitChanges().Completed += new EventHandler(ServiceDef_Completed);
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the SPA_Therapy EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSPA_Therapy(SPA_Therapy sPA_Therapy)
 {
     base.AddObject("SPA_Therapy", sPA_Therapy);
 }
 /// <summary>
 /// Create a new SPA_Therapy object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 /// <param name="therapyName">Initial value of the TherapyName property.</param>
 public static SPA_Therapy CreateSPA_Therapy(global::System.Guid id, global::System.String therapyName)
 {
     SPA_Therapy sPA_Therapy = new SPA_Therapy();
     sPA_Therapy.ID = id;
     sPA_Therapy.TherapyName = therapyName;
     return sPA_Therapy;
 }