• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# HyoaClass.Hyoa_flowfield类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: CheckfmMainInput

    //保存或提交时的JS代码(判断是否必填项),动态架构    Written by xf 20110515
    public string CheckfmMainInput()
    {
        string ls_mid = "";
        if (this.Request.QueryString["mid"] != null)
        {
            ls_mid = this.Request.QueryString["mid"].ToString();
            if (ls_mid.Contains(","))
                ls_mid = ls_mid.Substring(0, ls_mid.IndexOf(","));
        }
        string ls_tableid = "";
        if (this.Request.QueryString["tableid"] != null)
        {
            ls_tableid = this.Request.QueryString["tableid"].ToString();
            if (ls_tableid.Contains(","))
                ls_tableid = ls_tableid.Substring(0, ls_tableid.IndexOf(","));
        }

        string ls_return = "";
        //如果是“可修改所有文档的权限人员”,则可以修改所有的字段,不需要提示是否必填了。
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (Hyoa_global.isHaveRole("Role9995", Session["hyuid"].ToString()))
        {
        }
        else
        {
            HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
            //根据模块ID和表单ID得到对应的配置字段
            DataTable dt_gettablecolumns = Hyoa_flowfield.GetflowfieldsbyMudelidAndTableid(ls_mid, ls_tableid);
            if (dt_gettablecolumns.Rows.Count > 0)
            {
                //判断是否必填
                for (int i = 0; i < dt_gettablecolumns.Rows.Count; i++)
                {
                    if (dt_gettablecolumns.Rows[i]["hy_required"].ToString() == "是")
                    {
                        if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "文本" || dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "多行文本" || dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "文本加按钮" || dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "多行文本加按钮" || dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "日期" || dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "口令")
                            ls_return += "try{if(fm." + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + ".value==\"\"){alert(\"" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "不能为空!\");fm." + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + ".focus();return false;}}catch(err){}";

                        if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "数值")
                            ls_return += "try{if(fm." + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + ".value==\"\"){alert(\"" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "不能为空!\");fm." + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + ".focus();return false;}if(isNaN(fm." + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + ".value)){alert(\"" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "必须为数值!\");fm." + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + ".focus();return false}}catch(err){}";

                        if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "对话框列表")
                            ls_return += "try{if(fm." + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + ".selectedIndex==0){alert(\"请选择" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "!\");fm." + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + ".focus();return false;}}catch(err){}";

                        //if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "复选框")
                        //    ls_return += "try{var ls_select=\"\";var obj1=document.getElementsById(\"" + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + "\");for(var i = 0; i < obj1.length; i++){if(obj1[i].checked){if(ls_select==\"\"){ls_select = obj1[i].value;}else{ls_select=ls_select+\"#\"+obj1[i].value;}}}if(ls_select==\"\"){alert('请选择" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "!');return false;}}catch(err){}";

                        //if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "单选框")
                        //    ls_return += "try{var ls_select=\"\";var obj1=document.getElementsById(\"" + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + "\");for(var i = 0; i < obj1.length; i++){if(obj1[i].checked){if(ls_select==\"\"){ls_select = obj1[i].value;}else{ls_select=ls_select+\"#\"+obj1[i].value;}}}if(ls_select==\"\"){alert('请选择" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "!');return false;}}catch(err){}";
                    }
                    //哪个字段是待办事宜提醒的字段    edited by xf 20140625
                    if (dt_gettablecolumns.Rows[i]["hy_ifdbsybt"].ToString() == "是")
                    {
                        ls_return += "try{var d=document.getElementById('" + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + "');if(d==null||typeof(d.value)=='undefined'){}else{document.getElementById('hy_bt').value=d.value;}}catch(err){}";
                    }
                }
            }
        }
        return ls_return;
    }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:61,代码来源:main.aspx.cs


示例2: btndelinfo_Click

    protected void btndelinfo_Click(object sender, EventArgs e)
    {
        HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
        HyoaClass.Hyoa_flowtache Hyoa_flowtache = new HyoaClass.Hyoa_flowtache();
        HyoaClass.Hyoa_flowwork Hyoa_flowwork = new HyoaClass.Hyoa_flowwork();
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        HyoaClass.Hyoa_flowtachefield Hyoa_flowtachefield = new HyoaClass.Hyoa_flowtachefield();
        HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();

        String[] v_uids = this.txtuids.Value.Split(',');
        for (var i = 0; i < v_uids.Length; i++)
        {
            if (v_uids[i] != "")
            {
                //删除流程信息
                Hyoa_flowinfor.hy_flowid = v_uids[i];
                Hyoa_flowinfor.Delete();
                //删除环节信息
                Hyoa_flowtache.DeleteByflowid(v_uids[i]);
                //删除流转信息
                Hyoa_flowwork.DeleteAllbyflowid(v_uids[i]);
                //删除流程对应的域
                Hyoa_flowfield.DeleteAllbyflowid(v_uids[i]);
                //删除流程环节对应的域
                Hyoa_flowtachefield.DeleteAllbyflowid(v_uids[i]);
                //删除流程环节对应的用户
                Hyoa_flowtacheuser.DeleteAllbyflowid(v_uids[i]);
            }
        }
        this.txtuids.Value = "";
        //DataPlay(1);
        DataPlay(System.Int32.Parse(this.curpage.Text));
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:33,代码来源:list_flowconfig.aspx.cs


示例3: btndelinfo_Click

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


示例4: CheckfmMainInput

    //保存或提交时的JS代码(判断是否必填项),动态架构    Written by xf 20110515
    public string CheckfmMainInput()
    {
        string ls_mid = "";
        if (this.Request.QueryString["mid"] != null)
        {
            ls_mid = this.Request.QueryString["mid"].ToString();
            if (ls_mid.Contains(","))
                ls_mid = ls_mid.Substring(0, ls_mid.IndexOf(","));
        }
        string ls_tableid = "";
        if (this.Request.QueryString["tableid"] != null)
        {
            ls_tableid = this.Request.QueryString["tableid"].ToString();
            if (ls_tableid.Contains(","))
                ls_tableid = ls_tableid.Substring(0, ls_tableid.IndexOf(","));
        }

        string ls_return = "";
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        //根据模块ID和表单ID得到对应的配置字段
        DataTable dt_gettablecolumns = Hyoa_flowfield.GetflowfieldsbyMudelidAndTableid(ls_mid, ls_tableid);
        if (dt_gettablecolumns.Rows.Count > 0)
        {
            //判断是否必填
            for (int i = 0; i < dt_gettablecolumns.Rows.Count; i++)
            {
                if (dt_gettablecolumns.Rows[i]["hy_required"].ToString() == "是")
                {
                    if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "文本" || dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "多行文本" || dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "文本加按钮" || dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "多行文本加按钮" || dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "日期" || dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "口令")
                        ls_return += "try{if(fm." + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + "_1.value==\"\"){alert(\"" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "不能为空!\");fm." + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + "_1.focus();return false;}}catch(err){}";

                    if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "数值")
                        ls_return += "try{if(fm." + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + "_1.value==\"\"){alert(\"" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "不能为空!\");fm." + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + "_1.focus();return false;}if(isNaN(fm." + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + "_1.value)){alert(\"" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "必须为数值!\");fm." + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + "_1.focus();return false}}catch(err){}";

                    if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "对话框列表")
                        ls_return += "try{if(fm." + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + "_1.selectedIndex==0){alert(\"请选择" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "!\");fm." + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + "_1.focus();return false;}}catch(err){}";

                    if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "复选框")
                        ls_return += "try{var ls_select=\"\";var obj1=document.getElementsByName(\"" + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + "_1\");for(var i = 0; i < obj1.length; i++){if(obj1[i].checked){if(ls_select==\"\"){ls_select = obj1[i].value;}else{ls_select=ls_select+\"#\"+obj1[i].value;}}}if(ls_select==\"\"){alert('请选择" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "!');return false;}}catch(err){}";

                    if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "单选框")
                        ls_return += "try{var ls_select=\"\";var obj1=document.getElementsByName(\"" + dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString() + "_1\");for(var i = 0; i < obj1.length; i++){if(obj1[i].checked){if(ls_select==\"\"){ls_select = obj1[i].value;}else{ls_select=ls_select+\"#\"+obj1[i].value;}}}if(ls_select==\"\"){alert('请选择" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "!');return false;}}catch(err){}";
                }
            }
        }
        return ls_return;
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:48,代码来源:main.aspx.cs


示例5: btndelinfo_Click

 protected void btndelinfo_Click(object sender, EventArgs e)
 {
     HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
     HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
     String[] v_uids = this.txtuids.Value.Split(',');
     for (var i = 0; i < v_uids.Length; i++)
     {
         if (v_uids[i] != "")
         {
             //找到字段配置信息
             DataTable dt = Hyoa_flowfield.Getflowfield(v_uids[i]);
             //删除SQL中的字段
             string sql = "ALTER TABLE hyc_" + this.txttableid.Value;
             sql += " DROP COLUMN hyc_" + dt.Rows[0]["hy_fieldid"].ToString();
             Hyoa_global.ExcuteSQL(sql);
             Hyoa_flowfield.ID = v_uids[i];
             Hyoa_flowfield.Delete();
         }
     }
     this.txtuids.Value = "";
     //DataPlay(1);
     DataPlay(System.Int32.Parse(this.curpage.Text));
 }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:23,代码来源:list_flowfield.aspx.cs


示例6: hyjs

 public string hyjs()
 {
     //输出查询字段的JS start
     HyoaClass.Hyoa_listsearchfield Hyoa_listsearchfield = new HyoaClass.Hyoa_listsearchfield();
     DataTable dtlistsearch = Hyoa_listsearchfield.GetlistsearchfieldsbyMudelidAndTableid(this.txtmudelid.Value,this.txttableid.Value);
     HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
     DataTable dtgetsqlfield;
     string ls_return = "";
     string fieldfz = "";//对应域JS域值
     ls_return += "<script>function jssearch()"; //js生成
     ls_return += "{fm = document.forms[0];";//js生成
     for (int t = 0; t < dtlistsearch.Rows.Count; t++)
     {
         //根据模块ID和当前域名和表名id得到SQL字段 ztmztm
         dtgetsqlfield = Hyoa_flowfield.GetSQLfieldBymudelidAndFieldidAndTableid(this.txtmudelid.Value, dtlistsearch.Rows[t]["hy_fieldid"].ToString(), this.txttableid.Value);
         fieldfz = "fm." + dtgetsqlfield.Rows[0]["hy_sqlfield"].ToString() + ".value = fm." + dtgetsqlfield.Rows[0]["hy_sqlfield"].ToString() + "_1.value;";
         if (dtgetsqlfield.Rows[0]["hy_fieldtype"].ToString()=="数值")
         {
             fieldfz = "fm." + dtgetsqlfield.Rows[0]["hy_sqlfield"].ToString() + "_start.value = fm." + dtgetsqlfield.Rows[0]["hy_sqlfield"].ToString() + "_start_1.value;";
             fieldfz += "fm." + dtgetsqlfield.Rows[0]["hy_sqlfield"].ToString() + "_end.value = fm." + dtgetsqlfield.Rows[0]["hy_sqlfield"].ToString() + "_end_1.value;";
         }
         if (dtgetsqlfield.Rows[0]["hy_fieldtype"].ToString() == "日期")
         {
             fieldfz = "fm." + dtgetsqlfield.Rows[0]["hy_sqlfield"].ToString() + "_start.value = fm." + dtgetsqlfield.Rows[0]["hy_sqlfield"].ToString() + "_start_1.value;";
             fieldfz += "fm." + dtgetsqlfield.Rows[0]["hy_sqlfield"].ToString() + "_end.value = fm." + dtgetsqlfield.Rows[0]["hy_sqlfield"].ToString() + "_end_1.value;";
         }
         if (dtgetsqlfield.Rows[0]["hy_fieldtype"].ToString() == "对话框列表")
         {
             //document.forms[0].fNumber(域名).options[document.forms[0].fNumber(域名).selectedIndex].text
             fieldfz += "fm." + dtgetsqlfield.Rows[0]["hy_sqlfield"].ToString() + ".value = fm." + dtgetsqlfield.Rows[0]["hy_sqlfield"].ToString() + "_1.options[fm." + dtgetsqlfield.Rows[0]["hy_sqlfield"].ToString() + "_1.selectedIndex].text;";
         }
         ls_return += fieldfz;
         dtgetsqlfield.Clear();
     }
     ls_return += "fm.btnsearch.click();";//js生成
     ls_return += "}</script>";//js生成
     return ls_return;
 }
开发者ID:wjszxli,项目名称:Webapp,代码行数:38,代码来源:list_db.aspx.cs


