Esempio n. 1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (FileUpload1.HasFile)
        {
            if (FileUpload2.HasFile)
            {
                string str = FileUpload1.FileName;
                FileUpload1.PostedFile.SaveAs(Server.MapPath("~/img_mp3/" + str));
                string Image = FileUpload1.PostedFile.FileName;


                string str2 = FileUpload2.FileName;
                FileUpload2.PostedFile.SaveAs(Server.MapPath("~/bank_mp3/" + str2));
                string Image2 = FileUpload2.PostedFile.FileName;



                using (DataSetTableAdapters.Mp3TableAdapter ins1 = new DataSetTableAdapters.Mp3TableAdapter())
                {
                    ins1.Insert(txt_name.Text, Image, txt_tanzim.Text, txt_ahang.Text, txt_price.Text, txt_desk.Text, Image2, 1);
                    Response.Redirect("~/Admin/Insert_mp3.aspx");
                }
            }
        }
    }
Esempio n. 2
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     if (TextBox1.Text != "")
     {
         using (DataSetTableAdapters.Mp3TableAdapter ins1 = new DataSetTableAdapters.Mp3TableAdapter())
         {
             ins1.Delete(Convert.ToInt32(TextBox1.Text));
             Response.Redirect("~/Admin/InsertNot.aspx");
         }
     }
 }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string s1;

        s1 = "";



        using (DataSetTableAdapters.Mp3TableAdapter ins = new DataSetTableAdapters.Mp3TableAdapter())
        {
            DataSet.Mp3DataTable ne = ins.select_mp3();
            foreach (DataSet.Mp3Row row1 in ne)
            {
                s1 += "<div class='col-lg-4 col-md-12'>";
                s1 += " <div class='blog-box'>";
                s1 += "  <div class=''>";
                s1 += " <img src ='img_not/" + row1.Pic + "' alt='آموزشگاه موسیقی سرایش' class='img-responsive' style='height:300px; width:400px''> ";
                s1 += " <div class='magnifier'>";
                s1 += "<a href ='blog-single.html' title = 'آموزشگاه موسیقی سرایش' >< i class='flaticon-add'></i></a>";
                s1 += "</div>";
                s1 += "</div>";
                s1 += "<div class='blog-desc'>";
                s1 += " <h4 class='farsi-font farsi-dir'><a href = '#' >" + row1.Name + " </a></h4>";
                s1 += "<p class='farsi-font farsi-dir'>خواننده : " + row1.Khanande + "</p>";
                s1 += "<p class='farsi-font farsi-dir'> آهنگساز : " + row1.Ahangsaz + "</p>";
                s1 += "<p class='farsi-font farsi-dir'> قیمت : " + row1.Price + " تومان</p>";
                s1 += "</div>";
                s1 += "<div class='post-meta'>";
                s1 += "<ul class='list-inline'>";
                s1 += "<li><a class='farsi-font farsi-dir' href='#'><i class='fa fa-shopping-basket' aria-hidden='true'></i>خرید</a></li>";

                s1 += "</ul></div></div></div > ";
            }
        }
        Literal1.Text = s1;
    }