Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated || User.IsInRole("servis"))
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris");
            }

            using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
            {
                MusteriIslemleri m       = new MusteriIslemleri(dc);
                string           custidd = Request.QueryString["custid"];

                if (!IsPostBack)
                {
                    //string man = bayi(kullanici);
                    //string man2 = bayi2(kul);
                    var    poslar   = dc.kart_tanims.Where(x => x.kart_id != -1).ToList();
                    var    bankalar = dc.bankas.ToList();
                    string tip      = Request.QueryString["custid"];
                    if (tip.Equals("-2"))
                    {
                        drdMasrafTip.Enabled = true;
                        var tipler = dc.masraf_tips.Where(x => x.tip_id > 0).OrderBy(x => x.tip_id).ToList();

                        drdMasrafTip.AppendDataBoundItems = true;
                        drdMasrafTip.DataSource           = tipler;
                        drdMasrafTip.DataValueField       = "tip_id";
                        drdMasrafTip.DataTextField        = "tip_adi";
                    }
                    else
                    {
                        drdMasrafTip.Enabled = false;
                        var tipler = dc.masraf_tips.OrderBy(x => x.tip_id).ToList();

                        drdMasrafTip.AppendDataBoundItems = true;
                        drdMasrafTip.DataSource           = tipler;
                        drdMasrafTip.DataValueField       = "tip_id";
                        drdMasrafTip.DataTextField        = "tip_adi";
                    }

                    drdPos.AppendDataBoundItems = true;
                    drdPos.DataSource           = poslar;
                    drdPos.DataValueField       = "kart_id";
                    drdPos.DataTextField        = "kart_adi";

                    drdBanka.AppendDataBoundItems = true;
                    drdBanka.DataSource           = bankalar;
                    drdBanka.DataValueField       = "banka_id";
                    drdBanka.DataTextField        = "banka_adi";


                    if (Session["alacak"] != null)
                    {
                        txtTutar.Text     = Session["alacak"].ToString();
                        Session["alacak"] = null;
                    }
                    DataBind();
                }
            }
        }
Esempio n. 2
0
        private void goster(radiusEntities dc)
        {
            //ServisIslemleri s = new ServisIslemleri(KullaniciIslem.firma());
            //sadece servise göre bulmak için
            Hareket s       = new Hareket(dc);
            string  cust_id = Request.QueryString["custid"];
            int     gun     = 30;
            string  gunS    = Request.QueryString["gun"];

            if (!String.IsNullOrEmpty(gunS))
            {
                gun = Int32.Parse(gunS);
            }
            //sadece müşteriye göre bulmak için
            if (!String.IsNullOrEmpty(cust_id))
            {
                btnMusteriDetayim.Visible = true;
                int custid = Int32.Parse(cust_id);
                GridView2.DataSource = s.CariDetayREski(custid, gun);

                MusteriIslemleri m = new MusteriIslemleri(dc);
                baslik.InnerHtml = m.musteriTekAdR(custid) + " MÜŞTERİ EXTRESİ";
            }
            GridView2.DataBind();
        }
