Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var src  = Server.UrlDecode(MyRequest.GetQueryString("src"));
            var name = Server.UrlDecode(MyRequest.GetQueryString("name"));

            if (src != null && File.Exists(Server.MapPath(src)))
            {
                var fileExt = src.Substring(src.LastIndexOf('.') + 1);
                if (Utils.IsOfficeExt(fileExt))
                {
                    ViewOffice(src, name);
                }
                else if (Utils.IsImgExt(fileExt))
                {
                    ViewImage(src, name);
                }
                else if (Utils.IsPdfExt(fileExt))
                {
                    ViewPdf(src, name);
                }
                else if (Utils.IsTxtExt(fileExt))
                {
                    ViewTxt(src, name);
                }
                else
                {
                    this.divViewer.InnerText = "暂时无法支持该类型文件的预览!";
                }
            }
            else
            {
                this.divViewer.InnerText = "无法预览文件!";
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     action = MyEnums.ActionEnum.Add.ToString();
     userId = 0;
     action = MyRequest.GetQueryString("action");
     userId = MyRequest.GetQueryInt("userId");
     if (!Page.IsPostBack)
     {
         // BindId_Type();
         BindAgency();
         //   BindRole();
         if (action == MyEnums.ActionEnum.Edit.ToString())
         {
             if (userId == 0)
             {
                 JscriptMsg("传输参数不正确!", "back", "Error");
                 return;
             }
             ShowInfo(userId);
             this.btnSubmit.Text = "确认保存";
         }
         else
         {
             this.btnSubmit.Text = "确认添加";
         }
     }
 }
Пример #3
0
        private void ShowApplyTitle()
        {
            var m = new BLL.CCOM.Reply_group().GetModel((int)this.apply_id);

            title.HRef          = "ExamList.aspx?fun_id=" + MyRequest.GetQueryString("fun_id");
            this.lblTitle.Text += m.Group_name;
        }
        protected void Button1_OnClick(object sender, EventArgs e)
        {
            var src  = Server.UrlDecode(MyRequest.GetQueryString("src"));
            var name = Server.UrlDecode(MyRequest.GetQueryString("name"));

            DownLoadFile(src, name);
        }
Пример #5
0
        //#region 组合SQL查询语句==========================
        //protected string CombSqlTxt()
        //{
        //    int flag = 0;
        //    int i = 0;
        //    var model = GetAdminInfo_CCOM();
        //    StringBuilder strTemp = new StringBuilder();

        //    BLL.CCOM.Reply_student rs_bll = new BLL.CCOM.Reply_student();
        //    BLL.CCOM.Reply_commission rc_bll = new BLL.CCOM.Reply_commission();
        //    BLL.CCOM.Reply_group rg_bll = new BLL.CCOM.Reply_group();
        //    strTemp.Append("(");
        //    //学生
        //    DataSet ds = rs_bll.GetList("User_id=" + model.User_id);
        //    //if (ds.Tables[0].Rows.Count > 0)
        //    //{
        //    //    flag = 1;
        //    //    strTemp.Append(ds.Tables[0].Rows[0]["Group_id"]);
        //    //    for ( i = 1; i < ds.Tables[0].Rows.Count; i++)
        //    //    {
        //    //        strTemp.Append(","+ds.Tables[0].Rows[i]["Group_id"]);
        //    //    }
        //    //}
        //    //组长
        //    ds = rg_bll.GetList("User_id=" + model.User_id);
        //    if (ds.Tables[0].Rows.Count > 0)
        //    {
        //        if (flag == 0)
        //        {
        //            flag = 1;
        //            strTemp.Append(ds.Tables[0].Rows[0]["Group_id"]);
        //            i = 1;
        //        }
        //        else
        //            i = 0;
        //        for (; i < ds.Tables[0].Rows.Count; i++)
        //        {
        //            strTemp.Append("," + ds.Tables[0].Rows[i]["Group_id"]);
        //        }
        //    }
        //    //组员
        //    //ds = rc_bll.GetList("User_id=" + model.User_id);
        //    //if (ds.Tables[0].Rows.Count > 0)
        //    //{
        //    //    if (flag == 0)
        //    //    {
        //    //        flag = 1;
        //    //        strTemp.Append(ds.Tables[0].Rows[0]["Group_id"]);
        //    //        i = 1;
        //    //    }
        //    //    else
        //    //        i = 0;
        //    //    for (; i < ds.Tables[0].Rows.Count; i++)
        //    //    {
        //    //        strTemp.Append("," + ds.Tables[0].Rows[i]["Group_id"]);
        //    //    }
        //    //}
        //    //if (flag == 0)
        //    //    strTemp.Append("-1");
        //    //strTemp.Append(")");

        //    return strTemp.ToString();
        //}
        //#endregion

        #region 数据绑定=================================
        private void RptBind(string _strWhere, string _order)
        {
            BLL.CCOM.Reply_group bll = new BLL.CCOM.Reply_group();
            int    pageSize          = GetPageSize(15);//每页数量
            int    page        = MyRequest.GetQueryInt("page", 1);
            string keywords    = MyRequest.GetQueryString("keywords");
            int    start_index = pageSize * (page - 1) + 1;

            this.st_index = pageSize * (page - 1) + 1;
            int end_index = pageSize * page;

            if (_strWhere != "")
            {
                _strWhere = "Group_id in" + _strWhere;
            }
            //计算数量
            int totalCount = bll.GetRecordCount(_strWhere);

            //绑定当页
            this.rptList.DataSource = bll.GetListByPage(_strWhere, _order, start_index, end_index);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("MyExamList.aspx", "fun_id={0}&keywords={1}&sort={2}&page={3}", this.fun_id, this.keywords, MyRequest.GetString("sort"), "__id__");

            this.PageContent.InnerHtml = Utils.OutPageList(pageSize, page, totalCount, pageUrl, 8, true);
        }
Пример #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            user_id = GetAdminInfo_CCOM().User_id;
            var agency = new BLL.CCOM.Admin_agency().GetModel("User_id = " + user_id);

            if (agency != null)
            {
                agency_id = agency.Agency_id;
            }
            var period = new BLL.CCOM.Period().GetModel("Period_state = " + DataDic.Period_state_On);

            if (period != null)
            {
                period_id = period.Period_id;
            }

            string str = MyRequest.GetQueryString("major_id");

            if (str != null && str != "")
            {
                major_id = DESEncrypt.Decrypt(MyRequest.GetQueryString("major_id"));
            }

            if (!Page.IsPostBack)
            {
                RalBind();
            }
            this.major_id = this.ddlMajor.SelectedValue;
        }
Пример #7
0
        //删除
        protected void lbtSingleDelete_Click(object sender, EventArgs e)
        {
            BLL.CCOM.Topic bll = new BLL.CCOM.Topic();


            var lbtn = sender as LinkButton;

            if (lbtn != null)
            {
                var  id     = Int32.Parse(DESEncrypt.Decrypt(lbtn.ToolTip.ToString()));
                bool result = true;
                try
                {
                    result = bll.Delete(id);
                }
                catch
                {
                    result = false;
                }
                string keywords = MyRequest.GetQueryString("keywords");
                int    page     = MyRequest.GetQueryInt("page", 1);
                if (result == true)
                {
                    //JscriptMsg("删除成功!", Utils.CombUrlTxt("ManagerList.aspx", "fun_id={0}&keywords={1}&page={2}",
                    //    DESEncrypt.Encrypt(this.fun_id), keywords, page.ToString()), "Success");
                    JscriptMsg("删除成功!", Utils.CombUrlTxt("TopicList.aspx", "fun_id={0}&keywords={1}&page={2}", this.fun_id, keywords, page.ToString()), "Success");
                    // Response.Redirect("TopicList.aspx?fun_id=" + get_fun_id("CCOM/TopicManage/TopicList.aspx"));
                }
                else
                {
                    JscriptMsg("删除失败!", Utils.CombUrlTxt("TopicList.aspx", "fun_id={0}&keywords={1}&page={2}", DESEncrypt.Encrypt(this.fun_id), keywords, page.ToString()), "Error");
                }
            }
        }
Пример #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            action      = MyRequest.GetQueryString("action");
            this.fun_id = DESEncrypt.Decrypt(get_fun_id("CCOM/ResManage/JudgeAdd.aspx"));
            var t_signid = MyRequest.GetQueryString("id");

            if (t_signid != "")
            {
                signId = long.Parse(DESEncrypt.Decrypt(t_signid));
            }
            if (!Page.IsPostBack)
            {
                if (action == MyEnums.ActionEnum.Edit.ToString())
                {
                    if (signId == 0)
                    {
                        JscriptMsg("传输参数不正确!", "back", "Error");
                        return;
                    }
                    BindSignInfo(signId);
                    this.btnSubmit.Text = "确认保存";
                }
                else
                {
                    this.btnSubmit.Text = "确认添加";
                }
            }
        }
Пример #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            String keywords = MyRequest.GetQueryString("keywords");

            if (!Page.IsPostBack)
            {
                string            year  = DateTime.Now.Year.ToString();
                Model.CCOM.Period model = new BLL.CCOM.Period().GetModel(" Period_year=" + year);
                if (model == null)
                {
                    this.lblOpenThisYear.Visible = true;
                }
                else
                {
                    this.lblOpenThisYear.Visible = false;
                }
                year  = (DateTime.Now.Year + 1).ToString();
                model = new BLL.CCOM.Period().GetModel(" Period_year=" + year);
                if (model == null)
                {
                    this.lblOpenLastYear.Visible = true;
                }
                else
                {
                    this.lblOpenLastYear.Visible = false;
                }
                this.keywordTab0 = keywords;
                RptBind(CombSqlTxt(keywords), " Period_id desc ");
            }
        }
Пример #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            user_id = GetAdminInfo_CCOM().User_id;
            var agency = new BLL.CCOM.Admin_agency().GetModel("User_id = " + user_id);

            if (agency != null)
            {
                agency_id = agency.Agency_id;
            }

            var period = new BLL.CCOM.Period().GetModel("Period_state = " + DataDic.Period_state_On);

            if (period != null)
            {
                period_id = period.Period_id;
            }
            string str = MyRequest.GetQueryString("major_id");

            if (str != null && str != "")
            {
                major_id = DESEncrypt.Decrypt(MyRequest.GetQueryString("major_id"));
            }

            if (!Page.IsPostBack)
            {
                keywords = MyRequest.GetQueryString("keywords");
                if (Tools.CheckParams(keywords))
                {
                    keywords = "";
                }
                this.txtKeywords.Text = keywords;

                RalBind();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            esn_id   = DESEncrypt.Decrypt(MyRequest.GetQueryString("esn_id"));
            major_id = DESEncrypt.Decrypt(MyRequest.GetQueryString("major_id"));

            string sqlStr    = "SELECT DISTINCT Judge_id FROM Examination_subject_score WHERE Esn_id=" + esn_id + " AND User_id IN (SELECT User_id FROM User_property WHERE Agency_id=" + major_id + ")";
            var    judgeList = DBSQL.Query(sqlStr);

            count = judgeList.Tables[0].Rows.Count;
            if (count > 0)
            {
                ds = judgeList;
            }

            if (!Page.IsPostBack)
            {
                keywords = MyRequest.GetQueryString("keywords");
                if (Tools.CheckParams(keywords))
                {
                    keywords = "";
                }
                this.txtKeywords.Text = keywords;

                RptBind();
            }
        }
Пример #12
0
        public void ProcessRequest(HttpContext context)
        {
            string data   = MyRequest.GetQueryString("data");
            string result = string.Empty;

            if (data != null && data.Length > 0)
            {
                try
                {
                    result = DESEncrypt.Decrypt(data);
                }
                catch
                {
                }
            }
            else
            {
                context.Response.Write("传入数据有误");
                return;
            }
            if (!File.Exists(HttpContext.Current.Server.MapPath("/AdminMetro/CCOM/Certificate/BarCode_image/" + result + ".png")))
            {
                System.IO.MemoryStream ms    = new System.IO.MemoryStream();
                System.Drawing.Image   myimg = BarCodeHelper.MakeBarcodeImage(result, 2, true);
                myimg.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
                myimg.Save(HttpContext.Current.Server.MapPath("/AdminMetro/CCOM/Certificate/BarCode_image/" + result + ".png"));
            }
            context.Response.Write("/AdminMetro/CCOM/Certificate/BarCode_image/" + result + ".png");
        }
