Пример #1
0
 //转到第几页
 protected void btnGoto_Click(object sender, EventArgs e)
 {
     HyCommon HyCommon = new HyCommon();
     string pageUrl = HyCommon.CombUrlTxt("list_content.aspx", "page={0}&rnd={1}&cid={2}",
         this.txtGotoPage.Text, System.Guid.NewGuid().ToString(), this.txtcid_url.Text);
     Response.Redirect(pageUrl);
 }
Пример #2
0
    //批量删除
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        HyCommon HyCommon = new HyCommon();
        HyContent HyContent = new HyContent();
        string ls_tip = "删除成功!";
        for (int i = 0; i < rptList.Items.Count; i++)
        {
            //int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
            string id = ((HiddenField)rptList.Items[i].FindControl("hidId")).Value;
            CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
            if (cb.Checked)
            {
                //删除记录
                HyContent.ID = int.Parse(id);
                HyContent.Delete();

            }
        }
        string pageUrl = HyCommon.CombUrlTxt("list_content.aspx", "page={0}&rnd={1}&cid={2}",
            "" + this.txtPage.Text + "", "" + System.Guid.NewGuid().ToString() + "", "" + this.txtcid_url.Text + "");

        //写系统日志
        HyCommon.WriteLog("删除", "批量删除文章记录", Session["uid"].ToString(), Session["uname"].ToString());
        Response.Write("<script>alert('" + ls_tip + "');window.location='" + pageUrl + "';</script>");
    }
Пример #3
0
 //批量删除
 protected void btndelinfo_Click(object sender, EventArgs e)
 {
     HyCommon HyCommon = new HyCommon();
     question question = new question();
     String[] v_uids = this.txtuids.Value.Split(',');
     for (int i = 0; i < v_uids.Length; i++)
     {
         question.Delete(v_uids[i]);
     }
     string pageUrl = HyCommon.CombUrlTxt("questionList.aspx", "page={0}&rnd={1}", "" + this.txtPage.Text + "", "" + System.Guid.NewGuid().ToString() + "");
     ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>tip('数据已经被成功删除!','" + pageUrl + "');</script>");
 }
Пример #4
0
 //删除
 protected void btndelinfo_Click(object sender, EventArgs e)
 {
     HyCommon HyCommon = new HyCommon();
     string pageUrl = HyCommon.CombUrlTxt(ls_url, "page={0}&rnd={1}", page.ToString(), System.Guid.NewGuid().ToString());
     string ls_tip = "删除成功!";
     String[] v_uids = this.txtuids.Value.Split(',');
     for (int i = 0; i < v_uids.Length; i++)
     {
         HyOperationlog HyOperationlog = new HyOperationlog();
         HyOperationlog.id = v_uids[i];
         HyOperationlog.Delete();
     }
     //写系统日志
     Response.Write("<script>alert('" + ls_tip + "');window.location='" + pageUrl + "';</script>");
 }
Пример #5
0
 //批量删除
 protected void btndelinfo_Click(object sender, EventArgs e)
 {
     HyCommon HyCommon = new HyCommon();
     HyUser Hyuser = new HyUser();
     string ls_tip = "删除成功!";
     String[] v_uids = this.txtuids.Value.Split(',');
     for (int i = 0; i < v_uids.Length; i++)
     {
         Hyuser.id = v_uids[i];
         Hyuser.Deletebyid();
     }
     string pageUrl = HyCommon.CombUrlTxt("list_user.aspx", "page={0}&rnd={1}", "" + this.txtPage.Text + "", "" + System.Guid.NewGuid().ToString() + "");
     //写系统日志
     HyCommon.WriteLog("删除", "批量删除用户记录", Session["uid"].ToString(), Session["uname"].ToString());
     Response.Write("<script>alert('" + ls_tip + "');window.location='" + pageUrl + "';</script>");
 }