Esempio n. 3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            using (radiusEntities dc = MyContext.Context(firma))
            {
                MusteriIslemleri m = new MusteriIslemleri(dc);
                int    id          = Int32.Parse(lblID.Value.Trim());
                string ad          = txtDuzenAd.Text;

                string adres = txtDuzenAdres.Text;
                string tel   = txtDuzenTelefon.Text;
                string tc    = txtDuzenTc.Text;

                string tanim = txtKimDuzen.Text;
                string unvan = txtDuzenUnvan.Text;

                m.musteriGuncelleR(id, ad, unvan, adres, tel, tc, tanim, "", "", chcDuzenMust.Checked, chcDuzenTedarikci.Checked, false, chcDuzenDisServis.Checked, null);
                toplu(m);
            }

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(@"<script type='text/javascript'>");

            sb.Append(" alertify.success('Kayıt Güncellendi!');");
            sb.Append("$('#editModal').modal('hide');");
            sb.Append(@"</script>");
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "EditHideModalScript", sb.ToString(), false);
        }
 private void txtMüsteriİd_KeyUp(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter)
         {
             int mid = Convert.ToInt32(txtmid.Text);
             if (mid % 2 == 1)
             {
                 onlineMusteri o = (onlineMusteri)MusteriIslemleri.MusteriGetir(mid);
                 lblMid_düzen.Text   = o.mid.ToString();
                 txtEmail_düzen.Text = o.email;
                 txtisim_düzen.Text  = o.musteri.isim;
                 txtTel_düzen.Text   = "Online Müşteri";
             }
             else
             {
                 magazaMusteri o = (magazaMusteri)MusteriIslemleri.MusteriGetir(mid);
                 lblMid_düzen.Text   = o.mid.ToString();
                 txtEmail_düzen.Text = "Mağaza Müşterisi";
                 txtisim_düzen.Text  = o.musteri.isim;
                 txtTel_düzen.Text   = o.telNo.ToString();
             }
         }
     }
     catch (Exception e)
     {
         throw;
     }
 }
Esempio n. 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated || (!User.IsInRole("Admin") && !User.IsInRole("mudur")))
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris");
            }
            string firma = KullaniciIslem.firma();

            using (radiusEntities dc = MyContext.Context(firma))
            {
                if (!IsPostBack)
                {
                    AyarCurrent ay = new AyarCurrent(dc);
                    if (ay.lisansKontrol() == false)
                    {
                        Response.Redirect("/LisansError");
                    }
                    CihazAraa(dc);

                    string s = txtAra.Value;

                    if (!String.IsNullOrEmpty(s) && !String.IsNullOrWhiteSpace(s))
                    {
                        MusteriIslemleri m = new MusteriIslemleri(dc);

                        GridView1.DataSource = m.musteriAraR2(s, "tedarikci");
                        GridView1.DataBind();
                    }
                }

                // detaylara bakalım
                DetayGoster();
            }
        }
Esempio n. 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris.aspx");
            }

            barkod.Focus();
            this.Master.servisarama = true;
            this.Master.kisiarama   = true;

            using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
            {
                if (!IsPostBack)
                {
                    AyarCurrent ay = new AyarCurrent(dc);
                    if (ay.lisansKontrol() == false)
                    {
                        Response.Redirect("/LisansError");
                    }


                    MusteriIslemleri m  = new MusteriIslemleri(dc);
                    pos_banka_look   pb = m.posbankalar();

                    drdPos.AppendDataBoundItems = true;
                    drdPos.DataSource           = pb.poslar;
                    drdPos.DataValueField       = "pos_id";
                    drdPos.DataTextField        = "pos_adi";
                }
                CihazAraa(dc);
                // detaylara bakalım
                DetayGoster();
            }
        }
Esempio n. 7
0
        protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            //int index = Convert.ToInt32(e.CommandArgument);
            if (e.CommandName.Equals("detail"))
            {
                int code = Convert.ToInt32(e.CommandArgument);
                // int code = Convert.ToInt32(GridView1.DataKeys[index].Value.ToString());
                using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
                {
                    MusteriIslemleri m = new MusteriIslemleri(dc);

                    DetailsView1.DataSource = m.musteriTekListeR(code);
                    DetailsView1.DataBind();
                }

                System.Text.StringBuilder sb = new System.Text.StringBuilder();
                sb.Append(@"<script type='text/javascript'>");
                sb.Append("$('#detailModal').modal('show');");
                sb.Append(@"</script>");
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "DetailModalScript", sb.ToString(), false);
            }
            else if (e.CommandName.Equals("cari"))
            {
                int code = Convert.ToInt32(e.CommandArgument);
                hdnCariCustID.Value = code.ToString();
                System.Text.StringBuilder sb = new System.Text.StringBuilder();
                sb.Append(@"<script type='text/javascript'>");
                sb.Append("$('#cariModal').modal('show');");
                sb.Append(@"</script>");
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "CariModalScript", sb.ToString(), false);
            }
        }
        public IActionResult Index()
        {
            var musteriId = HttpContext.Session.GetInt32("musteriid");

            if (musteriId == null)
            {
                return(RedirectToAction("index", "giris"));
            }

            var musteriIslemleri = new MusteriIslemleri(musteriId.Value);
            var musteriModel     = musteriIslemleri.Sorgula();
            var musteriBakiye    = musteriIslemleri.BakiyeHesapla();

            ViewBag.Bakiye = musteriBakiye;
            Dictionary <Hesap, Decimal> hesapBakiye = new Dictionary <Hesap, Decimal>();
            var hesapList = HesapIslemleri.Sorgula_musteriId(musteriId.Value);

            foreach (var item in hesapList)
            {
                var islem = new HesapIslemleri(item.Id);

                hesapBakiye.Add(item, islem.BakiyeHesapla());
            }

            ViewBag.HesapListesi = hesapBakiye;

            return(View(musteriModel));
        }
Esempio n. 9
0
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string s     = txtAra.Value;
            string firma = KullaniciIslem.firma();

            using (radiusEntities dc = MyContext.Context(firma))
            {
                MusteriIslemleri m = new MusteriIslemleri(dc);
                if (!String.IsNullOrEmpty(s) && !String.IsNullOrWhiteSpace(s))
                {
                    MusteriArama(dc, s);
                }
            }


            txtAciklama.Text = GridView1.SelectedValue.ToString();
            List <DetayRepo> detaylar = new List <DetayRepo>();

            if (Session["alimdetay"] != null)
            {
                int musteri_id = Convert.ToInt32(GridView1.SelectedValue);

                detaylar = (List <DetayRepo>)Session["alimdetay"];
                List <DetayRepo> musteriSorgusu = detaylar.Where(x => x.cust_id != musteri_id).ToList();
                if (musteriSorgusu.Count > 0)
                {
                    //hepsini değiştirelim
                    foreach (DetayRepo rep in detaylar)
                    {
                        rep.cust_id = musteri_id;
                    }
                    Session["alimdetay"] = detaylar;
                }
            }
        }
Esempio n. 10
0
        protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                s += "row data bound-";
                string antenid = Convert.ToString(DataBinder.Eval(e.Row.DataItem, "antenid"));

                using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
                {
                    MusteriIslemleri m            = new MusteriIslemleri(dc);
                    List <anten>     antenler     = m.antenler();
                    DropDownList     ddlCountries = (e.Row.FindControl("ddlAnten") as DropDownList);
                    ddlCountries.AppendDataBoundItems = true;
                    ddlCountries.DataSource           = antenler;
                    ddlCountries.DataTextField        = "anten_adi";
                    ddlCountries.DataValueField       = "anten_id";
                    ddlCountries.DataBind();
                    //string antenadi = (e.Row.FindControl("lblCountry") as Label).Text;

                    if (!String.IsNullOrEmpty(antenid))
                    {
                        ddlCountries.Items.FindByValue(antenid).Selected = true;
                    }
                }
            }
        }