Пример #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.fun_id = MyRequest.GetQueryString("fun_id");

            if (!Page.IsPostBack)
            {
                //判断是不是管理员登录
                //Model.CCOM.User_information model = GetAdminInfo_CCOM();
                //BLL.CCOM.Period per_bll = new BLL.CCOM.Period();
                //Model.CCOM.Period per_model = per_bll.GetModel(" Period_state=1");
                //BLL.CCOM.Subject agency_bll = new BLL.CCOM.Subject();
                //int agency_id = new BLL.CCOM.View_Admin().GetModel(" User_id='" + GetAdminInfo_CCOM().User_id + "'").Agency_id;
                //string agency_group = GetSonXiList(agency_id);
                //if (per_model != null)
                //{
                //    this.ddlSubject.DataSource = agency_bll.GetList(" Subject_level=2 and Period_id='" + per_model.Period_id + "' and Manage_Agency_id in (" + agency_group + ")");
                //}
                //else {
                //    this.ddlSubject.DataSource = agency_bll.GetList(" 1=0");
                //}
                //this.ddlSubject.DataTextField = "Subject_title";
                //this.ddlSubject.DataValueField = "Subject_id";
                //this.ddlSubject.DataBind();
                //this.ddlSubject.Items.Insert(0, new ListItem("全选", "0"));
                //this.ddlSubject.SelectedValue = subject;
                BindRpt();
                //  CheckIsFinish();
            }
        }
Пример #14
0
        public void ProcessRequest(HttpContext context)
        {
            //取得处事类型
            string action = MyRequest.GetQueryString("action");

            switch (action)
            {
            case "SingleFile":     //单文件
                SingleFile(context);
                break;

            case "MultipleFile":     //多文件
                MultipleFile(context);
                break;

            case "AttachFile":     //附件
                AttachFile(context);
                break;

            case "EditorFile":     //编辑器文件
                EditorFile(context);
                break;

            case "ManagerFile":     //管理文件
                ManagerFile(context);
                break;

            case "WordExtract":     //word抽取
                WordExtract(context);
                break;
            }
        }
