Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_name"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     if (!IsPostBack)
     {
         str_sql = "SELECT name,name from t_dict where flm=1 ;";
         DBFun.FillDwList(ddlist_dept, str_sql);
         str_sql = "SELECT url,name from t_dict where flm=11 ;";
         DBFun.FillDwList(ddlist_Status, str_sql);
         ddlist_Status.Items.Insert(0, "全部");
         str_sql = "SELECT name,name from t_dict where flm=13 ;";
         DBFun.FillDwList(ddlist_sqbm, str_sql);
         ddlist_sqbm.Items.Insert(0, "全部");
         //str_sql = "select distinct left(appNo,4)&'年',left(appNo,4) from t_teacher_list order by left(appNo,4) desc";
         //DBFun.FillDwList(ddlist_year, str_sql);
         //读取PageSize信息
         AspNetPager1.PageSize = Convert.ToInt16(ConfigurationManager.AppSettings.Get("PageSize"));
         bindData();
     }
 }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_name"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     if (!IsPostBack)
     {
         Calc_fs();
         str_sql = "SELECT name,name from t_dict where flm=3 ;";
         DBFun.FillDwList(ddlist_cGroup, str_sql);
         ddlist_cGroup.Items.Insert(0, "全部");
         str_sql = "SELECT url,name from t_dict where flm=11 ;";
         DBFun.FillDwList(ddlist_xmzt0, str_sql);
         ddlist_xmzt0.Items.Insert(0, "全部");
         str_sql = "select content from t_dict where flm = 14 and bm =3";
         str_sql = DBFun.ExecuteScalar(str_sql).ToString();
         DBFun.FillDwList(ddlist_year, str_sql);
         //读取PageSize信息
         AspNetPager1.PageSize = Convert.ToInt16(ConfigurationManager.AppSettings.Get("PageSize"));
         bindData();
     }
 }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //
                CommFun.IsAdmin();

                string Action = Request.QueryString["Action"];
                string ID     = Request.QueryString["ID"];
                if (Action == null)
                {
                    ltl_Title.Text = "新添影片类型";
                    btn_Ok.Text    = "添加";
                }
                else if (Action == "Edit")
                {
                    ltl_Title.Text = "编辑影片类型";
                    btn_Ok.Text    = "确认修改";
                    ReadFromDb(ID);
                }
                else if (Action == "Delete")
                {
                    DeleteFromDb(ID);
                }
            }
        }
Example #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_name"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     if (!IsPostBack)
     {
         string str_sql = "exec Q_dict_flm3";
         DBFun.FillDwList(ddlist_Group, str_sql);
         ddlist_Group.Items.Insert(0, "全部");
         ////读取PageSize信息
         //AspNetPager1.PageSize = Convert.ToInt16(ConfigurationManager.AppSettings.Get("PageSize"));
         //try
         //{
         //    ddl_PageSize.SelectedValue = ConfigurationManager.AppSettings.Get("PageSize");
         //}
         //catch
         //{
         //    ddl_PageSize.SelectedIndex = 0;
         //}
         AspNetPager1.PageSize = 10;
         //GridView1.SelectedRowStyle.BackColor = System.Drawing.Color.RosyBrown;
         bindData();
         this.GridView1.SelectedIndex = -1;
     }
 }
Example #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_name"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     if (!IsPostBack)
     {
         str_sql = "exec Q_dict_flm3";
         DBFun.FillDwList(ddlist_Group, str_sql);
         ddlist_Group.Items.Insert(0, "全部");
         str_sql = "SELECT url,name from t_dict where flm=11 ;";
         DBFun.FillDwList(ddlist_xmzt, str_sql);
         ddlist_xmzt.Items.Insert(0, "全部");
         AspNetPager1.PageSize = Convert.ToInt16(ConfigurationManager.AppSettings.Get("PageSize"));
         try
         {
             ddl_PageSize.SelectedValue = ConfigurationManager.AppSettings.Get("PageSize");
         }
         catch
         {
             ddl_PageSize.SelectedIndex = 0;
         }
         bindData();
         this.GridView1.SelectedIndex = -1;
     }
 }
Example #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CommFun.IsAdmin();
            string strqry;

            if (!IsPostBack)
            {
                //服务器路径
                strqry = "select * From T_Path";

                DwPath.DataSource     = DBFun.GetDataView(strqry).Table;
                DwPath.DataTextField  = "Caption";
                DwPath.DataValueField = "id";

                DwPath.DataBind();


                //类型
                strqry                 = "select * From T_Class";
                DwClass.DataSource     = DBFun.GetDataView(strqry);
                DwClass.DataTextField  = "caption";
                DwClass.DataValueField = "ID";
                DwClass.DataBind();
            }
        }
Example #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         CommFun.IsAdmin();
     }
 }
Example #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         CommFun.IsAdmin();
         string strqry = "select id,Caption From T_class";
         DBFun.FillDwList(dw_class, strqry);
         strqry = "Select * From T_Class";
         GridView1.DataSource = DBFun.GetDataView(strqry);
         GridView1.DataBind();
     }
 }
Example #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["admin_name"] == null)
         {
             Response.Redirect("../SessionTimeOut.aspx?type=top");
         }
         if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
         {
             Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
         }
     }
 }
Example #10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_name"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     if (!IsPostBack)
     {
         AspNetPager1.PageSize = Convert.ToInt16(ConfigurationManager.AppSettings.Get("PageSize"));
         bindData();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_id"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     lbl_type.Text = Request.QueryString["type"];
     if (!IsPostBack)
     {
         bindData();
     }
 }
Example #12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_id"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     if (!IsPostBack)
     {
         bindData();
         //this.GridView1.Columns[7].Visible = true;
         //this.GridView1.SelectedIndex = -1;
     }
 }
Example #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    CommFun.IsAdmin();

                    string strqry = "select * From T_HotSearch order by scount desc";
                    GridView1.DataSource = DBFun.GetDataView(strqry);
                    GridView1.DataBind();
                }
                catch (Exception ex)
                {
                    Response.Write("执行时出错!" + ex.Message);
                }
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_name"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     if (!IsPostBack)
     {
         DataView dv = DBFun.GetDataView("select * from master;");
         GridView1.DataSource = dv;
         GridView1.DataBind();
         Session["dv_detail"] = dv;
     }
 }
Example #15
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_name"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     if (!IsPostBack)
     {
         string str_sql = "exec Q_dict_flm3";
         DBFun.FillDwList(ddlist_Group, str_sql);
         ddlist_Group.Items.Insert(0, "全部");
         bindData();
         this.GridView1.SelectedIndex = -1;
     }
 }
Example #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    CommFun.IsAdmin();

                    DBFun.FillDwList(dw_class, "select ID,caption From T_Class");
                    string strqry = "select * From T_IndexPage";
                    GridView1.DataSource = DBFun.GetDataView(strqry);
                    GridView1.DataBind();
                }
                catch (Exception ex)
                {
                    Response.Write("执行时出错!" + ex.Message);
                }
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_name"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     if (!IsPostBack)
     {
         string str_sql = "exec Q_dict_flm3";
         DBFun.FillDwList(ddlist_Group, str_sql);
         ddlist_Group.Items.Insert(0, "全部");
         bindData();
         this.GridView1.SelectedIndex = -1;
         this.btn_CreateRws.Attributes.Add("onclick", "return   confirm   (\"生成任务书会删除原有任务书,确定要继续吗?\");");
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_name"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     if (!IsPostBack)
     {
         str_sql = "exec Q_dict_flm3";
         DBFun.FillDwList(dw_group, str_sql);
         DBFun.FillDwList(ddlist_Group, str_sql);
         ddlist_Group.Items.Insert(0, "全部");
         //读取PageSize信息
         AspNetPager1.PageSize = Convert.ToInt16(ConfigurationManager.AppSettings.Get("PageSize"));
         bindData();
     }
 }
Example #19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_name"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     if (!IsPostBack)
     {
         str_sql = "exec Q_dict_flm3";
         DBFun.FillDwList(ddlist_Group, str_sql);
         ddlist_Group.Items.Insert(0, "全部");
         //读取PageSize信息
         AspNetPager1.PageSize = Convert.ToInt16(ConfigurationManager.AppSettings.Get("PageSize"));
         bindData();
         this.GridView1.SelectedIndex = -1;
         btn_create.Attributes.Add("onclick", "return confirm   (\"原有的对应关系将会删除,是否继续?\");");
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_name"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     if (!IsPostBack)
     {
         str_sql = "exec Q_dict_flm3";
         DBFun.FillDwList(dw_group, str_sql);
         DBFun.FillDwList(ddlist_Group, str_sql);
         ddlist_Group.Items.Insert(0, "全部");
         //读取PageSize信息
         AspNetPager1.PageSize = Convert.ToInt16(ConfigurationManager.AppSettings.Get("PageSize"));
         bindData();
         this.GridView1.SelectedIndex = -1;
     }
     //Label lbl;
     //for (int i = 0; i < GridView1.Rows.Count; i++)
     //{
     //    CheckBox ckb = (CheckBox)GridView1.Rows[i].FindControl("cbx_HandOn");
     //    lbl = (Label)this.GridView1.Rows[i].FindControl("lbl_Flag");
     //    if (ckb.Checked)
     //    {
     //        lbl.Text = "已提交";
     //        lbl.ForeColor = System.Drawing.Color.Green;
     //    }
     //    else
     //    {
     //        lbl.Text = "未提交";
     //        lbl.ForeColor = System.Drawing.Color.Red;
     //    }
     //}
 }
Example #21
0
            private void pageload()
            {
                //网页加载过程
                CommFun.IsAdmin();
                if (!IsPostBack)
                {
                    string strqry;
                    string Action = Request.QueryString["Action"];
                    string id     = Request.QueryString["ID"];
                    if (Action == "Edit")
                    {
                        //修改
                        strqry = "select * From T_Path where id=" + id;
                        DataView dv = DBFun.GetDataView(strqry);
                        Tb_PlayPath.Text  = dv.Table.Rows[0]["PlayPath"].ToString();
                        tb_PlayPath2.Text = dv.Table.Rows[0]["PlayPath2"].ToString();
                        Tb_DownPath.Text  = dv.Table.Rows[0]["downpath"].ToString();
                        Tb_Caption.Text   = dv.Table.Rows[0]["caption"].ToString();
                        BtnAdd.Text       = "保存";
                    }
                    if (Action == "Delete")
                    {
                        //删除
                        strqry = "Delete From T_Path where ID=" + id;
                        if (DBFun.ExecuteUpdate(strqry))
                        {
                            Response.Redirect(Request.UrlReferrer.ToString());
                        }
                    }


                    strqry = "select * From T_Path order by id desc";
                    Repeater1.DataSource = DBFun.GetDataView(strqry);
                    Repeater1.DataBind();
                }
            }
Example #22
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_id"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     if (!IsPostBack)
     {
         string str_sql = "select flag from master where admin_name = '" + Session["admin_name"].ToString() + "'";
         if ((int)DBFun.ExecuteScalar(str_sql) != 2)
         {
             Response.Write("<script>alert('您没有权限访问此页面!');location.href = './main.aspx';</script>");
             return;
         }
         //lbl_type.Text = Request.QueryString["type"];
         //if (lbl_type.Text=="")
         //{
         //    Response.Write("<script>alert('请您通过正规渠道访问此页面!');history.go(-1);</script>");
         //    return;
         //}
         //str_sql = "select bm,name from t_dict where flm = "+lbl_type.Text;
         //DBFun.FillDwList(dw_group, str_sql);
         bindData();
         //this.GridView1.Columns[8].Visible = false;
         this.GridView1.Columns[7].Visible = true;
         //this.GridView1.Columns[this.GridView1.Columns.Count - 4].Visible = false;
         //this.GridView1.Columns[this.GridView1.Columns.Count - 2].Visible = false;
         //this.GridView1.AllowSorting = false;
         //this.GridView1.AllowPaging = false;
         this.GridView1.SelectedIndex = -1;
     }
 }
Example #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //网页加载
            CommFun.IsAdmin();

            string strqry;

            if (!IsPostBack)
            {
                //服务器路径
                strqry = "select * From T_Path";

                DwPath.DataSource     = DBFun.GetDataView(strqry).Table;
                DwPath.DataTextField  = "Caption";
                DwPath.DataValueField = "id";

                DwPath.DataBind();


                //类型
                strqry                 = "select * From T_Class";
                DwClass.DataSource     = DBFun.GetDataView(strqry);
                DwClass.DataTextField  = "caption";
                DwClass.DataValueField = "ID";
                DwClass.DataBind();


                string Action = Request.QueryString["Action"];
                string id     = Request.QueryString["ID"];
                string pid    = Request.QueryString["PID"];
                if (Action == "Edit" && id != null)
                {
                    //是示信息以供修改

                    strqry = string.Format("select * From T_films where ID={0}", id);
                    DataRow dr = DBFun.GetDataView(strqry).Table.Rows[0];
                    DwPath.Text               = dr["pathid"].ToString();
                    TbFilmname.Text           = dr["film_name"].ToString();
                    TbOthername.Text          = dr["other_name"].ToString();
                    TbDirector.Text           = dr["film_director"].ToString();
                    TbPlayer.Text             = dr["film_player"].ToString();
                    DwClass.Text              = dr["film_classid"].ToString();
                    DwFrom.Text               = dr["film_from"].ToString();
                    DwLevel.Text              = dr["film_level"].ToString();
                    DwClear.Text              = dr["film_clear"].ToString();
                    CkbBest.Items[0].Selected = (dr["filmisgood1"].ToString() == "1");
                    CkbBest.Items[1].Selected = (dr["filmisgood2"].ToString() == "1");
                    TbMoney.Text              = dr["film_money"].ToString();
                    Rbfilmtype.Text           = dr["playtype"].ToString();
                    RbIsReq.Text              = dr["filmisseq"].ToString();
                    TbPicUrl.Text             = dr["film_pic"].ToString();
                    TbGut.Text         = dr["film_gut"].ToString().Replace("<br>", "\n");;
                    TbFilmPhyPath.Text = dr["filePhypath"].ToString();
                    uppath.Value       = dr["filefolder"].ToString();
                    Rb_AllowDown.Text  = dr["AllowDown"].ToString();
                    Rb_Showtype.Text   = dr["showType"].ToString();
                    Tb_SearchKey.Text  = dr["SearchKey"].ToString();
                    img_pic.Src        = "..\\film_poster\\" + dr["film_pic"].ToString();

                    //显示详细集数
                    strqry = string.Format("select * From T_Film_detail where filmid={0} order by id asc", id);
                    string   strDetail = "";
                    DataView dv        = DBFun.GetDataView(strqry);
                    for (int i = 0; i < dv.Table.Rows.Count; i++)
                    {
                        strDetail += "第" + (i + 1) + "集:<input type=text name=urla" + (i + 1) + " size=60  value=" + dv.Table.Rows[i]["filename"].ToString() + ">";
                        strDetail += "&nbsp;<a href=film_edit.aspx?Action=Delete&ID=" + dv.Table.Rows[i]["id"].ToString() + "&PID=" + id + ">删除</a><br/>";
                    }
                    Label2.Text = strDetail;
                    //InnerHtml = strDetail;
                }
                if (Action == "Delete" && id != null)
                {
                    strqry = string.Format("Delete From [T_film_detail] where id={0}", id);
                    DBFun.ExecuteSql(strqry);
                    strqry = string.Format("Update [T_films] set film_num=film_num-1,filmupdatetime=#{1}# where id={0}", pid, DateTime.Now.ToString());
                    DBFun.ExecuteSql(strqry);
                    Response.Redirect("film_edit.aspx?Action=Edit&ID=" + pid);
                }
            }
        }
