Ejemplo n.º 1
0
 protected void btnKaydet_Click(object sender, EventArgs e)
 {
     if (FileUpload1.HasFile)
     {
         //string extension = Path.GetExtension(FileUpload1.PostedFile.FileName);
         //FileUpload1.SaveAs("store_" + 15 + extension);
         magazab.update(2, 15, drpKategori.SelectedValue, drpPaket.SelectedValue, FileUpload1.FileName, drpPaketSure.SelectedValue);
     }
 }
Ejemplo n.º 2
0
        protected void devam_Click(object sender, EventArgs e)
        {
            //string[] segments = FileUpload1.FileName.Split('.');
            //string fileExt = segments[segments.Length - 1];
            DateTime magazaSure = default(DateTime);

            if (magazaKtgb.search(2, Request.QueryString["pac"]).paketSureId == 1)
            {
                magazaSure = DateTime.Now.AddMonths(6);
            }
            if (magazaKtgb.search(2, Request.QueryString["pac"]).paketSureId == 2)
            {
                magazaSure = DateTime.Now.AddMonths(12);
            }

            //magazab.update(2, Request.QueryString["sto"], Request.QueryString["pac"], drpTur.SelectedValue, txtMagazaAd.Text, Request.QueryString["sto"] + "." + fileExt, magazaSure,txtAciklama.Text);

            string[] segments = FileUpload1.FileName.Split('.');
            string   fileExt  = segments[segments.Length - 1];

            if (chcYeniResim.Checked)
            {
                if (FileUpload1.HasFile)
                {
                    HttpFileCollection updateFiles = Request.Files;
                    string             str_image   = "";

                    if (FileUpload1.HasFile)
                    {
                        for (int i = 0; i < updateFiles.Count; i++)
                        {
                            bool secili = false;
                            if (i == 0)
                            {
                                secili = true;
                            }

                            HttpPostedFile file = updateFiles[i];

                            string fileName      = file.FileName;
                            string fileExtension = file.ContentType;

                            if (!string.IsNullOrEmpty(fileName))
                            {
                                fileExtension = Path.GetExtension(fileName);
                                str_image     = Request.QueryString["edit"] + fileExtension;
                                string pathToSave_100 = HttpContext.Current.Server.MapPath("~/upload/magaza/") + str_image;
                                file.SaveAs(pathToSave_100);
                            }
                        }
                    }
                }
            }
            magazab.update(2, Request.QueryString["edit"], Request.QueryString["pac"], drpTur.SelectedValue, txtMagazaAd.Text, Request.QueryString["edit"] + "." + fileExt, magazaSure, txtAciklama.Text);
            Response.Redirect("~/management/anaYonetim/magazaYonetimi/magaza.aspx?page=listele&proc=3");
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["store"] != null)
            {
                if (Request.QueryString["proc"] == "3")
                {
                    magazab.update(3, Request.QueryString["store"], true, false, false);
                }
                if (Request.QueryString["proc"] == "1")
                {
                    magazab.update(3, Request.QueryString["store"], false, false, true);
                }
                if (Request.QueryString["proc"] == "2")
                {
                    magazab.update(3, Request.QueryString["store"], false, false, false);
                }
            }

            if (Request.QueryString["rem"] == "4")
            {
                magazab.update(3, Request.QueryString["store"], false, true, false);
            }
            if (Request.QueryString["proc"] == "1")
            {
                magazaRepeater.DataSource = magazab.list(1, false, false, true); //aktif
                proc = "1";
            }
            if (Request.QueryString["proc"] == "2")
            {
                magazaRepeater.DataSource = magazab.list(1, false, true, false); //pasif
                proc = "2";
            }
            if (Request.QueryString["proc"] == "3")
            {
                magazaRepeater.DataSource = magazab.list(1, false, false, false); //onay bekleyen
                proc = "3";
            }
            magazaRepeater.DataBind();
        }
Ejemplo n.º 4
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;
            }
        }
Ejemplo n.º 5
0
 protected void btnKaydet_Click(object sender, EventArgs e)
 {
     magazab.update(4, 16, txtMagazaAdi.Value, rdBireyseli.SelectedValue, drpIl.SelectedValue, drpIlce.SelectedValue, drpMahalle.SelectedValue, txtTcNo.Value, drpVergi.SelectedValue);
 }