Пример #15
0
        protected int TotalNumber = 0;   //学工处通知使用的总人数和



        protected void Page_Load(object sender, EventArgs e)
        {
            //this.fun_id = get_fun_id("CCOM/notice/ReleaseOrEditNotice.aspx");
            string _action = MyRequest.GetQueryString("action");

            this.keywords = MyRequest.GetQueryString("keywords");
            if (!string.IsNullOrEmpty(_action) && _action == MyEnums.ActionEnum.Edit.ToString())
            {
                this.action = MyEnums.ActionEnum.Edit.ToString();   //修改类型
                long.TryParse(DESEncrypt.Decrypt(MyRequest.GetQueryString("id")), out this.pushId);
                if (this.pushId == 0)
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                    return;
                }
                if (!new BLL.CCOM.Notice().Exists(this.pushId))
                {
                    JscriptMsg("通知不存在或已被删除!", "back", "Error");
                    return;
                }
            }
            if (!IsPostBack)
            {
                //绑定推送类别
                //BindPushType();
                if (action == MyEnums.ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.pushId);
                }
            }
        }
        //绑定通知类别
        //private void BindPushType()
        //{
        //    var typeList = new BLL.CCOM.Notice_type().GetModelList("");

        //    if(typeList!=null&&typeList.Count>0)
        //    {
        //        StringBuilder sb = new StringBuilder();
        //        var className = "btn btn-success";
        //        var className1 = "btn";
        //        string noticeTypeId = MyRequest.GetQueryString("notice_type_id");
        //        if(noticeTypeId==null||noticeTypeId.Length==0)//若为传值则默认为未分类
        //        {
        //            sb.Append("<a href=\"Notice_list_manager.aspx?notice_type_id=" + DESEncrypt.Encrypt("0") + "&notice_type=" + this.NoticeType + "&fun_id=" + DESEncrypt.Encrypt(this.fun_id) + "\" class='" + className + "'>");
        //            sb.Append("未分类</a>&nbsp;&nbsp;");
        //            for(int i=0;i<typeList.Count;i++)
        //            {
        //                sb.Append("<a href=\"Notice_list_manager.aspx?notice_type_id=" + DESEncrypt.Encrypt(typeList[i].Notice_type_id.ToString()) + "&notice_type=" + this.NoticeType + "&fun_id=" + DESEncrypt.Encrypt(this.fun_id) + "\" class='" + className1 + "'>");
        //                sb.Append(typeList[i].Notice_type_name + "</a>&nbsp;&nbsp;");
        //            }
        //            this.NoticeTypeDiv.InnerHtml = sb.ToString();
        //        }
        //        else
        //        {
        //            try
        //            {
        //                long notice_type_id = long.Parse(DESEncrypt.Decrypt(noticeTypeId));
        //                if(notice_type_id==0)
        //                {
        //                    sb.Append("<a href=\"Notice_list_manager.aspx?notice_type_id=" + DESEncrypt.Encrypt("0") + "&notice_type=" + this.NoticeType + "&fun_id=" + DESEncrypt.Encrypt(this.fun_id) + "\" class='" + className + "'>");
        //                    sb.Append("未分类</a>&nbsp;&nbsp;");
        //                    for (int i = 0; i < typeList.Count; i++)
        //                    {
        //                        sb.Append("<a href=\"Notice_list_manager.aspx?notice_type_id=" + DESEncrypt.Encrypt(typeList[i].Notice_type_id.ToString()) + "&notice_type=" + this.NoticeType + "&fun_id=" + DESEncrypt.Encrypt(this.fun_id) + "\" class='" + className1 + "'>");
        //                        sb.Append(typeList[i].Notice_type_name + "</a>&nbsp;&nbsp;");
        //                    }
        //                }
        //                else
        //                {
        //                    sb.Append("<a href=\"Notice_list_manager.aspx?notice_type_id=" + DESEncrypt.Encrypt("0") + "&notice_type=" + this.NoticeType + "&fun_id=" + DESEncrypt.Encrypt(this.fun_id) + "\" class='" + className1 + "'>");
        //                    sb.Append("未分类</a>&nbsp;&nbsp;");
        //                    for (int i = 0; i < typeList.Count; i++)
        //                    {
        //                        if(typeList[i].Notice_type_id==notice_type_id)
        //                        {
        //                            sb.Append("<a href=\"Notice_list_manager.aspx?notice_type_id=" + DESEncrypt.Encrypt(typeList[i].Notice_type_id.ToString())+"&notice_type="+this.NoticeType + "&fun_id=" + DESEncrypt.Encrypt(this.fun_id) + "\" class='" + className + "'>");
        //                            sb.Append(typeList[i].Notice_type_name + "</a>&nbsp;&nbsp;");
        //                        }
        //                        else
        //                        {
        //                            sb.Append("<a href=\"Notice_list_manager.aspx?notice_type_id=" + DESEncrypt.Encrypt(typeList[i].Notice_type_id.ToString()) + "&notice_type=" + this.NoticeType + "&fun_id=" + DESEncrypt.Encrypt(this.fun_id) + "\" class='" + className1 + "'>");
        //                            sb.Append(typeList[i].Notice_type_name + "</a>&nbsp;&nbsp;");
        //                        }
        //                    }
        //                }
        //                this.NoticeTypeDiv.InnerHtml = sb.ToString();
        //            }
        //            catch
        //            {

        //            }
        //        }
        //    }

        //}

        #region 数据绑定=================================
        private void RptBind(string _strWhere, string _order)
        {
            int    pageSize    = GetPageSize(10); //每页数量
            int    page        = MyRequest.GetQueryInt("page", 1);
            string keywords    = MyRequest.GetQueryString("keywords");
            int    start_index = pageSize * (page - 1) + 1;
            int    end_index   = pageSize * page;

            this.txtKeywords.Text = keywords;

            var bll = new BLL.CCOM.Notice();

            //计算数量
            int totalCount = bll.GetRecordCount(_strWhere);

            //绑定当页
            var ds = bll.GetListByPage(_strWhere, _order, start_index, end_index);

            this.rptList.DataSource = ds;
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("Notice_list_manager.aspx", "fun_id={0}&keywords={1}&page={2}&notice_type_id={3}", DESEncrypt.Encrypt(this.fun_id), this.keywords, "__id__", DESEncrypt.Encrypt(this.ptId.ToString()));

            this.PageContent.InnerHtml = Utils.OutPageList(pageSize, page, totalCount, pageUrl, 8, true);
        }
