protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "82", this.Page);//頁面按鈕權限管控
                    }

                    if (Request["KeyValue"] != null)
                    {
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        lblFlag.Text = strKeyValue;
                        Select("", "", "", "","");
                    }
                    if (Request["SearchKey"] != null)
                    {
                        string strSearchValue = Request["SearchKey"].ToString().Trim();
                        string[] ArrKeyValue = strSearchValue.Split('=');
                        Select(ArrKeyValue[0].Trim().ToString(), ArrKeyValue[1].Trim().ToString(), ArrKeyValue[2].Trim().ToString()
                            , ArrKeyValue[3].Trim(),ArrKeyValue[4].Trim());
                    }
                    else
                    {
                        Select("", "", "", "","");
                    }
                }
            }
            catch
            { }
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            strBasePath = Request.PhysicalApplicationPath;
            if (!IsPostBack)
            {
                try
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "21", this.Page);//頁面按鈕權限管控
                    }

                    //if(Session[""])
                    //{
                    //判斷是否是修改動作 Edit By Tanyi 2011.3.16
                    if (Request["KeyValue"] != null)
                    {
                        if (Request["strIndex"] != null)
                        {
                            string s = Request["strIndex"].ToString();
                        }
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        lblFlag.Text = strKeyValue;
                        if (Request["strIndex"] != null && Request["strIndex"].ToString() != "")
                        {
                            string strIndex = Request["strIndex"];
                            Gv_Movie.PageIndex = Convert.ToInt32(strIndex);
                            txtPageIndex.Text = Gv_Movie.PageIndex.ToString();
                        }
                        BindMovie();
                    }
                    //當是查詢時 Edit By Tanyi 2011.3.16
                    else if (Request["SearchKey"] != null)
                    {
                        string strSearchValue = Request["SearchKey"].ToString().Trim();
                        string[] ArrKeyValue = strSearchValue.Split('=');
                        DataSearchBind(ArrKeyValue[0].Trim().ToString(), ArrKeyValue[1].Trim().ToString(), ArrKeyValue[2].Trim().ToString(), ArrKeyValue[3].Trim().ToString(), ArrKeyValue[4].Trim(), ArrKeyValue[5].Trim());
                    }
                    else
                    {
                        BindMovie();
                    }
                    //}
                    //else
                    //{

                    //}
                }
                catch
                {

                }
            }
        }
示例#3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "31", this.Page);//頁面按鈕權限管控
                    }
                    //新增,修改后結果展示
                    if (Request["KeyValue"] != null)
                    {
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        lblFlag.Text = strKeyValue;

                        //修改后設置頁碼索引
                        if (Request["strIndex"] != null && Request["strIndex"].ToString() != "")
                        {
                            string strIndex = Request["strIndex"];
                            Gv_Album.PageIndex = Convert.ToInt32(strIndex);
                            //保存當前索引
                            txtPageIndex.Text = Gv_Album.PageIndex.ToString();
                        }

                        GvAlbumBind();

                    }
                    //查詢結果展示
                    else if (Request["SearchKey"] != null)
                    {
                        string strSearchValue = Request["SearchKey"].ToString().Trim();
                        string[] ArrKeyValue = strSearchValue.Split('=');
                        DataSearchBind(ArrKeyValue[0].Trim().ToString(), ArrKeyValue[1].Trim().ToString(), ArrKeyValue[2].Trim().ToString(), ArrKeyValue[3].Trim().ToString(), ArrKeyValue[4].Trim(), ArrKeyValue[5].Trim());
                    }
                    else
                    {
                        //從Detail頁面返回時設置頁碼索引值
                        if (Request["strPIndex"] != null && Request["strPIndex"].ToString() != "")
                        {
                            string strPIndex = Request["strPIndex"];
                            Gv_Album.PageIndex = Convert.ToInt32(strPIndex);
                            //保存當前索引
                            txtPageIndex.Text = Gv_Album.PageIndex.ToString();
                        }
                        GvAlbumBind();
                    }
                }
            }
            catch
            {

            }
        }
