当前位置: 首页>>代码示例>>C#>>正文


C# HyoaClass.Hyoa_mudel类代码示例

本文整理汇总了C#中HyoaClass.Hyoa_mudel的典型用法代码示例。如果您正苦于以下问题:C# HyoaClass.Hyoa_mudel类的具体用法?C# HyoaClass.Hyoa_mudel怎么用?C# HyoaClass.Hyoa_mudel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


HyoaClass.Hyoa_mudel类属于命名空间,在下文中一共展示了HyoaClass.Hyoa_mudel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: hy_dbsy

    public void hy_dbsy()
    {
        //得到待办事宜
        HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
        DataTable dt;
        dt = Hyoa_dbsy.Getdbsys_dbanddy(this.Session["hyuid"].ToString());
        int i, j;
        string lstitle;
        i = 8;//显示条数
        if (dt.Rows.Count < i)
            i = dt.Rows.Count;

        for (j = 0; j < i; j++)
        {
            string ls_mudelid = dt.Rows[j]["hy_mudelid"].ToString();
            string ls_mudelname = "";
            HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
            DataTable dt_getmudel = Hyoa_mudel.Getmudel(ls_mudelid);
            if (dt_getmudel.Rows.Count > 0)
                ls_mudelname = dt_getmudel.Rows[0]["hy_mudelname"].ToString();

            lstitle = "[" + ls_mudelname + "]" + dt.Rows[j]["hy_subbt"].ToString() + "-" + dt.Rows[j]["hy_bt"].ToString();
            if (ls_mudelid == "yzgl")
            {
                lstitle = lstitle + "用印申请";
            }
            if (lstitle.Length > 35)
                lstitle = lstitle.Substring(0, 35) + "...";
            this.lbdbsy.Text += "<tr height='18px'><td valign='top'>·<a href='ggdy/Hy_DbToYb.aspx?id=" + dt.Rows[j]["ID"].ToString() + "' title='[" + ls_mudelname + "]" + dt.Rows[j]["hy_subbt"].ToString() + "-" + dt.Rows[j]["hy_bt"].ToString() + "' target='_blank'>" + lstitle + "</a>&nbsp;&nbsp;[" + System.DateTime.Parse(dt.Rows[j]["hy_createtime"].ToString()).ToShortDateString().ToString() + "]</td></tr>";
        }
        if (this.lbdbsy.Text == "")
            this.lbdbsy.Text = "·暂无记录!";
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:33,代码来源:index_right.aspx.cs

示例2: Button_Save_Click

    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        string ls_tip = "保存成功!";

        //新文档时
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
        if (this.txtop.Value == "add")
        {
            //先判断这个模块编号是否已经存在
            DataTable dt = Hyoa_mudel.Getmudel(this.txtmudelid.Value);
            if (dt.Rows.Count > 0)
            {
                Response.Write("<script>alert('该模块编号已存在,请重新填写!');history.back();</script>");
                return;
            }
            if(this.txtid.Text.Length<6)
            {
                Response.Write("<script>alert('模块编号长度必须大于5位!');history.back();</script>");
                return;
            }
            if (this.txtid.Text.Substring(0, 5) != "Mudel")
            {
                Response.Write("<script>alert('模块编号必须以Mudel开头!');history.back();</script>");
                return;
            }
            Hyoa_mudel.hy_mudelid = this.txtid.Text;
            Hyoa_mudel.hy_mudelname = this.txtname.Value;
            Hyoa_mudel.hy_sort = System.Int32.Parse(this.txtsort.Value);
            Hyoa_mudel.hy_isenabled = this.ddlisenabled.SelectedValue;
            Hyoa_mudel.hy_roleid = this.ddlrole.SelectedValue;
            Hyoa_mudel.hy_qqroleid = this.ddlqqrole.SelectedValue;
            Hyoa_mudel.Insert();
        }
        else
        {
            Hyoa_mudel.hy_mudelid = this.txtid.Text;
            Hyoa_mudel.hy_mudelname = this.txtname.Value;
            Hyoa_mudel.hy_sort = System.Int32.Parse(this.txtsort.Value);
            Hyoa_mudel.hy_isenabled = this.ddlisenabled.SelectedValue;
            Hyoa_mudel.hy_roleid = this.ddlrole.SelectedValue;
            Hyoa_mudel.hy_qqroleid = this.ddlqqrole.SelectedValue;
            Hyoa_mudel.Update();
        }

        //处理完成后的提示及跳转
        if (this.txtifpop.Value == "")
        {
            Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
        }
        else
        {
            Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
        }
    }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:58,代码来源:main_mudel.aspx.cs