Пример #17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     // ea_id = DESEncrypt.Decrypt(MyRequest.GetQueryString("ea_id"));
     id1 = DESEncrypt.Decrypt(MyRequest.GetQueryString("id1"));
     id2 = DESEncrypt.Decrypt(MyRequest.GetQueryString("id2"));
     id3 = MyRequest.GetQueryString("id3");
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            //this.fun_id = get_fun_id("CCOM/notice/Notice_list_manager.aspx");
            //string _id = MyRequest.GetQueryString("notice_type_id");
            string _type = MyRequest.GetQueryString("notice_type");

            if (_type != null && _type.Length > 0)
            {
                NoticeType = int.Parse(_type);
            }
            //if(_id!=null&&_id.Length>0)
            //{
            //    this.ptId = long.Parse(DESEncrypt.Decrypt(_id));
            //}
            this.keywords = MyRequest.GetQueryString("keywords");
            if (!IsPostBack)
            {
                RptBind(CombSqlTxt(this.ptId, this.keywords), " Notice_date DESC ");
            }
            if (NoticeType == 1)
            {
                this.image_word_notice.CssClass = "btn btn-success";
                this.word_notice.CssClass       = "btn";
                //BindPushType();
            }
            else
            {
                this.image_word_notice.CssClass = "btn";
                this.word_notice.CssClass       = "btn btn-success";
            }
        }
Пример #19
0
        private void RptBind(string _strWhere, string _order)
        {
            int    pageSize    = GetPageSize(15); //每页数量
            int    page        = MyRequest.GetQueryInt("page", 1);
            string keywords    = MyRequest.GetQueryString("keywords");
            int    start_index = pageSize * (page - 1) + 1;

            this.st_index = pageSize * (page - 1) + 1;
            int end_index = pageSize * page;

            this.txtKeywords.Value = keywords;

            BLL.CCOM.View_User bll = new BLL.CCOM.View_User();
            //计算数量
            int totalCount = bll.GetRecordCount(_strWhere);

            //绑定当页
            this.rptList.DataSource = bll.GetListByPage(_strWhere, _order, start_index, end_index);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("ScoreList.aspx", "fun_id={0}&keywords={1}&page={2}", this.fun_id, this.keywords, "__id__");

            this.PageContent.InnerHtml = Utils.OutPageList(pageSize, page, totalCount, pageUrl, 8, true);
        }
Пример #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.fun_id = MyRequest.GetQueryString("fun_id");

            if (!Page.IsPostBack)
            {
                //判断是不是管理员登录
                //Model.CCOM.User_information model = GetAdminInfo_CCOM();
                //if (model.User_type != 6)
                //    InnerRedirect(MyEnums.RediirectErrorEnum.NotAdmin);

                //绑定机构下拉菜单
                this.ddlOrgan.DataSource     = GetOrgList_DataSet(false);
                this.ddlOrgan.DataTextField  = "Agency_name";
                this.ddlOrgan.DataValueField = "Agency_id";
                this.ddlOrgan.DataBind();
                this.ddlOrgan.Items.Insert(0, new ListItem("全选", "0"));
                //绑定角色下拉菜单
                new BLL.CCOM.Role().BindDDL(this.ddlprovence);
                //this.ddlprovence.DataSource = GetOrgList_DataSet(false);
                //this.ddlprovence.DataTextField = "Role_name";
                //this.ddlprovence.DataValueField = "Role_id";
                //this.ddlprovence.DataBind();
                //new BLL.CCOM.Province().BindDDL(this.ddlprovence);
                this.ddlprovence.Items.Insert(0, new ListItem("全选", "0"));
                ListItem it = this.ddlprovence.Items.FindByValue("1");
                this.ddlprovence.Items.Remove(it);
                //ListItem it2 = this.ddlprovence.Items.FindByValue("4");
                //this.ddlprovence.Items.Remove(it2);
                BindRpt();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            var src  = Server.UrlDecode(MyRequest.GetQueryString("src"));
            var name = Server.UrlDecode(MyRequest.GetQueryString("name"));

            if (src != null)
            {
                var fileExt = src.Substring(src.LastIndexOf('.') + 1);
                if (Utils.IsTxtExt(fileExt))
                {
                    //读取文件显示
                    if (File.Exists(Server.MapPath(src)))
                    {
                        ShowFileName(src, name);
                        //var content = FileOperate.Read_Txt(Server.MapPath(src), code);
                        var content = FileOperate.ReadFile(Server.MapPath(src), Encoding.Default);
                        content = content.Replace("\n", "<br />");
                        this.txtContainner.InnerHtml = content;
                        //ResponsePreview(src);
                    }
                    else
                    {
                        this.txtContainner.InnerHtml = "预览文件不存在!";
                    }
                }
            }
        }