示例7: GetFieldHtml

    //得到某一个字段的HTML
    //pi_flag 0:不赋值  1:需赋值
    //ifsearch:是否查询时使用 0:非查询时使用 1:查询时使用
    public string GetFieldHtml(string hy_mudelid, string hy_fieldid, string pi_flag, string hy_tableid, string ifsearch)
    {
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        DataTable dtfield = Hyoa_flowfield.GetSQLfieldBymudelidAndFieldidAndTableid(hy_mudelid, hy_fieldid, hy_tableid);
        HyoaClass.DAO db = new HyoaClass.DAO();
        string lsField = "";
        string field_css = "";
        string field_value = "";
        string field_functionhy_onclick = "";
        string field_functionhy_ondblclick = "";
        string field_functionhy_onchange = "";
        string field_functionhy_onkeydown = "";
        string field_functionhy_onkeyup = "";

        if (dtfield.Rows.Count > 0)
        {
            //得到该字段的样式start
            if (dtfield.Rows[0]["hy_ifreadonly"].ToString() == "是")
            {
                if (ifsearch == "0")
                    field_css += " readonly ";
            }
            if (dtfield.Rows[0]["hy_class"].ToString() != "")
            {
                field_css += " class='" + dtfield.Rows[0]["hy_class"].ToString() + "' ";
            }
            if (dtfield.Rows[0]["hy_width"].ToString() != "")
            {
                field_css += " style='width:" + dtfield.Rows[0]["hy_width"].ToString() + ";";
            }
            else
            {
                field_css += " style='";
            }
            if (dtfield.Rows[0]["hy_height"].ToString() != "")
            {
                field_css += " height:" + dtfield.Rows[0]["hy_height"].ToString() + "'";
            }
            else
            {
                field_css += "'";
            }

            //默认值
            //默认值取值的方式,查询时不使用默认值
            if (ifsearch == "0")
            {
                if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() != "")
                {
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "0")
                        field_value += dtfield.Rows[0]["hy_defaultvalue"].ToString();

                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "1")
                    {
                        DataTable dtdefault = db.GetDataTable(dtfield.Rows[0]["hy_defaultvalue"].ToString());
                        if (dtdefault.Rows.Count > 0)
                            field_value += dtdefault.Rows[0][0].ToString();
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "2")
                    {
                        field_value += Session[dtfield.Rows[0]["hy_defaultvalue"].ToString()].ToString();
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "3")
                    {
                        if (dtfield.Rows[0]["hy_defaultvalue"].ToString() == "yyyy-mm-dd")
                            field_value += System.DateTime.Now.ToShortDateString();
                        else
                            field_value += System.DateTime.Now.ToString();
                    }
                }
            }

            //事件
            if (dtfield.Rows[0]["hy_onclick"].ToString() != "")
            {
                field_functionhy_onclick += " onclick=\"" + dtfield.Rows[0]["hy_onclick"].ToString() + "\" ";
            }
            if (dtfield.Rows[0]["hy_ondblclick"].ToString() != "")
            {
                field_functionhy_ondblclick += " ondblclick=\"" + dtfield.Rows[0]["hy_ondblclick"].ToString() + "\" ";
            }
            if (dtfield.Rows[0]["hy_onchange"].ToString() != "")
            {
                field_functionhy_onchange += " onchange=\"" + dtfield.Rows[0]["hy_onchange"].ToString() + "\" ";
            }
            if (dtfield.Rows[0]["hy_onkeydown"].ToString() != "")
            {
                field_functionhy_onkeydown += " onkeydown=\"" + dtfield.Rows[0]["hy_onkeydown"].ToString() + "\" ";
            }
            if (dtfield.Rows[0]["hy_onkeyup"].ToString() != "")
            {
                field_functionhy_onkeyup += " onkeyup=\"" + dtfield.Rows[0]["hy_onkeyup"].ToString() + "\" ";
            }
            //得到该字段的样式end
            string field_type = dtfield.Rows[0]["hy_fieldtype"].ToString();
            //单行文本
            if (field_type == "文本")
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:Webapp,代码行数:101,代码来源:list_db.aspx.cs


示例8: GetSearchTableHtml

    //输出查询字段的表格(查询输入框)
    public void GetSearchTableHtml()
    {
        HyoaClass.Hyoa_listsearchfield Hyoa_listsearchfield = new HyoaClass.Hyoa_listsearchfield();
        DataTable dtlistsearch = new DataTable();
        if (this.txtlistid.Value == "")
        {
            dtlistsearch = Hyoa_listsearchfield.GetlistsearchfieldsbyMudelidAndTableid(this.txtmudelid.Value, this.txttableid.Value);
        }
        else
        {
            dtlistsearch = Hyoa_listsearchfield.Getlistsearchfieldsbylistid(this.txtlistid.Value);
        }
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        //得到表单配置信息
        HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
        DataTable dt_tableconfig = Hyoa_tableconfig.GetTable(this.txttableid.Value);

        int li_colnums_show = int.Parse(dt_tableconfig.Rows[0]["hy_colnum"].ToString()) / 2;    //一行显示几列
        int li_rows_show = 0;   //一共有几行
        int li_ifaddcols = 0;   //所有列显示完成后,是否需要补齐显示列 0:否 1:是
        int li_addcols = 0;     //需要补齐的列数量
        if (dtlistsearch.Rows.Count % li_colnums_show == 0)
        {
            li_rows_show = dtlistsearch.Rows.Count / li_colnums_show;
            li_ifaddcols = 0;
        }
        else
        {
            li_rows_show = (dtlistsearch.Rows.Count / li_colnums_show) + 1;
            li_ifaddcols = 1;
            li_addcols = li_colnums_show - (dtlistsearch.Rows.Count % li_colnums_show);
        }
        for (int i = 0; i < li_rows_show; i++)
        {
            TableRow tRow = new TableRow();
            tb_search.Rows.Add(tRow);
            for (int j = 0; j < li_colnums_show; j++)
            {
                //dtlistsearch中的记录行数
                int t = i * li_colnums_show + j;
                if ((t + 1) > dtlistsearch.Rows.Count)
                {
                    break;
                }
                //得到hyt_listsearchfield表中的hy_fieldid,
                GetFieldHtml(tRow, li_colnums_show, dtlistsearch.Rows[t]["hy_fieldid"].ToString());
            }
            //如果最后一行的列没有显示完整,则补齐
            if (li_ifaddcols == 1 && i == (li_rows_show - 1))
            {
                for (int k = 0; k < li_addcols; k++)
                {
                    TableCell tCell8 = new TableCell();
                    tRow.Cells.Add(tCell8);
                    tCell8.Height = Unit.Pixel(30);
                    tCell8.CssClass = "Tdcellleft";
                    tCell8.HorizontalAlign = HorizontalAlign.Center;
                    tCell8.Controls.Add(new LiteralControl("&nbsp;"));
                    TableCell tCell9 = new TableCell();
                    tRow.Cells.Add(tCell9);
                    tCell9.Height = Unit.Pixel(30);
                    tCell9.CssClass = "Tdcellright";
                    tCell9.HorizontalAlign = HorizontalAlign.Center;
                    tCell9.Controls.Add(new LiteralControl("&nbsp;"));
                }
            }
        }
        //插入查询按钮行
        TableRow tRow2 = new TableRow();
        tb_search.Rows.Add(tRow2);
        TableCell tCell3 = new TableCell();
        tRow2.Cells.Add(tCell3);
        tCell3.Height = Unit.Pixel(30);
        tCell3.CssClass = "Tdcellright";
        tCell3.HorizontalAlign = HorizontalAlign.Right;
        tCell3.ColumnSpan = li_colnums_show * 2;
        Button btnButton = new Button();
        btnButton.ID = "btnsearch_ht";
        btnButton.Text = " 查 询";
        btnButton.CssClass = "btn7";
        btnButton.Click += new EventHandler(btnsearch_Click);
        tCell3.Controls.Add(btnButton);
    }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:84,代码来源:list_selfdept.aspx.cs