示例3: hy_mudelname

 public string hy_mudelname()
 {
     string mudelname = "";
     if (this.Request.QueryString["mid"] != null)
     {
         //得到模块中文名
         HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
         DataTable dtmudel = Hyoa_mudel.Getmudel(Request.QueryString["mid"].ToString());
         mudelname = dtmudel.Rows[0]["hy_mudelname"].ToString();
         dtmudel.Clear();
     }
     return mudelname;
 }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:13,代码来源:main.aspx.cs

示例4: hyjstx

    public void hyjstx()
    {
        HyoaClass.Hyoa_jstx Hyoa_jstx = new HyoaClass.Hyoa_jstx();
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
        HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();

        try
        {
            DataTable dt = Hyoa_jstx.Getjstxs_wf();
            if (dt.Rows.Count > 0)
            {
                string ls_content = "";
                string ls_mudelname = "消息提醒";
                string ls_url = "";
                for (var i = 0; i < dt.Rows.Count; i++)
                {
                    //得到模块名称
                    DataTable dt_mudel = Hyoa_mudel.Getmudel(dt.Rows[i]["hy_from"].ToString());
                    if (dt_mudel.Rows.Count > 0)
                        ls_mudelname = dt_mudel.Rows[0]["hy_mudelname"].ToString();

                    //如果没找到该文档对应的待办事宜,则不发送消息
                    DataTable dt_dbsy = Hyoa_dbsy.Getdbsybydocid(dt.Rows[i]["DOCID"].ToString());
                    if (dt_dbsy.Rows.Count > 0)
                    {
                        ls_url = dt_dbsy.Rows[0]["hy_url"].ToString();
                        ls_content = "[" + ls_mudelname + "]-<a href='" + amtooa_ym + "/jstx_login.aspx?uid=" + dt.Rows[i]["hy_jsrid"].ToString() + "&key=cd04fa144ec48507&redirectto=" + ls_url + "' target=_blank>" + dt.Rows[i]["hy_content"].ToString() + "</a>";
                        int li_value = SendMessage("消息提醒", ls_content, dt.Rows[i]["hy_jsrid"].ToString());
                        if (li_value == 1)
                        {
                            Hyoa_jstx.ID = dt.Rows[i]["ID"].ToString();
                            Hyoa_jstx.hy_state = 1;
                            Hyoa_jstx.Update();
                        }
                        else
                        {
                            Hyoa_jstx.ID = dt.Rows[i]["ID"].ToString();
                            Hyoa_jstx.hy_state = 2;
                            Hyoa_jstx.Update();
                        }
                    }
                }
            }
        }
        catch
        {
        }
        finally
        {
        }
    }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:51,代码来源:sendam.aspx.cs

示例5: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            if (this.Request.QueryString["pop"] != null)
            {
                this.txtifpop.Value = this.Request.QueryString["pop"].ToString();   //是否弹出窗口
            }
            //esppath = Server.MapPath("esp");
            //if (this.Session["hyuid"].ToString() == "")
            //    this.Response.Redirect("../login.aspx");
            if (Request.QueryString["url"] != null)
            {
                this.url.Value = Request.QueryString["url"].ToString();
            }
            if (Request.QueryString["espid"] != null)
            {
                this.txtdocid.Value = Request.QueryString["espid"].ToString();
            }
            //按钮控制
            this.tdCreateNew.Visible = false;
            this.tdSave.Visible = false;

            //判断当前用户是否有新建删除权限
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            string ls_mudelid = "Mudelfwgl";
            string ls_role = "";
            HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
            DataTable dt_mudel = Hyoa_mudel.Getmudel(ls_mudelid);
            if (dt_mudel.Rows.Count > 0)
            {
                ls_role = dt_mudel.Rows[0]["hy_roleid"].ToString();
            }
            if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()))
            {
                if (Request.QueryString["op"] != null)
                {
                    string ls_op = Request.QueryString["op"].ToString();
                    txtop.Value = ls_op;
                    if (ls_op == "add")
                    {
                        this.tdCreateNew.Visible = true;
                        this.tdSave.Visible = true;
                        this.txtdocid.Value = Hyoa_global.GetRandom();
                    }
                }
            }

        }
    }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:50,代码来源:espedit.aspx.cs

示例6: btndelinfo_Click

 protected void btndelinfo_Click(object sender, EventArgs e)
 {
     HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
     String[] v_uids = this.txtuids.Value.Split(',');
     for (var i = 0; i < v_uids.Length; i++)
     {
         if (v_uids[i] != "")
         {
             Hyoa_mudel.hy_mudelid = v_uids[i];
             Hyoa_mudel.Delete();
         }
     }
     this.txtuids.Value = "";
     //DataPlay(1);
     DataPlay(System.Int32.Parse(this.curpage.Text));
 }
开发者ID:wjszxli,项目名称:Webapp,代码行数:16,代码来源:list_mudel.aspx.cs

示例7: hy_dbsy

    //待办事宜
    private void hy_dbsy()
    {
        string ls_html = "";
        int i, j;
        string ls_title = "";
        string ls_title2 = "";
        string ls_url = "";
        HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
        DataTable dt = Hyoa_dbsy.Getdbsys_db(this.Session["hyuid"].ToString());
        i = 7; //显示条数
        if (dt.Rows.Count < i)
            i = dt.Rows.Count;
        for (j = 0; j < i; j++)
        {
            string ls_mudelid = dt.Rows[j]["hy_mudelid"].ToString();
            string ls_mudelname = "";
            HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
            DataTable dt_getmudel = Hyoa_mudel.Getmudel(ls_mudelid);
            if (dt_getmudel.Rows.Count > 0)
                ls_mudelname = dt_getmudel.Rows[0]["hy_mudelname"].ToString();

            ls_title = "[" + ls_mudelname + "]" + dt.Rows[j]["hy_subbt"].ToString() + "-" + dt.Rows[j]["hy_bt"].ToString();
            if (ls_title.Length > 35)
                ls_title2 = ls_title.Substring(0, 35) + "...";
            else
                ls_title2 = ls_title;

            ls_url = "ggdy/Hy_DbToYb.aspx?id=" + dt.Rows[j]["ID"].ToString() + "&pop=1&rnd=" + System.Guid.NewGuid().ToString();
            ls_html += "<tr>";
            ls_html += "<td width=\"10\" align=\"center\">·</td>";
            ls_html += "<td height=\"26\"><a title=\"" + ls_title + "\" onclick=\"window.open('" + ls_url + "')\" href=\"javascript:\"><b>" + ls_title2 + "</b></a></td>";
            ls_html += "<td width=\"70\" align=\"center\"><font color='#2D2D2D' >" + System.DateTime.Parse(dt.Rows[j]["hy_createtime"].ToString()).ToString("yyyy-MM-dd") + "</font></td>";
            ls_html += "</tr>";

        }
        if (ls_html == "")
        {
            ls_html = "<tr><td>· 暂无待办事宜!</td></tr>";
        }
        this.lbldbsy.Text = ls_html;
    }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:42,代码来源:Default.aspx.cs

示例8: hy_mudelname

    public string hy_mudelname()
    {
        string mudelname = "";
        if (this.Request.QueryString["mid"] != null)
        {
            //得到模块中文名
            string ls_mid = "";
            ls_mid = this.Request.QueryString["mid"].ToString();
            if (ls_mid.Contains(","))
                ls_mid = ls_mid.Substring(0, ls_mid.IndexOf(","));

            HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
            DataTable dtmudel = Hyoa_mudel.Getmudel(ls_mid);
            //Response.Write(Request.QueryString["mid"].ToString());
            if (dtmudel.Rows.Count > 0)
            {
                mudelname = dtmudel.Rows[0]["hy_mudelname"].ToString();
            }
        }
        return mudelname;
    }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:21,代码来源:list_iframe_auto_flc.aspx.cs

示例9: DataPlay


