⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 manage_inssuancetutorial.aspx.cs

📁 互动媒体学习系统 1.后台 用户注册登录后可进行发布教程、下载等操作 对教程信息进行添加、查询操作。 对视频课堂信息进行查看操作。 对语音课堂信息进行查看操作。 2.后台 输入用户名及密
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Manage_inssuanceTutorial : System.Web.UI.Page
{
    dataOperate mydo = new dataOperate();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string vsname = TextBoxVname.Text;
        string isVS;
        if (RadioButtonSound.Checked)
        {
            isVS = "tb_Sound";
        }
        else
        {
            isVS = "tb_Video";
        }
        string typ = this.DropDownListType.SelectedValue;
        string content = TextBoxContent.Text;
        string name = "校长";
        int clicksum = 0;

        string Path;
        try
        {
            string sql;
            if (isVS == "tb_Sound")
            {
                sql = "insert into tb_Sound(SoundType,SoundName,SoundUrl,ClickSum,SoundContent,Name) values('" + typ + "','" + vsname + "','" + this.FileUpload1.FileName + "','" + clicksum + "','" + content + "','" + name + "')";
                Path = Server.MapPath("~/") + "Sound" + "\\" + this.FileUpload1.FileName;

            }
            else
            {
                sql = "insert into tb_Video(VideoType,VideoName,VideoUrl,ClickSum,VideoContent,Name) values(" + typ + ",'" + vsname + "','" + this.FileUpload1.FileName + "'," + clicksum + ",'" + content + "','" + name + "')";
                Path = Server.MapPath("~/") + "Video" + "\\" + this.FileUpload1.FileName;
            }


            if (mydo.adlData(sql))
            {

                FileUpload1.PostedFile.SaveAs(Path);
                Page.RegisterStartupScript("true", "<script>alert('上传成功!')</script>");
                TextBoxVname.Text = "";
                TextBoxContent.Text = "";
            }
            else
            {

                Page.RegisterStartupScript("false", "<script>alert('上传是彼岸 ')</script>");
            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message.ToString());
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -