public IHttpActionResult Update(MusteriDTO model) { MusteriBLL musteriBusiness = new MusteriBLL(); musteriBusiness.Update(model); return(Ok()); }
public IHttpActionResult Delete(int id) { MusteriBLL musteriBusiness = new MusteriBLL(); musteriBusiness.Delete(id); return(Ok()); }
public IHttpActionResult GetById(int id) { MusteriBLL musteriBusiness = new MusteriBLL(); var model = musteriBusiness.GetById(id); return(Ok(model)); }
public IHttpActionResult GetByTcknPassword(string tckn, string password) { MusteriBLL musteriBusiness = new MusteriBLL(); var model = musteriBusiness.GetByTcknPassword(tckn, password); return(Ok(model)); }
public ActionResult MusteriOlustur(MusteriProfil musteri) { MusteriBLL musteri_BLL = new MusteriBLL(); //var resultCustomValidation = obj.Dogrula(musteri); //if(resultCustomValidation != null) //{ // foreach // ModelState.AddModelError("sfafs", "Seçmiş olduğunuz stok depoda yeterli sayıda değildir. İşlemşniz iptal edildi."); //} if (ModelState.IsValid) { try { if (musteri_BLL.KayitVarMi(musteri)) { musteri_BLL.MusteriKaydet(musteri); } else { } } catch { throw; } } return(RedirectToAction("MusteriListesi")); }
//public ActionResult MusteriSil(int id) //{ // MusteriBLL musteri_BLL = new MusteriBLL(); // if (musteri_BLL.MusteriSil(id)) // { // return RedirectToAction("MusteriListesi"); // } // else // { // return RedirectToAction("MusteriListesi"); // } //} public bool MusteriSil(int id) { MusteriBLL musteri_BLL = new MusteriBLL(); if (musteri_BLL.MusteriSil(id)) { return(false); } else { return(true); } }
public RezervasyonBilgilerim() { InitializeComponent(); _uyeBLL = new UyeBLL(); _musteriBLL = new MusteriBLL(); _odaBLL = new OdaBLL(); _rezervasyonBLL = new RezervasyonBLL(); _MusRezBLL = new MusteriRezervasyonBLL(); var skinManager = MaterialSkinManager.Instance; skinManager.AddFormToManage(this); skinManager.Theme = MaterialSkinManager.Themes.LIGHT; skinManager.ColorScheme = new ColorScheme(Primary.Green900, Primary.Green300, Primary.BlueGrey500, Accent.Yellow400, TextShade.BLACK); }
public FrmYoneticiTariheGoreRezervasyon() { InitializeComponent(); _rezervasyonBLL = new RezervasyonBLL(); _odaVeOdaCesidiBLL = new OdaVeOdaCesidiBLL(); _odaBLL = new OdaBLL(); _musteriRezervasyonBLL = new MusteriRezervasyonBLL(); _musteriBLL = new MusteriBLL(); var skinManager = MaterialSkinManager.Instance; skinManager.AddFormToManage(this); skinManager.Theme = MaterialSkinManager.Themes.LIGHT; skinManager.ColorScheme = new ColorScheme(Primary.Green900, Primary.Green300, Primary.BlueGrey500, Accent.Yellow400, TextShade.BLACK); }
public frmYoneticiPaneli() { _rezervasyonTipBLL = new RezervasyonTipBLL(); _odaBLL = new OdaBLL(); _musteriBLL = new MusteriBLL(); _uyeBLL = new UyeBLL(); _rezervasyonBLL = new RezervasyonBLL(); InitializeComponent(); MaterialSkinManager skinManager = MaterialSkinManager.Instance; skinManager.AddFormToManage(this); skinManager.Theme = MaterialSkinManager.Themes.LIGHT; skinManager.ColorScheme = new ColorScheme(Primary.BlueGrey700, Primary.BlueGrey900, Primary.Blue500, Accent.Orange700, TextShade.WHITE); }
public IHttpActionResult Login(string tckn, string password) { MusteriBLL musteriBusiness = new MusteriBLL(); var model = musteriBusiness.GetByTcknPassword(tckn, password); if (model != null) { FormsAuthentication.SetAuthCookie(model.tckn, false); return(Ok(model)); } else { return(NotFound()); } }
public frmRezervasyon(string email, string sifre) { InitializeComponent(); MaterialSkinManager skinManager = MaterialSkinManager.Instance; skinManager.AddFormToManage(this); skinManager.Theme = MaterialSkinManager.Themes.LIGHT; skinManager.ColorScheme = new ColorScheme(Primary.BlueGrey700, Primary.BlueGrey900, Primary.Blue500, Accent.Orange700, TextShade.WHITE); _uyeBLL = new UyeBLL(); _musteriRezervasyonBLL = new MusteriRezervasyonBLL(); _musteriBLL = new MusteriBLL(); _rezervasyonBLL = new RezervasyonBLL(); _odaBLL = new OdaBLL(); _email = email; _sifre = sifre; }
private void btnSil_Click(object sender, EventArgs e) { if (detay.ID == 0) { MessageBox.Show("Müşteri seçin"); } DialogResult result = MessageBox.Show("Silinsinmi", "Dikkat", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { if (bll.Delete(detay)) { MessageBox.Show("Silindi"); bll = new MusteriBLL(); dto = bll.Select(); dataGridView1.DataSource = dto.Musteriler; } } }
private void btnGuncelle_Click(object sender, EventArgs e) { if (detay.ID == 0) { MessageBox.Show("Müşteri seçiniz"); } else { FrmMusteri frm = new FrmMusteri(); frm.isUpdate = true; frm.detaydto = detay; this.Hide(); frm.ShowDialog(); this.Visible = true; bll = new MusteriBLL(); dto = bll.Select(); dataGridView1.DataSource = dto.Musteriler; } }
public frmYeniRezervasyonOnay(List <Musteri> musteriler, List <Rezervasyon> rezervasyonlar, int hesaplananOda, int uyeID) { InitializeComponent(); MaterialSkinManager skinManager = MaterialSkinManager.Instance; skinManager.AddFormToManage(this); skinManager.Theme = MaterialSkinManager.Themes.LIGHT; skinManager.ColorScheme = new ColorScheme(Primary.BlueGrey700, Primary.BlueGrey900, Primary.Blue500, Accent.Orange700, TextShade.WHITE); hesaplananOdaSayisi = hesaplananOda; _uyeID = uyeID; musteriList = musteriler; rezervasyonList = rezervasyonlar; _rezervasyonTipBLL = new RezervasyonTipBLL(); _odaBLL = new OdaBLL(); _musteriBLL = new MusteriBLL(); _rezervasyonBLL = new RezervasyonBLL(); _musteriRezervasyonBLL = new MusteriRezervasyonBLL(); }
private void btnTamamla_Click(object sender, EventArgs e) { _musteriBLL = new MusteriBLL(); _odaBLL = new OdaBLL(); List <Oda> odalar = _odaBLL.List(); List <int> BosOdalar = new List <int>(); List <int> doluodalar = new List <int>(); List <Entities.Rezervasyon> rezervasyonliste = _rezervasyonBLL.RezervasyonListesi(); for (int i = 1; i < odalar.Count + 1; i++) { foreach (Entities.Rezervasyon item in rezervasyonliste) { OdaVeOdaCesidi odaVeOdaCesidi = OVCBLL.IdileOdaVeOdaCesidiGetir(item.OdaveCesitID); if ((dateTimePickerGiris.Value >= item.GirisTarihi && dateTimePickerGiris.Value < item.CikisTarihi) && odaVeOdaCesidi.OdaID == i) { doluodalar.Add(odaVeOdaCesidi.OdaID); break; } } } for (int j = 1; j < (odalar.Count + 1); j++) { if (doluodalar.Exists(element => element == j) != true) { BosOdalar.Add(j); } } if (BosOdalar.Count == 0) { MessageBox.Show("Bu tarihlerde boş oda bulunmamaktadır."); return; } int rezCesitId = (int)cmbRezCesidi.SelectedValue; int odaCesidiId = (int)odaSecimCmb.SelectedValue; decimal RezCesitFiyati = RCBLL.GetMoneyById(rezCesitId); int ovcID = OVCBLL.OdaCesitleriniIDyeGoreGetir((int)odaSecimCmb.SelectedValue, BosOdalar[0]); decimal odaFiyati = OVCBLL.GetMoney(ovcID); Total total = new Total(); total.OdaVeCesitID = ovcID; total.RezervasyonCesidiID = rezCesitId; //total.IndirimOrani = 30; total.OdaVeCesitIDFiyat = odaFiyati; total.RezervasyonCesidiIDFiyat = RezCesitFiyati; int count = 0; if (odaCesidiId == 1) { total.IndirimOrani = 30; } else if (odaCesidiId == 2) { total.IndirimOrani = 0; } else if (odaCesidiId == 7) { total.IndirimOrani = 20; } for (DateTime date = dateTimePickerGiris.Value; date <= dateTimePickerCikis.Value; date = date.AddDays(1)) { if (date.DayOfWeek == DayOfWeek.Sunday || date.DayOfWeek == DayOfWeek.Saturday) { count++; } } total.TotalFiyat = total.OdaVeCesitIDFiyat + total.RezervasyonCesidiIDFiyat + 30 * count; _totalBLL.Add(total); int ID = _totalBLL.SonTotal().TotalID; Entities.Rezervasyon rezervasyon = new Entities.Rezervasyon(); rezervasyon.KisiSayisi = KisiSayisi; rezervasyon.GirisTarihi = dateTimePickerGiris.Value; rezervasyon.CikisTarihi = dateTimePickerCikis.Value; rezervasyon.RezervasyonCesidiID = rezCesitId; rezervasyon.OdaveCesitID = ovcID; rezervasyon.UyeID = frm_GirisEkrani.girisId; rezervasyon.TotalID = ID; foreach (Musteri item in musteriler) { _musteriBLL.Add(item); } _rezervasyonBLL = new RezervasyonBLL(); if (_rezervasyonBLL.Ekle(rezervasyon)) { MessageBox.Show("Rezervasyon Başarıyla Kaydedildi.."); } int sonmusteriID = _musteriBLL.SonMusteriID(); int sonrezervasyonID = _rezervasyonBLL.SonRezervasyonID(); for (int i = 0; i < musteriler.Count; i++) { _musteriRezervasyonBLL.Add(sonmusteriID - i, sonrezervasyonID); } musteriRezervasyon = new MusteriRezervasyon(); musteriRezervasyon.RezervasyonID = rezervasyon.RezervasyonID; musteriler.Clear(); this.Hide(); RezervasyonBilgilerim rezervasyonBilgilerim = new RezervasyonBilgilerim(); rezervasyonBilgilerim.FormClosing += RezervasyonBilgilerim_FormClosing; rezervasyonBilgilerim.Show(); }