Esempio n. 11
0
        private void Goster(radiusEntities dc)
        {
            s += "goster-";
            string terim   = txtAra.Value;
            string antenid = Request.QueryString["antenid"];

            MusteriIslemleri m = new MusteriIslemleri(dc);

            if (!String.IsNullOrEmpty(antenid))
            {
                musteri_tel_mail musteri_bilgileri = m.antenMusterileri(Convert.ToInt32(antenid));
                GridView1.DataSource = musteri_bilgileri.musteriler;
                baslik.InnerHtml     = musteri_bilgileri.anten_adi + " Kayıtlı Müşteriler";
                hdnTeller.Value      = musteri_bilgileri.teller;
            }
            else if (String.IsNullOrEmpty(terim))
            {
                musteri_tel_mail musteri_bilgileri = m.musteriListesiR();
                GridView1.DataSource = musteri_bilgileri.musteriler;
                baslik.InnerHtml     = " Kayıtlı Müşteriler";
                hdnTeller.Value      = musteri_bilgileri.teller;
            }
            else
            {
                musteri_tel_mail musteri_bilgileri = m.musteriAraR(terim);
                GridView1.DataSource = musteri_bilgileri.musteriler;
                baslik.InnerHtml     = " Kayıtlı Müşteriler";
                hdnTeller.Value      = musteri_bilgileri.teller;
            }

            GridView1.DataBind();
        }
Esempio n. 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris.aspx");
            }
            string custidd = Request.QueryString["custid"];

            if (!IsPostBack)
            {
                if (!String.IsNullOrEmpty(custidd))
                {
                    int    custid   = Int32.Parse(custidd);
                    string aciklama = txtAciklama.Text;

                    using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
                    {
                        AyarCurrent ay = new AyarCurrent(dc);
                        if (ay.lisansKontrol() == false)
                        {
                            Response.Redirect("/LisansError");
                        }
                        MusteriIslemleri m    = new MusteriIslemleri(dc);
                        Radius.customer  must = m.musteriTekR(custid);
                        musteri.InnerHtml        = must.Ad;
                        musteriEkBilgi.InnerHtml = must.telefon;
                    }

                    tarih.InnerHtml = DateTime.Now.ToString("D");
                }
            }
        }
Esempio n. 13
0
        private void MailYolla(string tip, string gonderen, string mesaj)
        {
            //toplu mail apisi kullanıldığı zaman eklenecek
            using (radiusEntities dc = MyContext.Context(firma))
            {
                MailIslemleri m = new MailIslemleri(dc);

                if (tip == "gnltp")
                {
                    //genel Mail

                    if (Session["mailler"] != null)
                    {
                        string s = Session["mailler"].ToString();
                        if (!String.IsNullOrEmpty(s))
                        {
                            m.MailToplu("genel", gonderen, mesaj, s, "");
                        }
                    }
                    else
                    {
                        MusteriIslemleri musteri = new MusteriIslemleri(dc);

                        m.MailToplu("genel", gonderen, mesaj, musteri.mailListesiR(), "");
                        //Response.Redirect("/Deneme.aspx");
                    }
                }
            }
        }
Esempio n. 14
0
        protected void btnAntenKaydet_Click(object sender, EventArgs e)
        {
            int?   antenid   = null;
            string eskianten = hdnEskiAnten.Value;

            if (!string.IsNullOrEmpty(eskianten))
            {
                int eskiid = Convert.ToInt32(eskianten);
                if (drdAntenler.SelectedValue != "-1")
                {
                    antenid = Convert.ToInt32(drdAntenler.SelectedValue);
                }
                using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
                {
                    MusteriIslemleri m = new MusteriIslemleri(dc);
                    m.antenTasi(eskiid, antenid);
                    Response.Redirect("/TeknikHarita/MusteriAnten?antenid=" + antenid.ToString());
                    //Goster(dc);
                }
            }
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(@"<script type='text/javascript'>");
            sb.Append("$('#onayModal').modal('hide');");
            sb.Append(" alertify.success('Taşıma tamamlandı!');");
            sb.Append(@"</script>");
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "OnayShowModalScript", sb.ToString(), false);
        }