Пример #6
0
    // 数据绑定
    private void RptBind()
    {
        HyCommon HyCommon = new HyCommon();
        if (this.Request.QueryString["page"] != null)
        {
            this.page = int.Parse(HyCommon.Filter(this.Request.QueryString["page"].ToString()));
        }
        this.txtPageNum.Text = this.pageSize.ToString();
        HyUser Hyuser = new HyUser();
        DataTable dt;

        //if (this.txtKeywords.Text != "")
        //{
        //    if (this.txtbmid.Text == "")
        //    {
        //        dt = Hyuser.GetusersbynameforCX(this.txtKeywords.Text, pageSize, page);
        //    }
        //    else
        //    {
        //        dt = Hyuser.GetusersbydeptidforCX(this.txtbmid.Text, this.txtKeywords.Text, pageSize, page);
        //    }
        //}
        //else
        //{
        //    if (this.txtbmid.Text == "")
        //    {
        Hyuser.hy_username = this.txtKeywords.Text;
        Hyuser.hy_deptid = this.ddlbmmc.Text;
        //显示所有用户
        dt = Hyuser.GetusersOrderbydeptsortandusersort(pageSize, page);
        this.totalCount = Hyuser.GetusersAll();
        //    }
        //    else
        //    {
        //        //按部门ID显示
        //        dt = Hyuser.Getusersbydeptid(this.txtbmid.Text, pageSize, page);
        //    }
        //}
        this.lblcount.Text = totalCount.ToString();
        rptList.DataSource = dt;
        rptList.DataBind();
        string pageUrl = HyCommon.CombUrlTxt(ls_url, "page={0}&rnd={1}&keywords={2}&deptid={3}", "__id__", System.Guid.NewGuid().ToString(), this.txtKeywords.Text, this.ddlbmmc.Text);
        PageContent.InnerHtml = HyCommon.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
Пример #7
0
 //设置分页数量
 protected void txtPageNum_TextChanged(object sender, EventArgs e)
 {
     HyCommon HyCommon = new HyCommon();
     int _pagesize;
     if (int.TryParse(txtPageNum.Text.Trim(), out _pagesize))
     {
         if (_pagesize > 0)
         {
             HyCommon.WriteCookie("page_size", _pagesize.ToString(), 43200);
         }
     }
     Response.Redirect(HyCommon.CombUrlTxt(ls_url, "rnd={1}&keywords={2}&deptid={3}", System.Guid.NewGuid().ToString(), this.txtKeywords.Text, this.ddlbmmc.Text));
 }
Пример #8
0
 //关健字查询
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     HyCommon HyCommon = new HyCommon();
     string pageUrl = HyCommon.CombUrlTxt(ls_url, "page={0}&rnd={1}&keywords={2}", page.ToString(), System.Guid.NewGuid().ToString(), this.txtKeywords.Text);
     Response.Redirect(pageUrl);
 }
Пример #9
0
 // 数据绑定
 private void RptBind()
 {
     HyCommon HyCommon = new HyCommon();
     //获取当前页数
     if (this.Request.QueryString["page"] != null)
     {
         this.page = int.Parse(HyCommon.Filter(this.Request.QueryString["page"].ToString()));
     }
     this.txtPageNum.Text = this.pageSize.ToString();
     ZJ_TourGuide ZJ_TourGuide = new ZJ_TourGuide();
     //对类字段进行赋值
     ZJ_TourGuide.Name = this.txtName.Text;
     ZJ_TourGuide.Gender = this.ddl_sex.SelectedValue;
     ZJ_TourGuide.DYLevel = this.ddl_grade.SelectedValue;
     ZJ_TourGuide.NatureOfWork = this.ddl_properties.SelectedValue;
     ZJ_TourGuide.rep1 = this.ddl_recommend.SelectedValue;
     ZJ_TourGuide.IdentityCertificate = this.txt_nonumber.Text;
     ZJ_TourGuide.CardID = this.txttx_guideNo.Text;
     //获取数据
     DataTable dt = ZJ_TourGuide.getDataPage(pageSize, page);
     this.totalCount = ZJ_TourGuide.getDataCount();
     this.lblcount.Text = totalCount.ToString();
     rptList.DataSource = dt;
     rptList.DataBind();
     //地址传递数据
     string pageUrl = HyCommon.CombUrlTxt(ls_url, "page={0}&rnd={1}&txtname={2}&ddl_sex={3}&ddl_grade={4}&ddl_properties={5}&ddl_recommend={6}&txt_nonumber={7}&txttx_guideNo={8}", "__id__", System.Guid.NewGuid().ToString(), this.txtName.Text, this.ddl_sex.SelectedValue, this.ddl_grade.SelectedValue, this.ddl_properties.SelectedValue, this.ddl_recommend.SelectedValue, this.txt_nonumber.Text, this.txttx_guideNo.Text);
     PageContent.InnerHtml = HyCommon.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
 }