示例9: GetFieldHtml

    //输出一个字段
    //li_tdnums_onerow:当前行已输出了几列
    //li_colnums_show:每行显示几列(标准情况下)
    //pi_isnewdoc 0:新文档  1:旧文档
    //ifhavarole:表单上是否有权限  0:lable输出 1:input输出
    //ifflowdoc:是否流程表单 0:非流程 1:流程
    //curtacheid:当前环节ID,用于判断字段是否在当前环节有权限
    public int GetFieldHtml(TableRow tRow, int li_tdnums_onerow, int li_colnums_show, string hy_fieldid, string pi_isnewdoc, string ifhavarole, string ifflowdoc, string curtacheid)
    {
        int li_return = li_tdnums_onerow;

        string ls_laborinput = "0";     //输出LABLE还是INPUT    0:LABLE    1:INPUT
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        DataTable dtfield = Hyoa_flowfield.GetSQLfieldBymudelidAndFieldidAndTableid(this.hy_mudelid.Text, hy_fieldid, this.hy_tableid.Text);

        int li_left = 30;
        int li_right = 70;
        if (dtfield.Rows.Count > 0)
        {
            string field_type = dtfield.Rows[0]["hy_fieldtype"].ToString();     //字段类型
            if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() != "5")   //如果设置了不显示左侧说明文字,则不加载左侧列
            {
                li_return += 1;
                //插入单元格(左侧)
                TableCell tCell = new TableCell();
                tRow.Cells.Add(tCell);
                tCell.Width = Unit.Percentage((li_left / li_colnums_show));
                tCell.Height = Unit.Pixel(30);
                tCell.CssClass = "Tdcellleft";
                tCell.HorizontalAlign = HorizontalAlign.Center;
                tCell.Controls.Add(new LiteralControl(dtfield.Rows[0]["hy_fieldname"].ToString()));
            }
            else
            {
                li_left = 50;
                li_right = 50;
            }
            //插入单元格(右侧)
            TableCell tCell2 = new TableCell();
            tRow.Cells.Add(tCell2);
            tCell2.Width = Unit.Percentage((li_right / li_colnums_show));
            tCell2.Height = Unit.Pixel(30);
            tCell2.CssClass = "Tdcellright";
            if (dtfield.Rows[0]["hy_align"].ToString() == "left")
            {
                tCell2.HorizontalAlign = HorizontalAlign.Left;
            }
            if (dtfield.Rows[0]["hy_align"].ToString() == "center")
            {
                tCell2.HorizontalAlign = HorizontalAlign.Center;
            }
            if (dtfield.Rows[0]["hy_align"].ToString() == "right")
            {
                tCell2.HorizontalAlign = HorizontalAlign.Right;
            }
            tCell2.ColumnSpan = int.Parse(dtfield.Rows[0]["hy_tdnums"].ToString());
            li_return += int.Parse(dtfield.Rows[0]["hy_tdnums"].ToString());

            //赋值(新文档取配置的默认值,旧文档取数据库表中的值)
            string field_docvalue = "";
            if (pi_isnewdoc == "0")     //新文档
            {
                if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() != "-1")
                {
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "0")
                    {
                        field_docvalue = dtfield.Rows[0]["hy_defaultvalue"].ToString();     //手工配置
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "1")
                    {
                        DataTable dt_getfieldvalue = Hyoa_global.GetDataTable(dtfield.Rows[0]["hy_defaultvalue"].ToString());
                        field_docvalue = dt_getfieldvalue.Rows[0][0].ToString();     //SQL语句
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "2")
                    {
                        field_docvalue = Session[dtfield.Rows[0]["hy_defaultvalue"].ToString()].ToString();     //SESSION
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "3")
                    {
                        if (dtfield.Rows[0]["hy_defaultvalue"].ToString() == "yyyy-mm-dd")
                            field_docvalue = System.DateTime.Now.ToString("yyyy-MM-dd");     //当前时间
                        else
                            field_docvalue = System.DateTime.Now.ToString("yyyy-MM-dd HH:MM:ss");     //当前时间
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "4")
                    {
                        //自动生成
                        if (dtfield.Rows[0]["hy_fieldtype"].ToString() == "数值")
                        {
                            //得到目前最大的数值,然后+1,未找到则赋值为1
                            DataTable dt_autovalue = Hyoa_global.GetDataTable("select max(hyc_" + hy_fieldid + ") maxint from hyc_" + this.hy_tableid.Text);
                            if (dt_autovalue.Rows[0]["maxint"].ToString() == null || dt_autovalue.Rows[0]["maxint"].ToString() == "")
                                field_docvalue += "1";
                            else
                                field_docvalue += (System.Int32.Parse(dt_autovalue.Rows[0]["maxint"].ToString()) + 1).ToString();
                        }
                        else
                        {
                            field_docvalue += System.Guid.NewGuid().ToString();
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:101,代码来源:main_look.aspx.cs


示例10: btnDRToSQL_Click


//.........这里部分代码省略.........
            lsTablekdjrht.Add("xmssjclf");

        }

        //信息化工程合同
        else if (this.tableid.Value == "Tablezdyht")
        {
            //合同编号
            lsTablekdjrht.Add("htbh");
            //单位名称
            lsTablekdjrht.Add("jfmc");
            //乙方名称
            lsTablekdjrht.Add("yfmc");
            //丙方名称
            lsTablekdjrht.Add("bfmc");
            //合同名称
            lsTablekdjrht.Add("htmc");
            //合同金额
            lsTablekdjrht.Add("htje");
            //签订时间
            lsTablekdjrht.Add("qdsj");
            //起始日期
            lsTablekdjrht.Add("htkssj");
            //结束日期
            lsTablekdjrht.Add("htzzsj");
            //合同内容
            lsTablekdjrht.Add("htnr");
            //负责人
            lsTablekdjrht.Add("fzr");

        }

        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();

        //链接SQL数据库
        if (FileUpload1.HasFile == false)   //HasFile用来检查FileUpload是否有指定文件
        {
            Response.Write("<script>alert('请您选择Excel文件')</script> ");
            return; //当无文件时,返回
        }
        string IsXls = System.IO.Path.GetExtension(FileUpload1.FileName).ToString().ToLower();  //System.IO.Path.GetExtension获得文件的扩展名
        if (IsXls != ".xls" && IsXls != ".xlsx")
        {
            Response.Write("<script>alert('只可以选择Excel文件')</script>");
            return; //当选择的不是Excel文件时,返回
        }

        //根据年份判断在该路径下是否存在以当年年份文件夹 否则将建立以该年份的文件夹
        string ls_ny = DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString();
        //HttpContext.Current.Server.MapPath(相对路径):把相对路径转为服务器上的绝对路径。File.Exists(绝对路径):检查是否存在绝对路径指向的文件或目录。
        if (!Directory.Exists(HttpContext.Current.Server.MapPath("~\\upload\\") + "/" + ls_ny))
        {
            //System.IO.Directory.CreateDirectory(文件夹绝对路径):建立绝对路径文件夹。
            System.IO.Directory.CreateDirectory(@HttpContext.Current.Server.MapPath("~\\upload\\") + "/" + ls_ny);
        }
        string filename = DateTime.Now.ToString("hhMMss") + FileUpload1.FileName;              //重新为文件命名,获取Execle文件名  DateTime日期函数

        // 保存文件到路径,用Server.MapPath()取当前文件的绝对目录.在asp.net里""必须用"\"代替
        string savePath = Server.MapPath(("~\\upload/" + ls_ny + "\\") + filename);//Server.MapPath 获得虚拟服务器相对路径

        FileUpload1.SaveAs(savePath);                        //SaveAs 将上传的文件内容保存在服务器上
        DataSet ds = ExecleDs(savePath, filename);           //调用自定义方法
        DataRow[] dr = ds.Tables[0].Select();            //定义一个DataRow数组
        int rowsnum = ds.Tables[0].Rows.Count;
        int i_into = 0;
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:67,代码来源:import_excel_ht.aspx.cs


示例11: DataPlay

    private void DataPlay()
    {
        //是否启用
        this.ddlifsearch.Items.Insert(0, "是");
        this.ddlifsearch.Items.Insert(1, "否");
        this.ddlifflowdoc.Items.Insert(0, "是");
        this.ddlifflowdoc.Items.Insert(1, "否");
        this.ddlifshowsearch.Items.Insert(0, "是");
        this.ddlifshowsearch.Items.Insert(1, "否");
        //模块编号
        //加载模块信息
        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, new ListItem("请选择", "请选择"));
            this.ddlmudelid.SelectedIndex = 0;
        }

        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_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
            if (this.Request.QueryString["op"] == "modify")
            {
                if (this.Request.QueryString["id"] != null)
                {
                    //根据id得到信息
                    this.txtdocid.Value = this.Request.QueryString["id"].ToString();
                    DataTable dt = Hyoa_listconfig.Getlistconfig(this.txtdocid.Value);
                    if (dt.Rows.Count > 0)
                    {
                        this.txtsort.Text = dt.Rows[0]["hy_sort"].ToString();
                        if (dt.Rows[0]["hy_ifsearch"].ToString() == "是")
                        {
                            this.ddlifsearch.SelectedIndex = 0;
                        }
                        else
                        {
                            this.ddlifsearch.SelectedIndex = 1;
                        }
                        if (dt.Rows[0]["hy_ifshowsearch"].ToString() != "否")
                        {
                            this.ddlifshowsearch.SelectedIndex = 0;
                        }
                        else
                        {
                            this.ddlifshowsearch.SelectedIndex = 1;
                        }
                        this.ddlmudelid.SelectedValue = dt.Rows[0]["hy_mudelid"].ToString();
                        if (dt.Rows[0]["hy_ifflowdoc"].ToString() == "是")
                        {
                            this.ddlifflowdoc.SelectedIndex = 0;
                        }
                        else
                        {
                            this.ddlifflowdoc.SelectedIndex = 1;
                        }
                        this.txthy_listname.Text = dt.Rows[0]["hy_listname"].ToString();
                        this.txtwidth.Text = dt.Rows[0]["hy_width"].ToString();

                        //加载所有列信息
                        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
                        DataTable dtflowfield;

                        //dtflowfield = Hyoa_flowfield.Getflowfields();
                        dtflowfield = Hyoa_flowfield.GetflowfieldsbyMudelidAndTableid(dt.Rows[0]["hy_mudelid"].ToString(), dt.Rows[0]["hy_tableid"].ToString());
                        if (dtflowfield.Rows.Count > 0)
                        {
                            this.ddlcolumnshow.DataSource = dtflowfield;
                            this.ddlcolumnshow.DataTextField = "hy_fieldname";
                            this.ddlcolumnshow.DataValueField = "hy_fieldid";
                            this.ddlcolumnshow.DataBind();
                            this.ddlcolumnshow.SelectedIndex = 0;
                        }
                        dtflowfield.Clear();

                        //将列都列出来
                        string[] lv_columnshowselect;
                        string[] lv_columnshowselectid;
                        lv_columnshowselect = dt.Rows[0]["hy_columnshow"].ToString().Split(',');
                        lv_columnshowselectid = dt.Rows[0]["hy_columnshowid"].ToString().Split(',');
                        for (int j = 0; j < lv_columnshowselect.Length; j++)
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:101,代码来源:main_listconfig.aspx.cs


示例12: getExcelContent

    //需要导出的内容
    private string getExcelContent()
    {
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        //根据表ID和模块ID得到当前传进来的模块是否有流程
        HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
        DataTable dttableconfig = Hyoa_tableconfig.GetTablesbymudelidandtableid(this.txtmudelid.Value, this.txttableid.Value);

        //根据表单得到对应的所有字段
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        DataTable dtflowfield = Hyoa_flowfield.Getflowfieldsbytableid(dttableconfig.Rows[0]["ID"].ToString());
        //循环所有字段
        string ls_flowfield = "";
        if (dtflowfield.Rows.Count > 0)
        {
            for (int i = 0; i < dtflowfield.Rows.Count; i++)
            {
                string ls_fieldtype = dtflowfield.Rows[i]["hy_fieldtype"].ToString();
                if (ls_fieldtype == "文本" || ls_fieldtype == "多行文本" || ls_fieldtype == "文本加按钮" || ls_fieldtype == "多行文本加按钮" || ls_fieldtype == "日期" || ls_fieldtype == "数值" || ls_fieldtype == "对话框列表" || ls_fieldtype == "复选框" || ls_fieldtype == "单选框" || ls_fieldtype == "口令")
                {
                    ls_flowfield += ",a.hyc_" + dtflowfield.Rows[i]["hy_fieldid"].ToString();
                }
            }
        }

        HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
        DataTable dtlist = Hyoa_listconfig.Getlistconfig(this.txtlistid.Value);     //列表配置

        #region ---查询条件---
        string cmdStr_Search = "";
        if (txtsearchfields.Text != "")
        {
            string[] lv_searchfields = txtsearchfields.Text.Split(',');
            string[] lv_searchfields_sx = txtsearchfields_sx.Text.Split(',');
            for (int i = 0; i < lv_searchfields.Length; i++)
            {
                string ls_fieldid = lv_searchfields[i].ToString();
                string ls_fieldid_sx = lv_searchfields_sx[i].ToString();
                string ls_searchtext = "";
                if (this.Request.Form[ls_fieldid] != null)
                {
                    ls_searchtext = this.Request.Form[ls_fieldid].ToString();
                }
                if (ls_searchtext != "")
                {
                    if (ls_fieldid_sx == "0")
                    {
                        cmdStr_Search += " and hyc_" + ls_fieldid + " like '%" + ls_searchtext + "%' ";
                    }
                    else
                    {
                        if (ls_fieldid_sx == "1")
                        {
                            if (Session["conntype"].ToString() == "SQL")
                            {
                                cmdStr_Search += " and left(CONVERT(varchar, hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ", 120 ) ,10) >= '" + ls_searchtext + "' ";
                            }
                            if (Session["conntype"].ToString() == "ORACLE")
                            {
                                cmdStr_Search += " and to_char(hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ",'YYYY-MM-DD') >= '" + ls_searchtext + "' ";
                            }
                        }
                        if (ls_fieldid_sx == "2")
                        {
                            if (Session["conntype"].ToString() == "SQL")
                            {
                                cmdStr_Search += " and left(CONVERT(varchar, hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ", 120 ) ,10) <= '" + ls_searchtext + "' ";
                            }
                            if (Session["conntype"].ToString() == "ORACLE")
                            {
                                cmdStr_Search += " and to_char(hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ",'YYYY-MM-DD') <= '" + ls_searchtext + "' ";
                            }
                        }
                        if (ls_fieldid_sx == "3")
                        {
                            cmdStr_Search += " and hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + " >= " + ls_searchtext + " ";
                        }
                        if (ls_fieldid_sx == "4")
                        {
                            cmdStr_Search += " and hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + " <= " + ls_searchtext + " ";
                        }
                    }
                }
            }
        }
        #endregion ---查询条件---

        #region ---排序---
        string cmdStr_SearchSort = "";
        if (dtlist.Rows[0]["hy_sortfield1"].ToString() != "")
        {
            if (cmdStr_SearchSort == "")
            {
                cmdStr_SearchSort = " order by hyc_" + dtlist.Rows[0]["hy_sortfield1"].ToString() + " " + dtlist.Rows[0]["hy_sorttype1"].ToString();
            }
            else
            {
                cmdStr_SearchSort += " ,hyc_" + dtlist.Rows[0]["hy_sortfield1"].ToString() + " " + dtlist.Rows[0]["hy_sorttype1"] 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# HyoaClass.Hyoa_global类代码示例发布时间:2022-05-24
下一篇:
C# HyoaClass.DAO类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap