Exemplo n.º 1
0
        protected void Kaydet_Click(object sender, EventArgs e)
        {
            try
            {
                magazab.update(4, Convert.ToInt32(Request.QueryString["magazaId"]), txtMagazaAdi.Value, rdKurumsal.SelectedValue, drpIl.SelectedValue, drpIlce.SelectedValue, drpMahalle.SelectedValue, txtTcNo.Value, drpVergi.SelectedValue);

                if (txtIsTlf.Value != "" && magazaTlfb.search(Convert.ToInt32(Request.QueryString["magazaId"]), 3) != null)
                {
                    magazaTlfb.update(Convert.ToInt32(Request.QueryString["magazaId"]), 3, DAL.toolkit.Number_Remover(txtIsTlf.Value));
                }
                else if (txtIsTlf.Value != "" && magazaTlfb.search(Convert.ToInt32(Request.QueryString["magazaId"]), 3) == null)
                {
                    magazaTlfb.insert(Convert.ToInt32(Request.QueryString["magazaId"]), DAL.toolkit.Number_Remover(txtIsTlf.Value), 3);
                }
                else
                {
                    magazaTelefon _telefon = magazaTlfb.search(Convert.ToInt32(Request.QueryString["magazaId"]), 3);
                    magazaTlfb.delete(_telefon.magazaTelefonId);
                }

                ///////////////////////////////////////////////////////////////
                if (txtIsTlf2.Value != "" && magazaTlfb.search(Convert.ToInt32(Request.QueryString["magazaId"]), 4) != null)
                {
                    magazaTlfb.update(Convert.ToInt32(Request.QueryString["magazaId"]), 4, DAL.toolkit.Number_Remover(txtIsTlf2.Value));
                }
                else if (txtIsTlf2.Value != "" && magazaTlfb.search(Convert.ToInt32(Request.QueryString["magazaId"]), 4) == null)
                {
                    magazaTlfb.insert(Convert.ToInt32(Request.QueryString["magazaId"]), DAL.toolkit.Number_Remover(txtIsTlf2.Value), 4);
                }
                else
                {
                    magazaTelefon _telefon = magazaTlfb.search(Convert.ToInt32(Request.QueryString["magazaId"]), 4);
                    magazaTlfb.delete(_telefon.magazaTelefonId);
                }

                DAL.magaza _magaza = magazab.search(Convert.ToInt32(Request.QueryString["magazaId"]));


                Response.Redirect("~/management/anaYonetim/magazaYonetimi/magaza.aspx?page=duzenle-icerik&edit=" + Request.QueryString["magazaId"] + "&cat=1&pac=" + _magaza.magazaKategoriId);
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 2
0
        protected void Kaydet_Click(object sender, EventArgs e)
        {
            try
            {
                magazab.insert(txtMagazaAdi.Value, rdKurumsal.SelectedValue, drpIl.SelectedValue, drpIlce.SelectedValue, drpMahalle.SelectedValue, txtTcNo.Value, drpVergi.SelectedValue);
                DAL.magaza _magaza = magazab.ielist().Last();
                if (txtIsTlf.Value != "")
                {
                    magazaTlfb.insert(_magaza.magazaId, DAL.toolkit.Number_Remover(txtIsTlf.Value), 3);
                }
                if (txtIsTlf2.Value != "")
                {
                    magazaTlfb.insert(_magaza.magazaId, DAL.toolkit.Number_Remover(txtIsTlf2.Value), 4);
                }
                magazaKllb.insert(_magaza.magazaId, drpKullanici.SelectedValue, 0);

                Response.Redirect("~/management/anaYonetim/magazaYonetimi/magaza.aspx?page=kategori-secimi&sto=" + _magaza.magazaId);
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DAL.magaza _magaza = magazab.search(Convert.ToInt32(Request.QueryString["magazaId"]));
            txtMagazaAdi.Value = _magaza.magazaAdi;
            txtTcNo.Value      = _magaza.vergiNo;

            if (magazaTlfb.search(Convert.ToInt32(Request.QueryString["magazaId"]), 3) != null)
            {
                magazaTelefon _telefon = magazaTlfb.search(Convert.ToInt32(Request.QueryString["magazaId"]), 3);
                txtIsTlf.Value = _telefon.telefon;
            }

            if (magazaTlfb.search(Convert.ToInt32(Request.QueryString["magazaId"]), 4) != null)
            {
                magazaTelefon _telefon2 = magazaTlfb.search(Convert.ToInt32(Request.QueryString["magazaId"]), 4);
                txtIsTlf2.Value = _telefon2.telefon;
            }

            if (!IsPostBack)
            {
                drpIl.DataSource     = ilb.list();
                drpIl.DataTextField  = "ilAdi";
                drpIl.DataValueField = "ilId";
                drpIl.DataBind();

                ListItem lst_3 = new ListItem();
                lst_3.Value    = null;
                lst_3.Text     = "il Seçiniz";
                lst_3.Selected = true;
                drpIl.Items.Insert(0, lst_3);

                drpIl.SelectedValue = _magaza.ilId.ToString();

                drpIlce.DataSource     = ilceb.list(Convert.ToInt32(drpIl.SelectedValue));
                drpIlce.DataTextField  = "ilceAdi";
                drpIlce.DataValueField = "ilceId";
                drpIlce.DataBind();

                ListItem lst_2 = new ListItem();
                lst_2.Value    = null;
                lst_2.Text     = "İlçe Seçiniz";
                lst_2.Selected = true;
                drpIlce.Items.Insert(0, lst_2);

                drpIlce.SelectedValue = _magaza.ilceId.ToString();

                drpMahalle.DataSource     = mahalleb.list(Convert.ToInt32(drpIlce.SelectedValue));
                drpMahalle.DataTextField  = "mahalleAdi";
                drpMahalle.DataValueField = "mahalleId";
                drpMahalle.DataBind();

                ListItem lst_1 = new ListItem();
                lst_1.Value    = null;
                lst_1.Text     = "Mahalle Seçiniz";
                lst_1.Selected = true;
                drpMahalle.Items.Insert(0, lst_1);

                drpMahalle.SelectedValue = _magaza.mahalleId.ToString();

                drpVergi.DataSource     = vergiDaireb.list(Convert.ToInt32(drpIl.SelectedValue));
                drpVergi.DataTextField  = "vergiDairesi";
                drpVergi.DataValueField = "vergiDaireId";
                drpVergi.DataBind();

                ListItem lst = new ListItem();
                lst.Value    = null;
                lst.Text     = "Vergi Dairesi Seçiniz";
                lst.Selected = true;
                drpVergi.Items.Insert(0, lst);

                drpVergi.SelectedValue = _magaza.vergiDaireId.ToString();

                rdKurumsal.SelectedValue = _magaza.kurumsalMi.ToString();

                if (rdKurumsal.SelectedValue == "True")
                {
                    lblTc.InnerText = "Vergi No";
                }
                else
                {
                    lblTc.InnerText = "TC Kimlik No";
                }

                onlineRepeater.DataSource = kullanicib.list(4);
                onlineRepeater.DataBind();
            }
        }
Exemplo n.º 4
0
        protected void devam_Click1(object sender, EventArgs e)
        {
            // kullanıcının mağazasının olup olmadığı kontrol edilmesi gerekir
            DAL.magazaKullanici magazaKul = mkul.search(2, ((kullanici)Session["unique-site-user"]).kullaniciId);

            Session["cat"] = null;
            Session["tur"] = null;
            Session["mgz"] = null;


            if (magazaKul != null) // eğer mağazası var ise
            {
                DAL.magaza mgz = mgzB.search(magazaKul.magazaId);

                if (mgz.pasifMi == false && mgz.silindiMi == false)
                {
                    DAL.magazaKategori mgzKat = mkat.search(2, mgz.magazaKategoriId);

                    if (mgzKat.kategoriId.ToString() != ListBox1.SelectedValue)                          // seçilen ilan kategorisi mağaza kategorisine eşit değilse
                    {
                        if (ilnBll.ilanSayisi(((kullanici)Session["unique-site-user"]).kullaniciId) < 2) // ilan sayısı 2 veya daha büyük değilse
                        {
                            if (ListBox2.SelectedValue == "14" || ListBox2.SelectedValue == "18")
                            {
                                Session["cat"] = ViewState["id"];
                                Response.Redirect("~/ilan-form.aspx");
                            }
                            else if (ListBox2.SelectedValue == "12")
                            {
                                Session["cat"] = ViewState["id"];
                                Session["tur"] = ViewState["ilanTur"];
                                Response.Redirect("~/ilan-form.aspx");
                            }
                            else
                            {
                                Session["cat"] = ViewState["id"];
                                Session["tur"] = ViewState["ilanTur"];
                                Response.Redirect("~/ilan-form.aspx");
                            }
                        }
                        else
                        {
                            if (ViewState["ilanTur"] != null)
                            {
                                Session["tur"] = ViewState["ilanTur"];
                            }
                            Session["cat"] = ViewState["id"];
                            mesaj          = "Vermek istediğiniz kategori mağazanızın kategorisi dışında ve yayında 2 adet ilanınız olduğu için ücretsiz ilan veremezsiniz !";
                            ScriptManager.RegisterStartupScript(this, this.GetType(), "temp", "<script language='javascript'>uyariVer();</script>", false);
                        }
                    }
                    else
                    {
                        if (ListBox2.SelectedValue == "14" || ListBox2.SelectedValue == "18")
                        {
                            Session["cat"] = ViewState["id"];
                            Session["mgz"] = mgz.magazaId;
                            Response.Redirect("~/ilan-form.aspx");
                        }
                        else if (ListBox2.SelectedValue == "12")
                        {
                            Session["cat"] = ViewState["id"];
                            Session["mgz"] = mgz.magazaId;
                            Session["tur"] = ViewState["ilanTur"];
                            Response.Redirect("~/ilan-form.aspx");
                        }
                        else
                        {
                            Session["cat"] = ViewState["id"];
                            Session["mgz"] = mgz.magazaId;
                            Session["tur"] = ViewState["ilanTur"];
                            Response.Redirect("~/ilan-form.aspx");
                        }
                    }
                }
            }
            else
            {
                if (ListBox2.SelectedValue == "14" || ListBox2.SelectedValue == "18")
                {
                    Session["cat"] = ViewState["id"];
                    Response.Redirect("~/ilan-form.aspx");
                }
                else if (ListBox2.SelectedValue == "12")
                {
                    Session["cat"] = ViewState["id"];
                    Session["tur"] = ViewState["ilanTur"];
                    Response.Redirect("~/ilan-form.aspx");
                }
                else
                {
                    Session["cat"] = ViewState["id"];
                    Session["tur"] = ViewState["ilanTur"];
                    Response.Redirect("~/ilan-form.aspx");
                }
            }
        }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (magazab.search(16) != null)
            {
                DAL.magaza _magaza = magazab.search(16);
                txtMagazaAdi.Value    = _magaza.magazaAdi;
                h3MagazaAdi.InnerHtml = _magaza.magazaAdi;
                txtTcNo.Value         = _magaza.vergiNo;

                magazaTelefon _telefon = magazaTlfb.search(16, 3);
                txtIsTlf.Text = _telefon.telefon;

                magazaTelefon _telefon1 = magazaTlfb.search(16, 4);
                txtIsTlf2.Text = _telefon1.telefon;


                if (!IsPostBack)
                {
                    drpIl.DataSource     = ilb.list();
                    drpIl.DataTextField  = "ilAdi";
                    drpIl.DataValueField = "ilId";
                    drpIl.DataBind();

                    drpIl.SelectedValue = _magaza.ilId.ToString();

                    drpIlce.DataSource     = ilceb.list(Convert.ToInt32(drpIl.SelectedValue));
                    drpIlce.DataTextField  = "ilceAdi";
                    drpIlce.DataValueField = "ilceId";
                    drpIlce.DataBind();

                    drpIlce.SelectedValue = _magaza.ilceId.ToString();

                    drpMahalle.DataSource     = mahalleb.list(Convert.ToInt32(drpIlce.SelectedValue));
                    drpMahalle.DataTextField  = "mahalleAdi";
                    drpMahalle.DataValueField = "mahalleId";
                    drpMahalle.DataBind();

                    drpMahalle.SelectedValue = _magaza.mahalleId.ToString();

                    rdBireyseli.SelectedValue = _magaza.kurumsalMi.ToString();

                    drpVergi.DataSource     = vergiDaireb.list(Convert.ToInt32(drpIl.SelectedValue));
                    drpVergi.DataTextField  = "vergiDairesi";
                    drpVergi.DataValueField = "vergiDaireId";
                    drpVergi.DataBind();

                    ListItem lst = new ListItem();
                    lst.Value    = null;
                    lst.Text     = "Vergi Dairesi Seçiniz";
                    lst.Selected = true;
                    drpVergi.Items.Insert(0, lst);


                    //drpKategori.DataSource = kategorib.list(0);
                    //drpKategori.DataTextField = "kategoriAdi";
                    //drpKategori.DataValueField = "kategoriId";
                    //drpKategori.DataBind();

                    //drpKategori.SelectedValue = _magaza.kategoriKimden.kategoriId.ToString();
                    //drpPaket.SelectedValue = _magaza.magazaPaketId.ToString();

                    drpKullanici.DataSource     = kullanicib.receiveList();
                    drpKullanici.DataTextField  = "kullaniciAdSoyad";
                    drpKullanici.DataValueField = "kullaniciId";
                    drpKullanici.DataBind();
                }
            }
        }