Пример #10
0
    // 数据绑定
    private void RptBind()
    {
        HyOperationlog hyOperationlog = new HyOperationlog();
        HyCommon HyCommon = new HyCommon();
        //对页数进行过滤
        if (this.Request.QueryString["page"] != null)
        {
            this.page = int.Parse(HyCommon.Filter(this.Request.QueryString["page"].ToString()));
        }
        this.txtPageNum.Text = this.pageSize.ToString();
        DataTable dt = new DataTable();
        string test = "";
        //得到数据
        dt = hyOperationlog.getFlowTime(pageSize, page, this.ddl_table.SelectedValue, this.ddl_user.SelectedValue, "", this.operateTime_s.Value, this.operateTime_e.Value, this.txtKeyWord.Value, this.ddl_flow.SelectedValue, out test);
        //分页
        if (dt.Rows.Count == 0)
        {
            totalCount = 0;
        }
        else
        {
            totalCount = hyOperationlog.getFlowTimeCount(this.ddl_table.SelectedValue, this.ddl_user.SelectedValue, "", this.operateTime_s.Value, this.operateTime_e.Value, this.txtKeyWord.Value, this.ddl_flow.SelectedValue); this.lblcount.Text = totalCount.ToString();
        }
        StringBuilder stringBuilder = new StringBuilder();
        //构造显示列
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            stringBuilder.Append("<tr height=\"22\" onmouseover=\"this.className='tr_over'\" onmouseout=\"this.className='tr_out'\"class=\"tr_out\">");
            stringBuilder.Append("<td align=\"center\">" + (i + 1) + "</td>");
            stringBuilder.Append("<td align=\"center\">" + dt.Rows[i]["hy_bt"].ToString() + "</td>");
            stringBuilder.Append("<td align=\"center\">" + dt.Rows[i]["hy_djrname"].ToString() + "</td>");
            stringBuilder.Append("<td align=\"center\">" + dt.Rows[i]["hy_djsj"].ToString() + "</td>");
            stringBuilder.Append("<td align=\"center\" ><a href=\"#\" onclick=\"window.open('../ggdy/Hy_cklc.aspx?docid=" + dt.Rows[i]["docid"].ToString() + "&tableid=" + dt.Rows[i]["hy_tableid"].ToString() + "&rnd=" + System.Guid.NewGuid().ToString() + "','_blank','height=600,width=800,top=100,left=400,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')\" >流程耗时查看</a></td></tr>");
        }
        this.lb_show.Text = stringBuilder.ToString();

        string pageUrl = HyCommon.CombUrlTxt(ls_url, "page={0}&rnd={1}&txttableid={2}&txtuid={3}&operateTime_s={4}&operateTime_e={5}&txtKeyWord={6}&txtFlow={7}", "__id__", System.Guid.NewGuid().ToString(), this.ddl_table.SelectedValue, this.ddl_user.SelectedValue, this.operateTime_s.Value, this.operateTime_e.Value, this.txtKeyWord.Value, this.ddl_flow.SelectedValue);
        PageContent.InnerHtml = HyCommon.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
Пример #11
0
 //设置分页数量
 protected void txtPageNum_TextChanged(object sender, EventArgs e)
 {
     HyCommon HyCommon = new HyCommon();
     int _pagesize;
     if (int.TryParse(txtPageNum.Text.Trim(), out _pagesize))
     {
         if (_pagesize > 0)
         {
             HyCommon.WriteCookie("page_size", _pagesize.ToString(), 43200);
         }
     }
     Response.Redirect(HyCommon.CombUrlTxt(ls_url, "page={0}&rnd={1}&txttableid={2}&txtuid={3}&operateTime_s={4}&operateTime_e={5}&txtKeyWord={6}&txtFlow={7}", page.ToString(), System.Guid.NewGuid().ToString(), this.ddl_table.SelectedValue, this.ddl_user.SelectedValue, this.operateTime_s.Value, this.operateTime_e.Value, this.txtKeyWord.Value, this.ddl_flow.SelectedValue));
 }