Example #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //加载
        CommFun.IsAdmin();
        strqry = "";
        if (!IsPostBack)
        {
            strqry                 = "select * From T_Class";
            dwclass.DataSource     = DBFun.GetDataView(strqry);
            dwclass.DataTextField  = "caption";
            dwclass.DataValueField = "id";
            dwclass.DataBind();
            dw_NewClass.DataSource     = dwclass.DataSource;
            dw_NewClass.DataTextField  = "caption";
            dw_NewClass.DataValueField = "id";
            dw_NewClass.DataBind();
            ListItem lt = new ListItem();
            lt.Text  = "--请选择--";
            lt.Value = "0";
            dwclass.Items.Add(lt);
            dwclass.Text = "0";
            strqry       = "Select id,caption From T_Path order by id desc";
            DBFun.FillDwList(dw_ServerList, strqry);
            dw_ServerList.Items.Add(new ListItem("--请选择--", "0"));
            dw_ServerList.Text = "0";
            strqry             = "select * From T_films order by id desc";


            if (Request.QueryString["FilmisSeq"] == "1")
            {
                //连载中
                strqry = "select * From T_films where filmisseq=1 order by id desc";
            }

            Session["strqry"] = strqry;
            //绑定数据
            dvlist = DBFun.GetDataView(strqry);
            AspNetPager1.RecordCount = dvlist.Table.Rows.Count;
            Cache.Insert("dvlist", (DataView)dvlist, null, System.Web.Caching.Cache.NoAbsoluteExpiration, new TimeSpan(0, 5, 0));
            bindData();
        }
        else
        {      //回发
            string ctrlname = Page.Request.Params.Get("__EVENTTARGET");
            if (ctrlname.IndexOf("dw") != -1)
            {
                //是由dropdwonlist 引发的
                strqry = "select * From T_films where 1=1";
                string filter = "";
                if (dwclass.Text != "0")
                {
                    filter += (" and film_classid=" + dwclass.Text);
                }
                if (dwfrom.Text != "0")
                {
                    filter += (" and film_from = " + dwfrom.Text);
                }
                if (dwseecount.Text != "0")
                {
                    filter += (" and see_count<=" + dwseecount.Text);
                }
                if (dw_ServerList.Text != "0")
                {
                    filter += (" and pathid=" + dw_ServerList.Text);
                }
                if (dw_jointime.Text != "0")
                {
                    filter += string.Format(" and join_time>=DateAdd('m',-{0},date())", dw_jointime.Text);
                }

                filter                  += " order by id desc";
                strqry                  += filter;
                Session["strqry"]        = strqry;
                dvlist                   = DBFun.GetDataView(strqry);
                AspNetPager1.RecordCount = dvlist.Table.Rows.Count;
                Cache["dvlist"]          = dvlist;
                bindData();
            }
        }
    }