Esempio n. 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris.aspx");
            }

            using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
            {
                if (!IsPostBack)
                {
                    AyarCurrent ay = new AyarCurrent(dc);
                    if (ay.lisansKontrol() == false)
                    {
                        Response.Redirect("/LisansError");
                    }
                    AyarIslemleri servis = new AyarIslemleri(dc);
                    List <Radius.service_tips> tipler = servis.tipListesiR();
                    if (tipler != null)
                    {
                        drdTip.AppendDataBoundItems = true;
                        drdTip.DataSource           = tipler;
                        drdTip.DataValueField       = "tip_id";
                        drdTip.DataTextField        = "tip_ad";
                        drdTip.DataBind();
                    }



                    txtKimlikNo.Value = AletEdavat.KimlikUret(10);
                }
                if (User.IsInRole("Admin") || User.IsInRole("mudur"))
                {
                    kullaniciSecim.Visible = true;
                    if (!IsPostBack)
                    {
                        drdKullanici.AppendDataBoundItems = true;

                        drdKullanici.DataSource     = KullaniciIslem.firmaKullanicilari();
                        drdKullanici.DataValueField = "id";
                        drdKullanici.DataTextField  = "userName";
                        drdKullanici.DataBind();
                    }
                }

                string s = txtAra.Value;

                if (!String.IsNullOrEmpty(s))
                {
                    MusteriIslemleri m = new MusteriIslemleri(dc);

                    GridView1.DataSource = m.musteriAraR2(s, "musteri");

                    GridView1.SelectedIndex = 0;
                    GridView1.DataBind();
                }
            }
        }
Esempio n. 16
0
 protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     GridView1.PageIndex = e.NewPageIndex;
     using (radiusEntities dc = MyContext.Context(firma))
     {
         MusteriIslemleri m = new MusteriIslemleri(dc);
         toplu(m);
     }
 }
Esempio n. 17
0
        private void musteriGoster(radiusEntities dc)
        {
            string           s = txtMusteriSorgu.Value;
            MusteriIslemleri m = new MusteriIslemleri(dc);

            if (!String.IsNullOrEmpty(s))
            {
                grdMusteri.DataSource = m.musteriAraR2(s, "musteri");
                grdMusteri.DataBind();
            }
        }
Esempio n. 18
0
        private void goster(radiusEntities dc)
        {
            string           s     = txtAra.Value;
            string           firma = KullaniciIslem.firma();
            MusteriIslemleri m     = new MusteriIslemleri(dc);

            if (!String.IsNullOrEmpty(s) && !String.IsNullOrWhiteSpace(s))
            {
                GridView1.DataSource = m.musteriAraCari(s);
                GridView1.DataBind();
            }
        }
Esempio n. 19
0
 public IActionResult Giris(String kullaniciadi, String sifre)
 {
     try
     {
         var musteriId = MusteriIslemleri.girisYap(kullaniciadi, sifre);
         HttpContext.Session.SetInt32("musteriid", musteriId);
         return(RedirectToAction("Index", "MusteriBilgileri"));
     }
     catch (Exception ex)
     {
         return(RedirectToAction("GirisHata"));
     }
 }
Esempio n. 20
0
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string s = txtAra.Value;

            using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
            {
                MusteriIslemleri m = new MusteriIslemleri(dc);
                if (!String.IsNullOrEmpty(s))
                {
                    MusteriArama(s, dc);
                }
            }
        }
        private void btnOnayla_Click(object sender, EventArgs e)
        {
            try
            {
                int    mid     = Convert.ToInt32(txtMüsteriİd.Text);
                int    telefon = Convert.ToInt32(txtTelefon.Text);
                string isim    = Convert.ToString(txtİsim.Text);
                string email   = Convert.ToString(txtEmail.Text);
                try
                {
                    if (MusteriIslemleri.MusteriKontrol(mid))
                    {
                        lblBilgi.Text = "Bu ID değerinde Müşteri var.";
                        return;
                    }

                    musteri m = new musteri();
                    m.isim = txtisim.Text;
                    m.mid  = mid;
                    MusteriIslemleri.MusteriEkle(m);

                    if (mid % 2 == 1)
                    {
                        onlineMusteri o = new onlineMusteri();
                        o.email = txtEmail.Text;
                        o.mid   = mid;
                        o.szt   = DateTime.Now;
                        MusteriIslemleri.MusteriEkle(o);
                    }
                    else
                    {
                        magazaMusteri ma = new magazaMusteri();
                        ma.telNo = Convert.ToDecimal(txtTel);
                        ma.mid   = mid;
                        MusteriIslemleri.MusteriEkle(ma);
                    }

                    lblBilgi.Text = "Kayıt işlemi başarıyla gerçekleştirildi.";
                }
                catch (Exception)
                {
                    lblBilgi.Text = "Kayıt işlemi gerçekleştirilemedi.";
                    throw;
                }
            }
            catch (Exception)
            {
                MessageBox.Show("Hata !! Alanları Doğru Bir Şekilde Doldurunuz..");
            }
        }