Пример #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var period = new BLL.CCOM.Period().GetModel("Period_state = 1");

            if (period != null)
            {
                period_id = period.Period_id;
            }

            pro_id = MyRequest.GetQueryString("pro_id");
            if (!string.IsNullOrEmpty(pro_id))//编辑
            {
                this.pro_id = DESEncrypt.Decrypt(pro_id);
            }

            if (!Page.IsPostBack)
            {
                keywords = MyRequest.GetQueryString("keywords");
                if (Tools.CheckParams(keywords))
                {
                    keywords = "";
                }
                this.txtKeywords.Text = keywords;

                RptBind();
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     //获取SchoolUserID
     try
     {
         string getID = DESEncrypt.Decrypt(MyRequest.GetQueryString("id"));
         if (getID == "")
         {
             Page.Title = "基本信息";
             this.id    = GetAdminInfo_CCOM().User_id;
         }
         else
         {
             Page.Title = "管理考生";
             this.id    = long.Parse(DESEncrypt.Decrypt(MyRequest.GetQueryString("id")));
         }
     }
     catch
     {
         Response.Redirect("/adminmetro/CCOM/center.aspx");
     }
     if (!Page.IsPostBack)
     {
         bllBasicFace(id);
         bllBasicInfo(id);
         bllPictureInfo(id);
         bllNatureInfo(id);
         bllStuInfo(id);
         MemberBing(id);
         CheckInfo();
     }
 }
Пример #24
0
 protected void Page_Load(object sender, EventArgs e)
 {
     studentID = 0;
     if (GetAdminInfo_CCOM().Role_id == 3)
     {
         studentID = GetAdminInfo_CCOM().User_id;
     }
     else
     {
         studentID = long.Parse(DESEncrypt.Decrypt(MyRequest.GetQueryString("studentID")));
     }
     this.MyUserID.Text = studentID.ToString();
     if (!Page.IsPostBack)
     {
         if (studentID == 0)
         {
             JscriptMsg("传输参数不正确!", "back", "Error");
             return;
         }
         string ht = "";
         Model.CCOM.Topic_relation model = new Model.CCOM.Topic_relation();
         model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + studentID + "and Accept_state=1");
         if (model == null)
         {
             ht = " <div class=\"content\" align=\"center\"><h3>您尚无选题<h3></div>";
             this.print_div.InnerHtml = ht;
         }
         else
         {
             AddSubmitButton();
             ShowInfo();
         }
     }
 }
Пример #25
0
        private void RptBind(string _strWhere, string _order)
        {
            int    pageSize    = GetPageSize(15); //每页数量
            int    page        = MyRequest.GetQueryInt("page", 1);
            string keywords    = MyRequest.GetQueryString("keywords");
            int    start_index = pageSize * (page - 1) + 1;
            int    end_index   = pageSize * page;

            this.txtKeywords.Text = keywords;

            var bll = new BLL.CCOM.SMS_apply_record();
            //计算数量
            int totalCount = bll.GetRecordCount(_strWhere);

            //绑定当页
            if (check_type == 0 || check_type == -1)
            {
                this.rptList.DataSource = bll.GetListByPage(_strWhere, _order, start_index, end_index);
                this.rptList.DataBind();
            }
            else
            {
                this.Repeater1.DataSource = bll.GetListByPage(_strWhere, _order, start_index, end_index);
                this.Repeater1.DataBind();
            }

            //绑定页码
            txtPageNum.Text = pageSize.ToString();

            string pageUrl = Utils.CombUrlTxt("Manage_SMS_apply.aspx", "fun_id={0}&keywords={1}&page={2}", this.fun_id, this.keywords, "__id__");

            this.PageContent.InnerHtml = Utils.OutPageList(pageSize, page, totalCount, pageUrl, 8, true);
        }
Пример #26
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.IsPostBack)
     {
         String filePath = HttpUtility.UrlDecode(MyRequest.GetQueryString("address"));
         String fileName = HttpUtility.UrlDecode(MyRequest.GetQueryString("name"));
         filePath = Server.MapPath(filePath);
         var file = new System.IO.FileInfo(filePath);
         if (System.IO.File.Exists(filePath) & filePath.Contains("upload"))
         {
             Response.Clear();
             Response.AddHeader("Content-Disposition",
                                "attachment;   filename=" + HttpUtility.UrlEncode(fileName));
             Response.AddHeader("Content-Length", file.Length.ToString());
             Response.ContentType = "application/octet-stream";
             //Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8");
             Response.WriteFile(file.FullName);
             Response.Flush();
             //Response.End();
         }
         else
         {
             Response.Write("附件不存在!");
             Response.Flush();
         }
     }
 }
        private void RptBind(string _strWhere, string _order)
        {
            int    pageSize    = GetPageSize(15); //每页数量
            int    page        = MyRequest.GetQueryInt("page", 1);
            string keywords    = MyRequest.GetQueryString("keywords");
            int    start_index = pageSize * (page - 1) + 1;

            this.st_index = pageSize * (page - 1) + 1;
            int end_index = pageSize * page;

            this.txtKeywords.Value = keywords;

            BLL.CCOM.Topic bll = new BLL.CCOM.Topic();
            //计算数量
            int totalCount = bll.GetRecordCount(_strWhere);

            //绑定当页
            this.rptList.DataSource = bll.GetListByPage(_strWhere, _order, start_index, end_index);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("StudentChoose.aspx", "fun_id={0}&keywords={1}&sort={2}&page={3}", this.fun_id, this.keywords, MyRequest.GetString("sort"), "__id__");

            this.PageContent.InnerHtml = Utils.OutPageList(pageSize, page, totalCount, pageUrl, 8, true);

            //绑定我的选题

            BLL.CCOM.View_Selete_Topic selete_bll = new BLL.CCOM.View_Selete_Topic();
            this.rptList2.DataSource = selete_bll.GetList(" Student_id =" + GetAdminInfo_CCOM().User_id);
            //this.rptList2.DataSource = selete_bll.GetListByPage(_strWhere + "and Student_id ="+GetAdminInfo_CCOM().User_id, _order, start_index, end_index);
            this.rptList2.DataBind();
        }
        private void RptBind(string _order)
        {
            string _strWhere = "";
            string str       = GetStudentID();

            if (str != "")
            {
                _strWhere += "Student_id in (" + str + ")";
            }
            else
            {
                _strWhere += "Student_id=-1";
            }
            int    pageSize    = GetPageSize(15); //每页数量
            int    page        = MyRequest.GetQueryInt("page", 1);
            string keywords    = MyRequest.GetQueryString("keywords");
            int    start_index = pageSize * (page - 1) + 1;

            this.st_index = pageSize * (page - 1) + 1;
            int end_index = pageSize * page;

            BLL.CCOM.View_Selete_Topic bll = new BLL.CCOM.View_Selete_Topic();
            //计算数量
            // int totalCount = bll.GetRecordCount(_strWhere);
            //绑定我的选题

            this.rptList.DataSource = bll.GetListByPage(_strWhere, _order, start_index, end_index);
            this.rptList.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            user_id = GetAdminInfo_CCOM().User_id;
            var agency = new BLL.CCOM.Admin_agency().GetModel("User_id = " + user_id);

            if (agency != null)
            {
                agency_id = agency.Agency_id;
            }

            string str = MyRequest.GetQueryString("major_id");

            if (str != null && str != "")
            {
                major_id = DESEncrypt.Decrypt(MyRequest.GetQueryString("major_id"));
            }

            var period = new BLL.CCOM.Period().GetModel("Period_state = " + DataDic.Period_state_On);

            if (period != null)
            {
                period_id = period.Period_id;
            }

            if (!Page.IsPostBack)
            {
                RalBind();

                string strWhere = " Major_Agency_id = " + major_id + " AND Subject_level=2 AND Period_id=" + period_id;
                string order    = "";
                RptBind(strWhere, order);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            action = MyRequest.GetQueryString("action");
            var t_signid = MyRequest.GetQueryString("id");

            this.selectid = MyRequest.GetQueryString("selectid");
            if (t_signid != "")
            {
                signId = long.Parse(DESEncrypt.Decrypt(t_signid));
            }
            if (selectid.Equals(""))
            {
                selectid = "1";
            }

            if (!Page.IsPostBack)
            {
                if (action == MyEnums.ActionEnum.Edit.ToString())
                {
                    if (signId == 0)
                    {
                        JscriptMsg("传输参数不正确!", "back", "Error");
                        return;
                    }
                    this.ddlResourceType.Enabled = false;
                    BindSignInfo(signId);
                    this.btnSubmit.Text = "确认保存";
                }
                else
                {
                    this.ddlResourceType.Enabled = true;
                    this.btnSubmit.Text          = "确认添加";
                }
            }
        }