示例#4
0
        //string strBasePath = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            //strBasePath = Request.PhysicalApplicationPath;
            if (!IsPostBack)
            {
                try
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "22", this.Page);//頁面按鈕權限管控
                    }

                    //判斷是否為修改動作
                     if (Request["KeyValue"] != null)
                     {
                         string strKeyValue = Request["KeyValue"].ToString().Trim();
                         lblFlag.Text = strKeyValue;

                         if (Request["strIndex"] != null && Request["strIndex"].ToString() != "")
                         {
                             string strIndex = Request["strIndex"];
                             Gv_TVPlay.PageIndex = Convert.ToInt32(strIndex);
                             //保存當前索引
                             txtPageIndex.Text = Gv_TVPlay.PageIndex.ToString();
                         }
                         GvTVPlayBind();
                     }
                       //查詢動作
                      else if(Request["SearchKey"]!=null)
                     {

                         string strSearchValue = Request["SearchKey"].ToString().Trim();
                         string[] ArrKeyValue = strSearchValue.Split('=');
                         DataSearchBind(ArrKeyValue[0].Trim().ToString(), ArrKeyValue[1].Trim().ToString(), ArrKeyValue[2].Trim().ToString(), ArrKeyValue[3].Trim().ToString(), ArrKeyValue[4].Trim(), ArrKeyValue[5].Trim());

                      }
                     else {
                             //從Detail頁面返回時設置頁碼索引值
                             if (Request["strPIndex"] != null && Request["strPIndex"].ToString() != "")
                             {
                                 string strPIndex = Request["strPIndex"];
                                 Gv_TVPlay.PageIndex = Convert.ToInt32(strPIndex);

                                 //保存當前頁碼
                                 txtPageIndex.Text = Gv_TVPlay.PageIndex.ToString();
                             }
                              GvTVPlayBind();
                         }
                }

                catch { }
            }
        }
        /// <summary> 
        /// 函數名:Page_Load
        /// 函數功能:加載
        /// 開發者: 劉鋒
        /// 開發日期:2011-03-11
        /// 修改者:
        /// 修改日期:
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "11", this.Page);//頁面按鈕權限管控
                    }

                    //BindArea();
                    //BindType();
                    if (Request["KeyValue"] != null)
                    {
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        lblFlag.Text = strKeyValue;

                        if (Request["strIndex"] != null && Request["strIndex"].ToString() != "")
                        {
                            string strIndex = Request["strIndex"];
                            gdvCurrent.PageIndex = Convert.ToInt32(strIndex);
                        }

                        txtPageIndex.Text = gdvCurrent.PageIndex.ToString();

                        Select("", "", "", "", "", "", "");
                    }
                    else if (Request["SearchKey"] != null)
                    {
                        string strSearchValue = Request["SearchKey"].ToString().Trim();
                        string[] ArrKeyValue = strSearchValue.Split('=');
                        Select(ArrKeyValue[0].Trim().ToString(), "", ArrKeyValue[1].Trim().ToString(), ArrKeyValue[2].Trim().ToString()
                            , "", ArrKeyValue[3].Trim(), ArrKeyValue[4].Trim());
                    }
                    else
                    {
                        //從Detail頁面返回時設置頁碼索引值
                        if (Request["strPIndex"] != null && Request["strPIndex"].ToString() != "")
                        {
                            string strPIndex = Request["strPIndex"];
                            gdvCurrent.PageIndex = Convert.ToInt32(strPIndex);

                            //保存當前頁碼
                            txtPageIndex.Text = gdvCurrent.PageIndex.ToString();
                        }
                        Select("", "", "", "", "", "", "");
                    }
                }
            }
            catch
            { }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["User"] != null)
         {
             User objUser = new User();
             objUser = Session["User"] as User;
             objUser.GetRight(objUser.RoleCode, "88", this.Page);//頁面按鈕權限管控
         }
         BindError();
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "83", this.Page);//頁面按鈕權限管控
                    }

                    if (Request["KeyValue"] == null)
                    {
                        Databind("", "", "", "", "");
                    }
                    else
                    {
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        string[] ArrKeyValue = strKeyValue.Split('=');

                        string strMac = "";
                        string strMeno = "";
                        string strId = "";
                        string strVerName = "";
                        string strVerDesc = "";

                        if (ArrKeyValue.Length != 1)
                        {
                            strMac = ArrKeyValue[0];
                            strMeno = ArrKeyValue[1];
                            strId = ArrKeyValue[2];
                            strVerName = ArrKeyValue[3];
                            strVerDesc = ArrKeyValue[4];
                        }

                        Databind(strMac, strMeno, strId, strVerName, strVerDesc);
                    }
                }
                catch
                {

                }
            }
        }