Esempio n. 22
0
        public void MusteriAra(object sender, EventArgs e)
        {
            string s = txtAra.Value;


            if (!String.IsNullOrEmpty(s) && !String.IsNullOrWhiteSpace(s))
            {
                using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
                {
                    MusteriIslemleri m = new MusteriIslemleri(dc);
                    GridView1.DataSource = m.musteriAraCari(s); //m.musteriAraR2(s, kullanici.UserName);
                    GridView1.DataBind();
                }
            }
        }
Esempio n. 23
0
        public void MusteriAra(object sender, EventArgs e)
        {
            baslik.InnerHtml = "Kişi ve Firmalar";
            string s = txtAra.Value;

            using (radiusEntities dc = MyContext.Context(firma))
            {
                MusteriIslemleri m = new MusteriIslemleri(dc);
                baslik.InnerHtml = "Kişi ve Firmalar";
                musteri_tel_mail musteri_bilgileri = m.musteriAraR(s);
                hdnTeller.Value      = musteri_bilgileri.teller;
                GridView1.DataSource = musteri_bilgileri.musteriler;
                GridView1.DataBind();
            }
        }
Esempio n. 24
0
        //Handles Add button click in add modal popup
        protected void btnAddRecord_Click(object sender, EventArgs e)
        {
            //string id = lblMusID.Text;
            string ad    = txtAdi.Text;
            string soyad = txtSoyAdi.Text;
            string adres = txtAdress.Text;
            string email = txtEmail.Text;
            string tel   = txtTell.Text;
            string tc    = txtTcAdd.Text;

            if (String.IsNullOrEmpty(tc))
            {
                tc = Araclar.KimlikUret(11);
            }


            string kim        = txtKim.Text;
            string prim_kar   = txtPrimKar.Text;
            string prim_yekun = txtPrimYekun.Text;
            string unvan      = txtDuzenUnvan.Text;

            if (string.IsNullOrEmpty(unvan))
            {
                unvan = ad + " " + soyad;
            }

            using (radiusEntities dc = MyContext.Context(KullaniciIslem.firma()))
            {
                MusteriIslemleri m = new MusteriIslemleri(dc);
                m.musteriEkleR(ad, soyad, unvan, adres, tel, tel, email, kim, tc, prim_kar, prim_yekun, chcMusteri.Checked, chcTedarikci.Checked, chcUsta.Checked, chcDizServis.Checked, null);
                MusteriArama(ad, dc);
                GridView1.DataBind();
                GridView1.SelectedIndex = -1;
            }



            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            sb.Append(@"<script type='text/javascript'>");
            sb.Append("document.getElementById('ContentPlaceHolder1_txtAra').value = document.getElementById('ContentPlaceHolder1_txtAdi').value;");
            //sb.Append("alert('Record Added Successfully');");
            sb.Append(" alertify.success('Kayıt Eklendi!');");
            sb.Append("$('#addModal').modal('hide');");
            sb.Append(@"</script>");
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "AddHideModalScript", sb.ToString(), false);
        }
Esempio n. 25
0
        //Handles Add button click in add modal popup
        protected void btnAddRecord_Click(object sender, EventArgs e)
        {
            //string id = lblMusID.Text;
            string ad    = txtAdi.Text;
            string soyad = txtSoyAdi.Text;
            string adres = txtAdress.Text;
            string email = txtEmail.Text;
            string tel   = txtTell.Text;
            string tc    = txtTcAdd.Text;

            if (String.IsNullOrEmpty(tc))
            {
                tc = Araclar.KimlikUret(11);
            }

            string unvan = txtUnvan.Text;

            if (string.IsNullOrEmpty(unvan))
            {
                unvan = ad + " " + soyad;
            }

            string kim        = txtKim.Text;
            string prim_kar   = txtPrimKar.Text.Trim();
            string prim_yekun = txtPrimYekun.Text.Trim();
            int?   antenid    = null;

            if (drdAnten.SelectedValue != "-1")
            {
                antenid = Convert.ToInt32(drdAnten.SelectedValue);
            }
            using (radiusEntities dc = MyContext.Context(firma))
            {
                MusteriIslemleri m = new MusteriIslemleri(dc);
                m.musteriEkleR(ad, soyad, unvan, adres, tel, tel, email, kim, tc, prim_kar, prim_yekun, chcMusteri.Checked, chcTedarikci.Checked, chcUsta.Checked, chcDizServis.Checked, antenid);
                toplu(m);
            }


            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(@"<script type='text/javascript'>");
            //sb.Append("alert('Record Added Successfully');");
            sb.Append(" alertify.success('Kayıt Eklendi!');");
            sb.Append("$('#addModal').modal('hide');");
            sb.Append(@"</script>");
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "AddHideModalScript", sb.ToString(), false);
        }
Esempio n. 26
0
 protected void btnTemizle_Click(object sender, EventArgs e)
 {
     if (Session["teller"] != null)
     {
         Session["teller"] = null;
     }
     if (Session["teller2"] != null)
     {
         Session["teller2"] = null;
     }
     cariOzet.Visible = false;
     using (radiusEntities dc = MyContext.Context(firma))
     {
         MusteriIslemleri m = new MusteriIslemleri(dc);
         toplu(m);
     }
 }
        protected void btnIstihbaratSil_Click(object sender, EventArgs e)
        {
            string custID = Request.QueryString["custID"];

            using (radiusEntities dc = MyContext.Context(firma))
            {
                MusteriIslemleri mu = new MusteriIslemleri(dc);
                int id = Int32.Parse(custID);
                mu.istihbarat_kaydet(id, "");
                goster(dc);
            }
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(@"<script type='text/javascript'>");
            sb.Append(" alertify.success('Kayıt silindi!');");
            sb.Append("$('#addModal').modal('hide');");
            sb.Append(@"</script>");
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "AddHModalScript", sb.ToString(), false);
        }
Esempio n. 28
0
        private void toplu(MusteriIslemleri m)
        {
            string antenid = Request.QueryString["antenid"];
            string tip     = Request.QueryString["tip"];
            string s       = txtAra.Value;

            //seçimli sms listesi
            if (Session["teller2"] != null)
            {
                smsSayi.InnerHtml = Session["teller2"].ToString().Split((new char[] { ',' }), StringSplitOptions.RemoveEmptyEntries).Length.ToString() + " Adet";
                cariOzet.Visible  = true;
            }

            //müşteri arama
            if (!String.IsNullOrEmpty(s))
            {
                baslik.InnerHtml = "Kişi ve Firmalar";
                musteri_tel_mail musteri_bilgileri = m.musteriAraR(s);
                hdnTeller.Value      = musteri_bilgileri.teller;
                GridView1.DataSource = musteri_bilgileri.musteriler;
                GridView1.DataBind();
            }

            else if (!String.IsNullOrEmpty(tip))
            {
                //bütün müşteriler
                baslik.InnerHtml = "Kişi ve Firmalar";
                musteri_tel_mail musteri_bilgileri = m.musteriListesiR();
                hdnTeller.Value      = musteri_bilgileri.teller;
                GridView1.DataSource = musteri_bilgileri.musteriler;

                GridView1.DataBind();
            }

            //masterpageden gelenler
            else if (Session["kriter"] != null)
            {
                string           ss = Session["kriter"].ToString();
                musteri_tel_mail musteri_bilgileri = m.musteriAraR(ss);
                hdnTeller.Value      = musteri_bilgileri.teller;
                GridView1.DataSource = musteri_bilgileri.musteriler;
                GridView1.DataBind();
            }
        }
Esempio n. 29
0
        //Handles Add button click in add modal popup
        protected void btnAddRecord_Click(object sender, EventArgs e)
        {
            //musteri ekleme yöntemi sonra radius yöntemi olarak burada tekrarlanacak.
            string firma = KullaniciIslem.firma();

            using (radiusEntities dc = MyContext.Context(firma))
            {
                MusteriIslemleri m = new MusteriIslemleri(dc);
                //string id = lblMusID.Text;
                string ad           = txtAdi.Text;
                string soyad        = txtSoyAdi.Text;
                string adres        = txtAdress.Text;
                string email        = txtEmail.Text;
                string tel          = txtTell.Text;
                string tc           = Araclar.KimlikUret(11);
                string kullaniciAdi = Araclar.KimlikUret(10);
                string kim          = txtKim.Text;
                string sifre        = Araclar.KimlikUret(10);

                string unvan = txtDuzenUnvan.Text;
                if (string.IsNullOrEmpty(unvan))
                {
                    unvan = ad + " " + soyad;
                }

                m.musteriEkleR(ad, soyad, unvan, adres, tel, tel, email, kim, tc, "0", "0", false, true, false, false, null);
                MusteriArama(dc, ad);
                GridView1.DataBind();
                GridView1.SelectedIndex = -1;
            }


            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            sb.Append(@"<script type='text/javascript'>");
            sb.Append("document.getElementById('ContentPlaceHolder1_txtAra').value = document.getElementById('ContentPlaceHolder1_txtAdi').value;");
            //sb.Append("alert('Record Added Successfully');");
            sb.Append(" alertify.success('Kayıt Eklendi!');");
            sb.Append("$('#addModal').modal('hide');");
            sb.Append(@"</script>");
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "AddHideModalScript", sb.ToString(), false);
        }
Esempio n. 30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
            {
                System.Web.HttpContext.Current.Response.Redirect("/Account/Giris");
            }
            //this.Master.kisiarama = false;
            //this.Master.servisarama = false;
            //string firma = KullaniciIslem.firma();
            using (radiusEntities dc = MyContext.Context(firma))
            {
                MusteriIslemleri m = new MusteriIslemleri(dc);

                if (!IsPostBack)
                {
                    AyarCurrent ay = new AyarCurrent(dc);
                    if (ay.lisansKontrol() == false)
                    {
                        Response.Redirect("/LisansError");
                    }
                    List <anten> antenler = m.antenler();
                    if (antenler != null)
                    {
                        drdAnten.AppendDataBoundItems = true;
                        drdAnten.DataSource           = antenler;
                        drdAnten.DataValueField       = "anten_id";
                        drdAnten.DataTextField        = "anten_adi";

                        drdAnten.DataBind();

                        drdAntenDuzen.AppendDataBoundItems = true;
                        drdAntenDuzen.DataSource           = antenler;
                        drdAntenDuzen.DataValueField       = "anten_id";
                        drdAntenDuzen.DataTextField        = "anten_adi";
                        drdAntenDuzen.DataBind();
                    }
                    toplu(m);
                }

                //gosterHepsiSession(m);
            }
        }