//.........这里部分代码省略.........
                            this.txtiffirsttache.Value = "1"; //旧文档时,如果历史处理环节中只有一条记录,“是否第一环节”置为1
                        }
                        dt_flowhistoryinfo_cl.Clear();

                        //判断是否为最后一个环节
                        HyoaClass.Hyoa_flowwork Hyoa_flowwork = new HyoaClass.Hyoa_flowwork();
                        DataTable dtflowwork = Hyoa_flowwork.Getflowworkbyflowidtacheid(this.hy_flowid.Text, this.hy_curtacheid.Text);
                        if (dtflowwork.Rows.Count > 0)
                        {
                            if (dtflowwork.Rows[0]["hy_nexttacheid"].ToString() == "**")
                                this.txtiflasttache.Value = "1";
                        }
                        dtflowwork.Clear();
                        //////////////流程未结束///////////////////////
                    }

                    //如果表单是流程后公开显示,则置为阅读权限
                    if (this.hy_curtacheid.Text == "**")
                    {
                        HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
                        DataTable dt_tableconfig = Hyoa_tableconfig.GetTable(this.hy_tableid.Text);
                        if (dt_tableconfig.Rows.Count > 0)
                        {
                            if (dt_tableconfig.Rows[0]["hy_ispuballByflowYB"].ToString() == "是")
                            {
                                this.txtSystemYdRight.Value = "1";
                            }
                        }
                    }
                    //没有操作权限的用户,如果是全权用户,则置为阅读权限    ADD BY XF 2011-11-17
                    if (this.txtSystemClRight.Value == "0" && this.txtSystemYdRight.Value == "0")
                    {
                        //得到当前模块对应的全权用户组
                        HyoaClass.Hyoa_mudel Hyoa_mudel_forqqyh = new HyoaClass.Hyoa_mudel();
                        DataTable dt_mudel_forqqyh = Hyoa_mudel_forqqyh.Getmudel(this.hy_mudelid.Text);
                        if (dt_mudel_forqqyh.Rows.Count > 0)
                        {
                            if (dt_mudel_forqqyh.Rows[0]["hy_qqroleid"] != null)
                            {
                                if (dt_mudel_forqqyh.Rows[0]["hy_qqroleid"] != "")
                                {
                                    string ls_role_forqqyh = dt_mudel_forqqyh.Rows[0]["hy_qqroleid"].ToString();
                                    HyoaClass.Hyoa_global Hyoa_global_forqqyh = new HyoaClass.Hyoa_global();
                                    if (Hyoa_global_forqqyh.isHaveRole(ls_role_forqqyh, this.Session["hyuid"].ToString()))
                                    {
                                        this.txtSystemYdRight.Value = "1";  //阅读权限
                                    }
                                }
                            }
                        }
                    }

                    //指定的特殊模块,流转过程中,所有人员可以浏览该文档
                    hySetYdRight_TS();

                    //如果是“可修改所有文档的权限人员”,则可以修改所有的,可以把已办文件转在办
                    if (Hyoa_global.isHaveRole("Role9995", Session["hyuid"].ToString()))
                    {
                        this.txtSystemYdRight.Value = "1";
                        this.td_submit.Visible = true; //保存
                        if (this.hy_curtacheid.Text == "**")
                            this.td_ybtozb.Visible = true; //已办转在办
                    }

                    //既没有处理权限,又没有阅读权限的情况下
                    if (this.txtSystemClRight.Value == "0" && this.txtSystemYdRight.Value == "0")
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:67,代码来源:main.aspx.cs

示例10: DataPlay

    private void DataPlay(int PageNo)
    {
        //得到当前模块对应的role
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
        DataTable dt_mudel = Hyoa_mudel.Getmudel(this.txtmudelid.Value);
        string ls_role = "Role9999";
        if (dt_mudel.Rows.Count > 0)
            ls_role = dt_mudel.Rows[0]["hy_roleid"].ToString();

        //判断当前用户是否有删除权限
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()) || Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
        {
            this.isrole.Value = "1";
            this.tddeldoc.Visible = true; //删除
        }
        else
        {
            this.isrole.Value = "0";
            this.tddeldoc.Visible = false; //删除
        }

        //得到当前页号
        this.curpage.Text = PageNo.ToString();
        HyoaClass.DAO db = new HyoaClass.DAO();

        string ls_user = "";
        if (this.Request.QueryString["user"] != null)
            ls_user = this.Request.QueryString["user"].ToString();

        string sql = "";

        sql = "select * from hyp_flowmain where hy_mudelid='" + this.txtmudelid.Value + "' and hy_tableid='" + this.txttableid.Value + "' ";
        sql += " and hy_field1='" + ls_user + "' and left(convert(char(7),getdate(),120),4)=left(convert(char(7),hy_field31,120),4) order by hy_field31 desc ";

        DataTable dt = db.GetDataTable(sql);
        DataTable tempTable = dt.Clone();
        for (int i = (PageNo - 1) * System.Int32.Parse(PageSize.Text); i < PageNo * System.Int32.Parse(PageSize.Text); 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);
        }

        int TotalRecord = dt.Rows.Count;
        this.sumts.Text = TotalRecord.ToString();
        this.sumts2.Text = TotalRecord.ToString();
        this.ShowTotalRecord.Text = TotalRecord.ToString();
        //计算及显示总页数
        int TotalPage;
        if (TotalRecord < System.Int32.Parse(PageSize.Text))
        {
            TotalPage = 1;
        }
        else
        {
            if (TotalRecord % System.Int32.Parse(PageSize.Text) != 0)
            {
                TotalPage = TotalRecord / System.Int32.Parse(PageSize.Text) + 1;

            }
            else
            {
                TotalPage = TotalRecord / System.Int32.Parse(PageSize.Text);

            }
        }
        this.ShowTotalPage.Text = TotalPage.ToString();
        this.rptlist.DataSource = tempTable;
        this.rptlist.DataBind();
        dt.Clear();
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:78,代码来源:list_year.aspx.cs