示例#8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "72", this.Page);//頁面按鈕權限管控
                    }

                    if (Request["KeyValue"] == null)
                    {
                        databind("", "");
                    }

                    else
                    {
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        string[] ArrKeyValue = strKeyValue.Split('=');

                        string strRole = "";
                        string strDesc = "";
                        if (ArrKeyValue.Length != 1)
                        {
                            strRole = ArrKeyValue[0];
                            strDesc = ArrKeyValue[1];
                        }

                        databind(strRole, strDesc);
                        txtSuccess.Text = strKeyValue;
                    }

                    txtKeyValue.Text = "Role";
                }
                catch
                {

                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["User"] != null)
                {
                    User objUser = new User();
                    objUser = Session["User"] as User;
                    objUser.GetRight(objUser.RoleCode, "33", this.Page);//頁面按鈕權限管控
                }

                if (Request["SearchKey"] != null)
                {
                    string strSearchValue = Request["SearchKey"].ToString().Trim();
                    string[] ArrKeyValue = strSearchValue.Split('=');
                    DateSearchBindForMyMusic(ArrKeyValue[0].Trim().ToString(), ArrKeyValue[1].Trim().ToString(), ArrKeyValue[2].Trim().ToString(), ArrKeyValue[3].Trim().ToString(), ArrKeyValue[4].Trim(),ArrKeyValue[5].Trim().ToString());
                }
                else
                {
                    GvMyMusicBind();
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "84", this.Page);//頁面按鈕權限管控
                    }

                    if (Request["KeyValue"] != null)
                    {
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        string[] arrKeyValue = strKeyValue.Split('=');

                        if (arrKeyValue.Length == 1)
                        {
                            GvDataLogBind();
                        }
                        else
                        {
                            GvDataLogSearchBind(arrKeyValue[0].Trim(), arrKeyValue[1].Trim(), arrKeyValue[2].Trim(), arrKeyValue[3].Trim(), arrKeyValue[4].Trim(), arrKeyValue[5].Trim(), arrKeyValue[6].Trim(),arrKeyValue[7].Trim());
                        }
                    }
                    else
                    {
                        GvDataLogBind();
                    }
                }
                catch
                { }
            }
        }
