Esempio n. 1
0
        protected void btnguncelle_OnClick(object sender, EventArgs e)
        {
            int id        = Business.Business.GetCustomerIdByUserId(Convert.ToInt32(Session["id"]));
            int id2       = Business.Business.GetAdressIdByCustomers(txttc.Text);
            var business1 = new Business.Business();

            try
            {
                if (txttel.Text.Length >= 1 && txtad.Text.Length >= 1 && txtaddress.Text.Length >= 1 &&
                    txtsehir.Text.Length >= 1 && txtilce.Text.Length >= 1 && txtsoyad.Text.Length >= 1 &&
                    txtemail.Text.Length >= 1)
                {
                    business1.UpdateAdresses(id2, txtaddress.Text, txtsehir.Text, txtilce.Text);
                    business1.UpdateMusteriler(id, txttel.Text, txtad.Text, txtsoyad.Text, txtemail.Text);
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect",
                                                        "alert('Güncelleme işlemi başarılı. Bilgilerim sayfasına yönlendiriliyorsunuz.'); window.location='" +
                                                        Request.ApplicationPath + "User/Bilgilerim.aspx';", true);
                }
                else
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Lütfen boş alan bırakmayın.')", true);
                }
            }
            catch (Exception)
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Bir hata oluştu.')", true);
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            InitConfiguration();

            IBusiness business = new Business.Business(configuration);
            //business.AddUser(new Userprofile() { FirstName = "John", LastName = "Boldizar", Email = "*****@*****.**", Telephone = "11111", DateRegistered = DateTime.Now, UserCredentail = new UserCredentail() { Username = "******", Password = "******" } });

            var user = business.ValidateUser("satya", "satya@123");
        }
 public IEnumerable <AlbumBEDTO> GetAlbums()
 {
     try
     {
         IEnumerable <AlbumBE> albumBEs = new Business.Business(cRUDTestDBContextProvider).GetAlbumBEs();
         return(mapper.Map <IEnumerable <AlbumBE>, IEnumerable <AlbumBEDTO> >(albumBEs));
     }
     catch
     {
         return(new List <AlbumBEDTO>());
     }
 }
        protected void btnekle_OnClick(object sender, EventArgs e)
        {
            var    business1   = new Business.Business();
            string notdetay    = txtnot.Text;
            string alarmtarihi = txtalarm.Text;
            string tur         = drptur.Text;

            if (txtalarm.Text.Length >= 1 && drptur.Text.Length >= 1 && txtnot.Text.Length >= 1)
            {
                business1.AddNote(notdetay, tur, alarmtarihi);
                ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect",
                                                    "alert('Not ekleme başarılı, Notlar sayfasına yönlendiriliyorsunuz.'); window.location='" +
                                                    Request.ApplicationPath + "Dashboard/Notlar.aspx';", true);
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Lütfen tüm alanları doldurun')", true);
            }
        }
Esempio n. 5
0
        protected void btnekle_OnClick(object sender, EventArgs e)
        {
            int depid = 1;

            if (drpdepartman.Text == "Ofis")
            {
                depid = 1;
            }
            else if (drpdepartman.Text == "Saha")
            {
                depid = 2;
            }
            else if (drpdepartman.Text == "Muhasebe")
            {
                depid = 3;
            }

            var    business1 = new Business.Business();
            string ad        = txtad.Text;
            string soyad     = txtsoyad.Text;
            string tcno      = txtPersoneltc.Text;
            string mail      = txtemail.Text;
            string maas      = txtmaas.Text;
            string telefon   = txttel.Text;

            if (txtad.Text.Length >= 1 && txtsoyad.Text.Length >= 1 && txttel.Text.Length >= 1 &&
                txtPersoneltc.Text.Length >= 1 && txtmaas.Text.Length >= 1 && txtemail.Text.Length >= 1 &&
                drpdepartman.Text.Length >= 1)
            {
                business1.AddEmployee(ad, soyad, depid, tcno, mail, maas, telefon);
                ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect",
                                                    "alert('Kayıt başarılı, Personeller sayfasına yönlendiriliyorsunuz.'); window.location='" +
                                                    Request.ApplicationPath + "Dashboard/Personeller.aspx';", true);
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Lütfen tüm alanları doldurun')", true);
            }
        }
Esempio n. 6
0
        protected void btnekle_OnClick(object sender, EventArgs e)
        {
            var    business1 = new Business.Business();
            int    id        = Convert.ToInt32(Session["id"]);
            string adresim   = drpadres.Text;
            string tarih     = txttarih.Text;
            string saat      = txtsaat.Text;
            string detay     = txtdetay.Text;
            string tur       = drpisturu.Text;

            if (drpadres.Text.Length >= 1 && drpisturu.Text.Length >= 1 && txtdetay.Text.Length >= 1 &&
                txtsaat.Text.Length >= 1 && txttarih.Text.Length >= 1)
            {
                business1.AddAppointment(id, adresim, tarih, saat, detay, tur);
                ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect",
                                                    "alert('Randevu ekleme başarılı, Giderler sayfasına yönlendiriliyorsunuz.'); window.location='" +
                                                    Request.ApplicationPath + "User/Randevularim.aspx';", true);
            }

            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Lütfen tüm alanları doldurun')", true);
            }
        }
        protected void btnyolla_OnClick(object sender, EventArgs e)
        {
            var    business1 = new Business.Business();
            string sifre     = Business.Business.GetUserPasswordByUserId(Convert.ToInt32(Session["id"]));

            if (txtsifre.Text != sifre || txtsifre.Text == null || txtsifre.Text == "")
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Hatalı Giriş')", true);
            }
            else
            {
                if (txtyeni.Text != txtyeni2.Text || txtyeni.Text == "" || txtyeni2.Text == "")
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Hatalı Giriş')", true);
                }
                else
                {
                    business1.UpdateCustomers(Convert.ToInt32(Session["id"]), txtyeni.Text);
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect",
                                                        "alert('Şifre değiştirme işlemi başarılı, Giriş sayfasına yönlendiriliyorsunuz.'); window.location='" +
                                                        Request.ApplicationPath + "Dashboard/Giris.aspx';", true);
                }
            }
        }
        protected void btnekle_OnClick(object sender, EventArgs e)
        {
            var    business1   = new Business.Business();
            string tip         = txtisturu.Text;
            string baslangic   = txtbaslangic.Text;
            string bitis       = txtbitis.Text;
            string fiyat       = txtfiyat.Text;
            string odemeyontem = txtplan.Text;
            int    musteriid   = Business.Business.GetCustomerId(txtmusteritc.Text);
            int    personelid  = Business.Business.GetEmployeeId(txtpersoneltc.Text);
            int    adresid     = Business.Business.GetAdressId(drpadres.Text);

            if (txtbaslangic.Text.Length >= 1 && txtbitis.Text.Length >= 1 && txtfiyat.Text.Length >= 1 && txtisturu.Text.Length >= 1 && txtplan.Text.Length >= 1 && drpadres.Text.Length >= 1 && txtmusteritc.Text.Length >= 1 && txtpersoneltc.Text.Length >= 1)
            {
                business1.AddWork(tip, baslangic, bitis, personelid, musteriid, adresid, fiyat, odemeyontem);
                ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect",
                                                    "alert('Kayıt ekleme başarılı, İşler sayfasına yönlendiriliyorsunuz.'); window.location='" +
                                                    Request.ApplicationPath + "Dashboard/Isler.aspx';", true);
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Lütfen tüm alanları doldurun')", true);
            }
        }