Пример #12
0
 // 数据绑定
 private void RptBind()
 {
     HyCommon HyCommon = new HyCommon();
     //获取当前页数
     if (this.Request.QueryString["page"] != null)
     {
         this.page = int.Parse(HyCommon.Filter(this.Request.QueryString["page"].ToString()));
     }
     this.txtPageNum.Text = this.pageSize.ToString();
     dt_expert dtExpert = new dt_expert();
     string strWhere = "";
     if (this.txtNmae.Text.Trim() != "")
     {
         strWhere += "  and dt_name like '%" + this.txtNmae.Text.Trim() + "%'";
     }
     //获取数据
     DataSet dt = dtExpert.GetDataPage(this.pageSize, this.page, strWhere);
     //获取数据条数
     this.totalCount = dtExpert.GetList(strWhere).Tables[0].Rows.Count;
     this.lblcount.Text = totalCount.ToString();
     rptList.DataSource = dt;
     rptList.DataBind();
     //地址传递数据
     string pageUrl = HyCommon.CombUrlTxt(ls_url, "page={0}&rnd={1}&txtNmae={2}", "__id__", System.Guid.NewGuid().ToString(), this.txtNmae.Text);
     PageContent.InnerHtml = HyCommon.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
 }
Пример #13
0
 // 数据绑定
 private void RptBind()
 {
     HyCommon HyCommon = new HyCommon();
     if (this.Request.QueryString["page"] != null)
     {
         this.page = int.Parse(HyCommon.Filter(this.Request.QueryString["page"].ToString()));
     }
     this.txtPageNum.Text = this.pageSize.ToString();
     DataTable dt = new DataTable();
     HyRole.hy_rolename = HyCommon.Filter(this.txtKeywords.Text);
     dt = HyRole.SearchdocsByKey(page, pageSize);
     totalCount = HyRole.getDataCount();
     this.lblcount.Text = totalCount.ToString();
     rptList.DataSource = dt;
     rptList.DataBind();
     string pageUrl = HyCommon.CombUrlTxt(ls_url, "page={0}&rnd={1}&keywords={2}", "__id__", System.Guid.NewGuid().ToString(), this.txtKeywords.Text);
     PageContent.InnerHtml = HyCommon.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
 }
Пример #14
0
 //关健字查询
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     HyCommon HyCommon = new HyCommon();
     string pageUrl = HyCommon.CombUrlTxt(ls_url, "page={0}&rnd={1}&txtname={2}&ddl_sex={3}&ddl_grade={4}&ddl_properties={5}&ddl_recommend={6}&txt_nonumber={7}&txttx_guideNo={8}", this.page.ToString(), System.Guid.NewGuid().ToString(), this.txtName.Text, this.ddl_sex.SelectedValue, this.ddl_grade.SelectedValue, this.ddl_properties.SelectedValue, this.ddl_recommend.SelectedValue, this.txt_nonumber.Text, this.txttx_guideNo.Text);
     Response.Redirect(pageUrl);
 }
Пример #15
0
 //部门下拉查询
 protected void ddl_bmxl_SelectedIndexChanged(object sender, EventArgs e)
 {
     HyCommon HyCommon = new HyCommon();
     string pageUrl = HyCommon.CombUrlTxt("list_user.aspx", "rnd={0}&keywords={1}&deptid={2}", "" + System.Guid.NewGuid().ToString() + "", "" + this.txtKeywords.Text + "", "" + this.ddlbmmc.Text + "");
     Response.Redirect(pageUrl);
 }
Пример #16
0
    private void RptBind()
    {
        if (this.Request.QueryString["page"] != null)
            this.page = int.Parse(this.Request.QueryString["page"].ToString());
        else
            this.page = 1;

        if (this.Request.QueryString["cid"] != null)
            this.txtcid_url.Text = this.Request.QueryString["cid"].ToString();

        //this.txtKeywords.Text = this.keywords;
        txtPageNum.Text = this.pageSize.ToString();
        txtPage.Text = this.page.ToString();

        HyContent HyContent = new HyContent();
        DataTable dt = new DataTable();
        dt = HyContent.Getdocs(this.txtcid_url.Text, page, pageSize);
        this.totalCount = HyContent.GetdocsNum(this.txtcid_url.Text);
        //this.totalCount = dt.Rows.Count;
        //DataTable tempTable = dt.Clone();
        //for (int i = (this.page - 1) * this.pageSize; i < this.page * this.pageSize; i++)
        //{
        //    if (i > dt.Rows.Count - 1)
        //        break;

        //    DataRow dr = tempTable.NewRow();
        //    for (int j = 0; j < dt.Columns.Count; j++)
        //    {
        //        dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
        //    }
        //    tempTable.Rows.Add(dr);
        //}
        //rptList.DataSource = tempTable;
        rptList.DataSource = dt;
        rptList.DataBind();

        HyCommon HyCommon = new HyCommon();
        string pageUrl = HyCommon.CombUrlTxt("list_content.aspx", "page={0}&rnd={1}&cid={2}",
            "__id__", "" + System.Guid.NewGuid().ToString() + "", "" + this.txtcid_url.Text + "");
        PageContent.InnerHtml = HyCommon.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
Пример #17
0
 //关健字查询
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     HyCommon HyCommon = new HyCommon();
     Response.Redirect(HyCommon.CombUrlTxt(ls_url, "page={0}&rnd={1}&txttableid={2}&txtuid={3}&operateTime_s={4}&operateTime_e={5}&txtKeyWord={6}&txtFlow={7}", page.ToString(), System.Guid.NewGuid().ToString(), this.ddl_table.SelectedValue, this.ddl_user.SelectedValue, this.operateTime_s.Value, this.operateTime_e.Value, this.txtKeyWord.Value, this.ddl_flow.SelectedValue));
 }
Пример #18
0
 // 数据绑定
 private void RptBind()
 {
     HyCommon HyCommon = new HyCommon();
     if (this.Request.QueryString["page"] != null)
     {
         this.page = int.Parse(HyCommon.Filter(this.Request.QueryString["page"].ToString()));
     }
     this.txtPageNum.Text = this.pageSize.ToString();
     DataTable dt = new DataTable();
     string strCondition = "";
     if (this.txtKeywords.Text != "")
     {
         strCondition = " and hyOperationContent like  '%" + HyCommon.Filter(this.txtKeywords.Text) + "%' ";
     }
     strCondition += " and hyLoginType='1'  ";
     dt = HyOperationlog.GetDataTable(pageSize, page, strCondition);
     totalCount = HyOperationlog.GetDataTableCount(strCondition);
     this.lblcount.Text = totalCount.ToString();
     rptList.DataSource = dt;
     rptList.DataBind();
     string pageUrl = HyCommon.CombUrlTxt(ls_url, "page={0}&rnd={1}&keywords={2}", "__id__", System.Guid.NewGuid().ToString(), this.txtKeywords.Text);
     PageContent.InnerHtml = HyCommon.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
 }
Пример #19
0
 //设置分页数量
 protected void txtPageNum_TextChanged(object sender, EventArgs e)
 {
     HyCommon HyCommon = new HyCommon();
     int _pagesize;
     if (int.TryParse(txtPageNum.Text.Trim(), out _pagesize))
     {
         if (_pagesize > 0)
         {
             HyCommon.WriteCookie("page_size", _pagesize.ToString(), 43200);
         }
     }
     Response.Redirect(HyCommon.CombUrlTxt(ls_url, "rnd={1}&txtname={2}&ddl_sex={3}&ddl_grade={4}&ddl_properties={5}&ddl_recommend={6}&txt_nonumber={7}&txttx_guideNo={8}", System.Guid.NewGuid().ToString(), this.txtName.Text, this.ddl_sex.SelectedValue, this.ddl_grade.SelectedValue, this.ddl_properties.SelectedValue, this.ddl_recommend.SelectedValue, this.txt_nonumber.Text, this.txttx_guideNo.Text));
 }