示例#11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (Request["strID"] != null)
                    {
                        txtID.Text = Request["strID"].ToString();
                    }
                    //記錄父頁面的索引值以備返回時使用
                    if (Request["pageIndex"] != null)
                    {
                        txtParentIndex.Text = Request["pageIndex"].ToString();
                        Session["ParentIndex"] = txtParentIndex.Text;
                    }

                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "31", this.Page);//頁面按鈕權限管控
                    }
                    //修改,刪除數據動作后執行
                    if (Request["KeyValue"] != null)
                    {
                        //獲取專輯ID
                        string strID = Request["AlbumID"].ToString();
                        txtID.Text = strID;
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        lblFlag.Text = strKeyValue;

                        //修改動作后設置本頁面頁碼
                        if (Request["strIndex"] != null && Request["strIndex"].ToString() != "")
                        {
                            string strIndex = Request["strIndex"];
                            Gv_Music.PageIndex = Convert.ToInt32(strIndex);

                            txtPageIndex.Text = Gv_Music.PageIndex.ToString();
                        }
                        //綁定修改后信息
                        GvMusicBind(strID);
                        txtParentIndex.Text = Session["ParentIndex"].ToString();
                    }

                    //查詢動作信息綁定
                    else if (Request["SearchKey"] != null)
                    {
                        string strSearchValue = Request["SearchKey"].ToString().Trim();
                        string[] ArrKeyValue = strSearchValue.Split('=');
                        DataSearchBind(ArrKeyValue[0].Trim().ToString(), ArrKeyValue[1].Trim().ToString(), ArrKeyValue[2].Trim().ToString(), ArrKeyValue[3].Trim().ToString(), ArrKeyValue[4].Trim(), ArrKeyValue[5].Trim(), ArrKeyValue[6].Trim());
                        txtID.Text = ArrKeyValue[1].Trim().ToString();
                    }
                    else
                    {
                        string strID = Request["strID"].ToString();
                        GvMusicBind(strID);
                    }
                }
            }
            catch
            {

            }
        }
示例#12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "41", this.Page);//頁面按鈕權限管控
                    }

                    //回傳Key:
                    //若是查詢時標示為SearchKey,且后接查詢參數值
                    //若是其他的動作則為KeyValue,如Add,Delete,Update操作
                    if (Request["SearchKey"] != null){
                        string [] paras = Request["SearchKey"].Split('=');
                        GvPhotoBind(paras);
                    }else{
                        lblFlag.Text = Request["KeyValue"];
                        GvPhotoBind();
                    }
                }
            }
            catch
            {
            }
        }
        /// <summary>
        /// 函數功能:加載
        /// 開發者: 劉鋒
        /// 開發日期:2011-04-06        
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "31", this.Page);//頁面按鈕權限管控
                    }

                    //記錄父頁面的頁碼索引值以備返回時使用
                    if (Request["pageIndex"] != null)
                    {
                        txtParentIndex.Text = Request["pageIndex"].ToString();
                        Session["ParentIndex"] = txtParentIndex.Text;
                    }

                    if (Request["SearchKey"] != null)
                    {
                        string strSearchValue = Request["SearchKey"].ToString().Trim();
                        string[] ArrKeyValue = strSearchValue.Split('=');
                        SelectMore(ArrKeyValue[0], ArrKeyValue[1],ArrKeyValue[2]);

                        txtID.Text = ArrKeyValue[0].Trim().ToString();

                        txtParentIndex.Text = Session["ParentIndex"].ToString();
                    }
                    else if (Request["KeyValue"] != null)
                    {
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        lblFlag.Text = strKeyValue;

                        string channelid=Request["ChannelID"].ToString().Trim();

                        if (Request["PlayingDate"] != null)
                        {
                            string playingDate = Request["PlayingDate"].ToString();
                            SelectMore(channelid, "", playingDate);
                        }
                        else
                        {
                            Select(channelid);
                        }

                        txtID.Text = channelid;

                        txtParentIndex.Text = Session["ParentIndex"].ToString();

                        //txtPageIndex.Text = gdvCurrent.PageIndex.ToString();
                    }
                    else if (Request["strID"].ToString() != null)
                    {
                        string strID = Request["strID"].ToString();
                        Select(strID);

                        txtID.Text = strID;
                    }
                }
            }
            catch
            { }
        }
示例#14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["User"] != null)
                {
                    User objUser = new User();
                    objUser = Session["User"] as User;
                    objUser.GetRight(objUser.RoleCode, "42", this.Page);//頁面按鈕權限管控
                }

                if (Request["SearchKey"] != null)
                {
                    string[] paras = Request["SearchKey"].Split('=');
                    GvMyPhotoBind(paras);
                }
                else
                {
                    GvMyPhotoBind();
                }
            }
        }