示例11: DataPlay

    private void DataPlay(int PageNo)
    {
        //得到当前模块对应的role
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
        DataTable dt_mudel = Hyoa_mudel.Getmudel(this.txtmudelid.Value);
        string ls_role = "Rolegwk";
        if (dt_mudel.Rows.Count > 0)
            ls_role = dt_mudel.Rows[0]["hy_roleid"].ToString();

        //判断当前用户是否有删除权限
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()))
        {
            this.isrole.Value = "1";
            this.tddeldoc.Visible = true; //删除
            this.tdnewdoc.Visible = true;//新建
        }
        else
        {
            this.isrole.Value = "0";
            this.tddeldoc.Visible = false; //删除
            this.tdnewdoc.Visible = false;//新建
        }

        //得到当前页号
        this.curpage.Text = PageNo.ToString();

        //已流转完成的全局公告
        string sql = "";
        string lstypeid = "";
        if (this.Request.QueryString["type"] != null)
        {
            lstypeid = this.Request.QueryString["type"].ToString();
        }
        sql = "select * from hyp_gwk where 1=1";

        if (this.hy_djsj_start_1.Value != "")
        {
            if (Session["conntype"].ToString() == "SQL")
            {
                sql += " and hy_djsj>='" + this.hy_djsj_start_1.Value + "' ";
            }
            if (Session["conntype"].ToString() == "ORACLE")
            {
                sql += " and to_char(hy_djsj,'YYYY-MM-DD')>='" + this.hy_djsj_start_1.Value + "' ";
            }
        }
        if (this.hy_djsj_end_1.Value != "")
        {
            if (Session["conntype"].ToString() == "SQL")
            {
                sql += " and hy_djsj<='" + this.hy_djsj_end_1.Value + "' ";
            }
            if (Session["conntype"].ToString() == "ORACLE")
            {
                sql += " and to_char(hy_djsj,'YYYY-MM-DD')<='" + this.hy_djsj_end_1.Value + "' ";
            }
        }
        if (this.hy_bt_1.Value != "")
            sql += " and hy_bt like '%" + this.hy_bt_1.Value + "%' ";

        if (this.hy_wh_1.Value != "")
            sql += " and hy_wh like '%" + this.hy_wh_1.Value + "%' ";

        if (lstypeid != "")
            sql += " and hy_typeid = '" + lstypeid + "' ";

        sql += " order by hy_djsj desc ";

        DataTable dt = Hyoa_global.GetDataTable(sql);
        DataTable tempTable = dt.Clone();
        DataColumn col = new DataColumn("lookfileatt", typeof(String)); //定义新的一列  add
        tempTable.Columns.Add(col);  //追加一列  add
        for (int i = (PageNo - 1) * System.Int32.Parse(PageSize.Text); i < PageNo * System.Int32.Parse(PageSize.Text); 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];
            }

            //fileatt
            string ls_classnames = "";   //add
            if (dt.Rows[i]["hy_mudelid"].ToString() == "Mudelfwgl")
            {
                string lssqlfwglfile;
                lssqlfwglfile = "select * from files where fother = '" + dt.Rows[i]["hy_fatherid"].ToString() + "'";
                DataTable dtfwglfile = Hyoa_global.GetDataTable(lssqlfwglfile);
                if (dtfwglfile.Rows.Count > 0)
                {
                    for (int jfile = 0; jfile < dtfwglfile.Rows.Count; jfile++)
                    {
                        if (ls_classnames == "")
                        {
                            ls_classnames = "<a href='../NTKO/" + dtfwglfile.Rows[jfile]["fpath"].ToString() + "/" + dtfwglfile.Rows[jfile]["fname"].ToString() + "' target=_blank>正文</a>";
                        }
                        else
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:101,代码来源:list.aspx.cs

示例12: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        //if (!this.IsPostBack)
        //{
        //    string aa = "[{'stuName':[{'name':'Tom'},{'name':'Jack'},{'name':'jony'}]},{'className':[{'class':'基础日语'},{'class':'中级日语'},{'class':'Java SE'}]}]";
        //    this.Response.Write(aa);

        //}
        //else
        //{
            //string aa = Request.Form["username"];
            //this.Response.Write(aa);
        //}

        //HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
        //DataTable dt = Hyoa_dbsy.Getdbsybyuserid("3810332");
        //DataTable dt = Hyoa_dbsy.Getdbsybyuserid("admin");
        string userid = Request.QueryString["userid"].ToString();
        string curpage = Request.QueryString["gotoPage"].ToString();
        int endPage=1;
        int onePageCount=7;
        HyoaClass.DAO db = new HyoaClass.DAO();
        //string lssql = "select * from hyt_dbsy where hy_dbrid='" + userid + "'";

        string lssql = "Select top " + onePageCount.ToString() + " * from hyt_dbsy  where hy_dbrid='" + userid + "'" + " and docid not in(select top " + ((int.Parse(curpage) - 1) * onePageCount).ToString() + " docid from hyt_dbsy " + "where hy_dbrid='" + userid + "'" + " " + " order by hy_createtime desc" + ")" + " " + " order by hy_createtime desc";

        DataTable dt = db.GetDataTable(lssql);

        string lstitle="";
        string lssj = "";
        string aa = "{\"list\":[";
        int lisum = dt.Rows.Count;
        for (int i = 0; i < lisum; i++)
        {
            lstitle = "";
            lssj = "";
            string ls_mudelid = dt.Rows[i]["hy_mudelid"].ToString();
            string ls_mudelname = "";
            HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
            DataTable dt_getmudel = Hyoa_mudel.Getmudel(ls_mudelid);
            if (dt_getmudel.Rows.Count > 0)
                ls_mudelname = dt_getmudel.Rows[0]["hy_mudelname"].ToString();
            lstitle = "[" + ls_mudelname + "]" + dt.Rows[i]["hy_subbt"].ToString() + "-" + dt.Rows[i]["hy_bt"].ToString();
            if(lstitle.Length >16)
                lstitle=lstitle.Substring (0,16)+"...";

            lssj="[" + System.DateTime.Parse(dt.Rows[i]["hy_createtime"].ToString()).ToString("MM-dd") + "]";
            if (i == lisum - 1)
            {
                aa += "{\"title\":\"" + lstitle + "\", \"sj\":\"" + lssj + "\"}";
            }
            else
            {
                aa += "{\"title\":\"" + lstitle + "\", \"sj\":\"" + lssj + "\"},";
            }

        }
        aa += "]";

        aa += ",\"page\": {";
        aa += "\"beginPage\":1,";
        aa += "\"count\":" + lisum.ToString()+ ",";
        aa += "\"currentPage\":" + curpage + ",";
        if(lisum%10==0)
        {
           endPage= lisum/onePageCount;
        }
        else
        {
          endPage= lisum/onePageCount+1;
        }

        aa += "\"endPage\":" + endPage.ToString() + ",";
        aa += "\"gotoPage\":" + curpage + ",";
        aa += "\"hasNextPage\":true,";
        aa += "\"hasPrePage\":false,";
        aa += "\"onClickFunction\":\"_submit\",";
        aa += "\"onePageCount\":" + onePageCount.ToString() + ",";
        aa += "\"startCount\":0,";
        aa += "\"totalPage\":" + endPage.ToString() + "}";
        aa += "}";
        this.Response.Write(aa);
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:83,代码来源:hy_test2.aspx.cs

示例13: DataPlay


//.........这里部分代码省略.........
            dt = Hyoa_global.GetDataTable(sql);
        }

        DataTable tempTable = dt.Clone();
        //模块名称
        DataColumn col1 = new DataColumn("show_mudelname", typeof(String));
        tempTable.Columns.Add(col1);
        //显示的标题
        DataColumn col2 = new DataColumn("show_bt", typeof(String));
        tempTable.Columns.Add(col2);
        //显示的时间
        DataColumn col3 = new DataColumn("show_sj", typeof(String));
        tempTable.Columns.Add(col3);
        //显示的连接
        DataColumn col4 = new DataColumn("show_lj", typeof(String));
        tempTable.Columns.Add(col4);
        //删除按钮
        DataColumn col5 = new DataColumn("show_delinfo", typeof(String));
        tempTable.Columns.Add(col5);

        for (int i = (PageNo - 1) * System.Int32.Parse(PageSize.Text); i < PageNo * System.Int32.Parse(PageSize.Text); 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];
            }

            dr["show_mudelname"] = this.lblmudelname.Text;

            HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
            DataTable dt_mudel = Hyoa_mudel.Getmudel(txtmid.Text);
            string ls_role = "Role9999";
            if (dt_mudel.Rows.Count > 0)
            {
                ls_role = dt_mudel.Rows[0]["hy_roleid"].ToString();
            }

            if (txtmid.Text == "dbsy" || txtmid.Text == "dysy" || txtmid.Text == "ybsy" || txtmid.Text == "yysy")
            {
                dr["show_bt"] = dt.Rows[i]["hy_subbt"].ToString() + "-" + dt.Rows[i]["hy_bt"].ToString();
                dr["show_sj"] = "时间:" + System.DateTime.Parse(dt.Rows[i]["hy_createtime"].ToString()).ToString("yyyy-MM-dd");
                dr["show_lj"] = dt.Rows[i]["hy_url"].ToString().Replace("main.aspx", "wap_main.aspx");
                dr["show_delinfo"] = "<a href=\"#\" onclick=\"DelInfo('" + dt.Rows[i]["ID"].ToString() + "');\">[删除记录]</a>";
            }
            //电子邮件
            if (this.Request.QueryString["mid"] == "mail")
            {
                dr["show_bt"] = dt.Rows[i]["hy_title"].ToString();
                dr["show_sj"] = "时间:" + System.DateTime.Parse(dt.Rows[i]["hy_datetime"].ToString()).ToString("yyyy-MM-dd");
                dr["show_lj"] = "wap_main_mailread.aspx?op=modify&mid=mail&tableid=sjx&docid=" + dt.Rows[i]["ID"].ToString() + "&url=wap_list.aspx?mid=mail&tableid=sjx&page=" + this.curpage.Text;
                dr["show_delinfo"] = "<a href=\"#\" onclick=\"DelInfo('" + dt.Rows[i]["ID"].ToString() + "');\">[删除记录]</a>";
            }
            //日程安排
            if (this.Request.QueryString["mid"] == "Mudelrcap")
            {
                dr["show_bt"] = dt.Rows[i]["hyc_zt"].ToString();
                dr["show_sj"] = "时间:" + System.DateTime.Parse(dt.Rows[i]["hyc_qssj"].ToString()).ToString("yyyy-MM-dd") + "至" + System.DateTime.Parse(dt.Rows[i]["hyc_jssj"].ToString()).ToString("yyyy-MM-dd");
                dr["show_lj"] = "wap_main.aspx?op=modify&mid=Mudelrcap&tableid=Tablercap&docid=" + dt.Rows[i]["DOCID"].ToString() + "&url=wap_list.aspx?mid=Mudelrcap&tableid=Tablercap&page=" + this.curpage.Text;
                dr["show_delinfo"] = "<a href=\"#\" onclick=\"DelInfo('" + dt.Rows[i]["DOCID"].ToString() + "');\">[删除]</a>";
            }
            //个人通信录
            if (this.Request.QueryString["mid"] == "Mudelgrtxl")
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:67,代码来源:wap_list.aspx.cs

示例14: DataPlay

    private void DataPlay()
    {
        //加载一级目录ID、一级目录名称、每个一级目录最大的二级目录
        HyoaClass.Hyoa_ml Hyoa_firstml = new HyoaClass.Hyoa_ml();
        DataTable dtfirstml = Hyoa_firstml.GetFirstmls();
        if (dtfirstml.Rows.Count > 0)
        {
            this.ddlfirstmlid.DataSource = dtfirstml;
            this.ddlfirstmlid.DataTextField = "MLID";
            this.ddlfirstmlid.DataValueField = "MLID";
            this.ddlfirstmlid.DataBind();
            this.ddlfirstmlid.Items.Insert(0, "--请选择--");
            this.ddlfirstmlid.SelectedIndex = 0;
            this.ddlfirstmlname.DataSource = dtfirstml;
            this.ddlfirstmlname.DataTextField = "MLName";
            this.ddlfirstmlname.DataValueField = "MLName";
            this.ddlfirstmlname.DataBind();
            this.ddlfirstmlname.Items.Insert(0, "--请选择--");
            this.ddlfirstmlname.SelectedIndex = 0;
            //加载每个一级目录最大的二级目录
            string ls_id;
            for (var i = 0; i < dtfirstml.Rows.Count; i++)
            {
                ls_id = Hyoa_firstml.GetMaxMLID(dtfirstml.Rows[i]["MLID"].ToString());
                this.ddlsecondmlid.Items.Insert(i, ls_id);
            }
            this.ddlsecondmlid.Items.Insert(0, "--请选择--");
            this.ddlsecondmlid.SelectedIndex = 0;
        }

        //加载模块信息
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
        DataTable dtmudel = Hyoa_mudel.Getmudels();
        if (dtmudel.Rows.Count > 0)
        {
            this.ddlmudelid.DataSource = dtmudel;
            this.ddlmudelid.DataTextField = "hy_mudelname";
            this.ddlmudelid.DataValueField = "hy_mudelid";
            this.ddlmudelid.DataBind();
            this.ddlmudelid.Items.Insert(0, "--请选择--");
            this.ddlmudelid.SelectedIndex = 0;
        }

        //加载权限
        HyoaClass.Hyoa_role Hyoa_role = new HyoaClass.Hyoa_role();
        DataTable dtrole = Hyoa_role.Getroles();
        if (dtrole.Rows.Count > 0)
        {
            this.ddlrole.DataSource = dtrole;
            this.ddlrole.DataTextField = "hy_rolename";
            this.ddlrole.DataValueField = "hy_roleid";
            this.ddlrole.DataBind();
            this.ddlrole.Items.Insert(0, "--请选择--");
            this.ddlrole.SelectedIndex = 0;
        }

        this.ddlisenabled.Items.Insert(0, "是");
        this.ddlisenabled.Items.Insert(1, "否");

        if (this.Request.QueryString["op"] != null)
        {
            this.txtop.Value = this.Request.QueryString["op"].ToString();           //新增还是修改

            //判断当前用户是否有保存的权限
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
            {
                this.btn_submit.Visible = true; //保存
            }
            else
            {
                this.btn_submit.Visible = false; //保存
            }

            HyoaClass.Hyoa_ml Hyoa_ml = new HyoaClass.Hyoa_ml();

            //旧文档
            if (this.Request.QueryString["op"] == "modify")
            {
                if (this.Request.QueryString["id"] != null)
                {
                    //根据id得到信息
                    this.lblid.Value = this.Request.QueryString["id"].ToString();
                    this.txtMLID.Value = this.Request.QueryString["id"].ToString();
                    DataTable dt = Hyoa_ml.Getml(this.lblid.Value);
                    if (dt.Rows.Count > 0)
                    {
                        this.txtname.Value = dt.Rows[0]["MLName"].ToString();
                        this.txtlink.Value = dt.Rows[0]["hy_link"].ToString();
                        this.ddltarget.SelectedValue = dt.Rows[0]["hy_target"].ToString();
                        this.ddlrole.SelectedValue = dt.Rows[0]["hy_role"].ToString();
                        this.txtsort.Value = dt.Rows[0]["hy_sort"].ToString();
                        //模块信息定位
                        for (var i = 0; i < this.ddlmudelid.Items.Count; i++)
                        {
                            if (this.ddlmudelid.Items[i].Value == dt.Rows[0]["hy_mudelid"].ToString())
                            {
                                this.ddlmudelid.SelectedIndex = i;
                            }
                        }
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:Webapp,代码行数:101,代码来源:main_ml2.aspx.cs

示例15: hy_mudelname

 public string hy_mudelname()
 {
     //得到模块中文名
     HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
     DataTable dtmudel = Hyoa_mudel.Getmudel(this.txtmudelid.Value);
     string mudelname = dtmudel.Rows[0]["hy_mudelname"].ToString();
     dtmudel.Clear();
     return mudelname;
 }
开发者ID:wjszxli,项目名称:Webapp,代码行数:9,代码来源:list_db.aspx.cs


注:本文中的HyoaClass.Hyoa_mudel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。