示例#15
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                try
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "81", this.Page);//頁面按鈕權限管控
                    }

                    if (Request["KeyValue"] == null)
                    {
                        DataBind("", "","","","","","","","","","");
                    }

                    else
                    {
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        string[] ArrKeyValue = strKeyValue.Split('=');

                        string strMac = "";
                        string strMeno = "";
                        string strName = "";
                        string strTel = "";
                        string strMobile = "";
                        string strRole = "";
                        string strUserId = "";
                        string strSex = "";
                        string strBirthDay = "";
                        string strEmail = "";
                        string strAddress = "";

                        if (ArrKeyValue.Length != 1)
                        {
                            strMac = ArrKeyValue[0];
                            strMeno = ArrKeyValue[1];
                            strName = ArrKeyValue[2];
                            strTel = ArrKeyValue[3];
                            strMobile = ArrKeyValue[4];
                            strRole = ArrKeyValue[5];
                            strUserId = ArrKeyValue[6];
                            strSex = ArrKeyValue[7];
                            strBirthDay = ArrKeyValue[8];
                            strEmail = ArrKeyValue[9];
                            strAddress = ArrKeyValue[10];
                        }

                        DataBind(strMac, strMeno,strName,strTel,strMobile,strRole,strUserId,strSex,strBirthDay,strEmail,strAddress);
                        txtSuccess.Text = strKeyValue;
                    }
                    txtKeyValue.Text = "Mac";
                }
                catch
                {

                }
            }
        }
示例#16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                if (Request["Flag"] != null)
                {
                    string strFlag = Request["Flag"].ToString();
                    if (strFlag == "1")
                    {
                        if (Session["User"] != null)
                        {
                            User objUser = new User();
                            objUser = Session["User"] as User;
                            objUser.GetRight(objUser.RoleCode, "23", this.Page);//頁面按鈕權限管控
                        }

                        txtFlag.Text = "1";//我的電影
                        //綁定我的電影頁面 Edit By tanyi 2011-3-18

                        //當是查詢時 Edit By Tanyi 2011.3.16
                        if (Request["SearchKeyForMovie"] != null)
                        {
                            string strSearchValue = Request["SearchKeyForMovie"].ToString().Trim();
                            string[] ArrKeyValue = strSearchValue.Split('=');
                            DataSearchBind(ArrKeyValue[0].Trim().ToString(), ArrKeyValue[1].Trim().ToString(), ArrKeyValue[2].Trim().ToString(), ArrKeyValue[3].Trim().ToString(), ArrKeyValue[4].Trim(),ArrKeyValue[5].Trim().ToString());
                        }
                        else
                        {
                            BindGVMyMovie();
                        }
                    }
                    else if (strFlag == "2")
                    {
                        if (Session["User"] != null)
                        {
                            User objUser = new User();
                            objUser = Session["User"] as User;
                            objUser.GetRight(objUser.RoleCode, "24", this.Page);//頁面按鈕權限管控
                        }

                        txtFlag.Text = "2";//我的電視劇
                        if (Request["SearchKeyForTV"] != null)
                        {
                            string strSearchValue = Request["SearchKeyForTV"].ToString().Trim();
                            string[] ArrKeyValue = strSearchValue.Split('=');
                            DataSearchBindForTV(ArrKeyValue[0].Trim().ToString(), ArrKeyValue[1].Trim().ToString(), ArrKeyValue[2].Trim().ToString(), ArrKeyValue[3].Trim().ToString(), ArrKeyValue[4].Trim(),ArrKeyValue[5].Trim().ToString());
                        }
                        else
                        {
                            BindTVData();
                        }
                    }

                    Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>startRequest();</script>");
                }
            }
        }