コード例 #1
0
        private void AddTopNodes()
        {
            DataView       dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("RG_会员类别");
            EpointTreeNode node;

            for (int i = 0; i < dv.Count; i++)
            {
                node       = new EpointTreeNode();
                node.Text  = dv[i]["ItemText"].ToString();
                node.Value = dv[i]["ItemValue"].ToString();
                //int count = Epoint.MisBizLogic2.DB.ExecuteToInt("select count(RoleName) from RG_Role where UserType='" + node.Value + "'");
                int count = Convert.ToInt32(Epoint.MisBizLogic2.DB.ExecuteToString("select count(Row_ID) from RG_User where usertype like '%" + node.Value + ";%'"));

                //int count2 = Epoint.MisBizLogic2.DB.ExecuteToInt("select count(S.DispName) from RG_User as S where  not exists(select * from RG_User_Role where S.RowGuid=RG_User_Role.RGUserGuid)  and  UserType='" + node.Value + "' and S.UserStatus=002 and S.IsValid=1 and DelFlag=0");
                if (count == 0)//
                {
                    node.PopulateOnDemand = false;
                }
                else
                {
                    node.PopulateOnDemand = true;
                }
                node.ShowInputCtrl = false;
                TreeViewUserList.Nodes.Add(node);
            }
        }
コード例 #2
0
ファイル: RG_FuJian_List.aspx.cs プロジェクト: hi-noikiy/kcsj
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                lblTableName.Text = oListPage.TableDetail.TableName;
                //this.CurrentHead = oListPage.TableDetail.TableName;
                if (Request["type"] != "1")
                {
                    this.s_xiangMuJL.Enabled = false;
                }

                #region 是否联机表
                if (oListPage.TableDetail.Is_OnlineTable == "1")
                {
                    //btnAddRecord.Visible = false;
                    //btnDel.Visible = false;
                }
                else
                {
                    //btnAddRecord.Visible = true;
                    //btnDel.Visible = true;
                }
                #endregion

                #region 填充 项目来源
                DataView dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("苏州创投_项目来源");
                if (dv.Count > 0)
                {
                    for (int i = 0; i < dv.Count; i++)
                    {
                        this.s_xiangMuLY.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                #region 填充 管理平台
                DataView dv_GLPT = new SVGBLL.Pro_Fund().Select_guanLiPT_byUserGuid(Session["UserGuid"].ToString());
                if (dv_GLPT.Count > 0)
                {
                    for (int i = 0; i < dv_GLPT.Count; i++)
                    {
                        this.s_GuanLiPT.Items.Add(new ListItem(dv_GLPT[i]["s_guanlir"].ToString(), dv_GLPT[i]["rowguid"].ToString()));
                    }
                }
                #endregion

                #region 填充 项目状态
                dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("苏州创投_项目状态");
                if (dv.Count > 0)
                {
                    for (int i = 1; i < dv.Count; i++)
                    {
                        this.s_xiangMuZT.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                this.RefreshGrid();
            }
        }
コード例 #3
0
ファイル: Matter_Edit.aspx.cs プロジェクト: kingofhawks/kcsj
 protected void BindMatterName()
 {
     DataView dvDefaultMatter = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("RG_Ĭ������");
     dplMatterName.DataSource = dvDefaultMatter;
     dplMatterName.DataTextField = "ItemText";
     dplMatterName.DataValueField = "ItemValue";
     dplMatterName.DataBind();
 }
コード例 #4
0
ファイル: Matter_Add.aspx.cs プロジェクト: hi-noikiy/kcsj
        protected void BindMatterName()
        {
            DataView dvDefaultMatter = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("RG_默认事项");

            dplMatterName.DataSource     = dvDefaultMatter;
            dplMatterName.DataTextField  = "ItemText";
            dplMatterName.DataValueField = "ItemValue";
            dplMatterName.DataBind();
        }
コード例 #5
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                #region 填充 项目来源
                DataView dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("苏州创投_项目来源");
                if (dv.Count > 0)
                {
                    for (int i = 0; i < dv.Count; i++)
                    {
                        this.s_xiangMuLY.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                #region 填充 管理平台
                DataView dv_GLPT = new SVGBLL.Pro_Fund().Select_guanLiPT_byUserGuid(Session["UserGuid"].ToString());
                if (dv_GLPT.Count > 0)
                {
                    for (int i = 0; i < dv_GLPT.Count; i++)
                    {
                        this.s_GuanLiPT.Items.Add(new ListItem(dv_GLPT[i]["s_guanlir"].ToString(), dv_GLPT[i]["rowguid"].ToString()));
                    }
                }
                #endregion

                #region 填充 项目状态
                dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("苏州创投_项目状态");
                if (dv.Count > 0)
                {
                    for (int i = 1; i < dv.Count; i++)
                    {
                        this.s_xiangMuZT.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion



                //
                lblTableName.Text = oListPage.TableDetail.TableName;
                //


                this.RefreshGrid();
                if (base.isAdmin == true)
                {
                    this.btnDel.Enabled = true;
                }
                else
                {
                    this.btnDel.Enabled = false;
                }
            }
        }
コード例 #6
0
 /// <summary>
 /// 绑定单位的单位类别
 /// </summary>
 private void BindOuType()
 {
     if (UserType_2010.SelectedItem.Value == "002")
     {
         DataView dvOuType = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("RG_会员单位");
         if (dvOuType.Count > 0)
         {
             cblOUTypeOU.DataTextField  = "ItemText";
             cblOUTypeOU.DataValueField = "ItemValue";
             cblOUTypeOU.DataSource     = dvOuType;
             cblOUTypeOU.DataBind();
         }
     }
 }
コード例 #7
0
        /// <summary>
        /// 加载会员单位类别
        /// </summary>
        private void AddTopNodes()
        {
            DataView       dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("RG_会员单位");
            EpointTreeNode node;

            for (int i = 0; i < dv.Count; i++)
            {
                node                  = new EpointTreeNode();
                node.Text             = dv[i]["ItemText"].ToString();
                node.Value            = dv[i]["ItemValue"].ToString() + "&0";
                node.PopulateOnDemand = true;
                node.ShowInputCtrl    = false;
                TreeViewOUUserList.Nodes.Add(node);
            }
        }
コード例 #8
0
 /// <summary>
 /// 加载RG_会员类别
 /// </summary>
 private void AddTopNodes()
 {
     DataView dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("RG_会员单位");
     EpointTreeNode node;
     for (int i = 0; i < dv.Count; i++)
     {
         node = new EpointTreeNode();
         node.Text = dv[i]["ItemText"].ToString();
         node.Value = dv[i]["ItemValue"].ToString();
         node.PopulateOnDemand = false;
         node.ShowInputCtrl = true;
         node.CtrlClickFunction = "AutoSetPValue(this, '" + node.Text + "', '" + node.Value + "')";
         TreeViewOUTypeList.Nodes.Add(node);
     }
 }
コード例 #9
0
ファイル: GetOUTypeTree.aspx.cs プロジェクト: hi-noikiy/kcsj
        /// <summary>
        /// 加载RG_会员类别
        /// </summary>
        private void AddTopNodes()
        {
            DataView       dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("RG_会员单位");
            EpointTreeNode node;

            for (int i = 0; i < dv.Count; i++)
            {
                node                   = new EpointTreeNode();
                node.Text              = dv[i]["ItemText"].ToString();
                node.Value             = dv[i]["ItemValue"].ToString();
                node.PopulateOnDemand  = false;
                node.ShowInputCtrl     = true;
                node.CtrlClickFunction = "AutoSetPValue(this, '" + node.Text + "', '" + node.Value + "')";
                TreeViewOUTypeList.Nodes.Add(node);
            }
        }
コード例 #10
0
        /// <summary>
        /// 加载RG_会员类别
        /// </summary>
        private void AddTopNodes()
        {
            DataView       dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("RG_会员类别");
            EpointTreeNode node;

            for (int i = 0; i < dv.Count; i++)
            {
                node       = new EpointTreeNode();
                node.Text  = dv[i]["ItemText"].ToString();
                node.Value = dv[i]["ItemValue"].ToString() + "@UserType";
                Boolean hasChild = Epoint.MisBizLogic2.DB.ExecuteToInt("select count(RoleName) from RG_Role where UserType='" + dv[i]["ItemValue"].ToString() + "'") > 0;
                if (hasChild)
                {
                    node.PopulateOnDemand = true;
                }
                else
                {
                    node.PopulateOnDemand = false;
                }
                node.CtrlClickFunction = "AutoSetPValue(this, '" + node.Text + "', '" + node.Value + "')";
                TreeViewRoleList.Nodes.Add(node);
            }
        }
コード例 #11
0
 /// <summary>
 /// 加载会员单位类别
 /// </summary>
 private void AddTopNodes()
 {
     DataView dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("RG_会员单位");
     EpointTreeNode node;
     for (int i = 0; i < dv.Count; i++)
     {
         node = new EpointTreeNode();
         node.Text = dv[i]["ItemText"].ToString();
         node.Value = dv[i]["ItemValue"].ToString() + "&0";
         node.PopulateOnDemand = true;
         node.ShowInputCtrl = false;
         TreeViewOUUserList.Nodes.Add(node);
     }
 }
コード例 #12
0
ファイル: GetUserTree.aspx.cs プロジェクト: kingofhawks/kcsj
        private void AddTopNodes()
        {
            DataView dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("RG_会员类别");
            EpointTreeNode node;
            for (int i = 0; i < dv.Count; i++)
            {
                node = new EpointTreeNode();
                node.Text = dv[i]["ItemText"].ToString();
                node.Value = dv[i]["ItemValue"].ToString();
                //int count = Epoint.MisBizLogic2.DB.ExecuteToInt("select count(RoleName) from RG_Role where UserType='" + node.Value + "'");
                int count = Convert.ToInt32(Epoint.MisBizLogic2.DB.ExecuteToString("select count(Row_ID) from RG_User where usertype like '%" + node.Value + ";%'"));

                //int count2 = Epoint.MisBizLogic2.DB.ExecuteToInt("select count(S.DispName) from RG_User as S where  not exists(select * from RG_User_Role where S.RowGuid=RG_User_Role.RGUserGuid)  and  UserType='" + node.Value + "' and S.UserStatus=002 and S.IsValid=1 and DelFlag=0");
                if (count == 0)//
                {
                    node.PopulateOnDemand = false;
                }
                else
                    node.PopulateOnDemand = true;
                node.ShowInputCtrl = false;
                TreeViewUserList.Nodes.Add(node);
            }
        }
コード例 #13
0
ファイル: CommonFunc.cs プロジェクト: kingofhawks/kcsj
        public void RenderNewTable_WebControl2(Control controlPlaceHolder, DataView DvFields, int TableID)
        {
            string str_ControlID_Prefix = controlPlaceHolder.ClientID.Remove(controlPlaceHolder.ClientID.LastIndexOf('_'));

            HtmlTable tbReport = new HtmlTable();
            tbReport.Width = "100%";
            tbReport.ID = "Table_Add";
            tbReport.CellSpacing = 1;

            Epoint.MisBizLogic2.Code.DB_CodeItem codes = new Epoint.MisBizLogic2.Code.DB_CodeItem();
            Epoint.MisBizLogic2.Code.DB_CodeMain main = new Epoint.MisBizLogic2.Code.DB_CodeMain();
            //DvFields.Sort = "OrderNumInGrid desc";
            HtmlTableRow trNew = new HtmlTableRow();
            HtmlTableCell cell = new HtmlTableCell();

            TextBox txtInCell = new TextBox();
            Epoint.Web.UI.WebControls2X.TextBox txtInCellMulText = new Epoint.Web.UI.WebControls2X.TextBox();
            Button btnInCell = new Button();
            LiteralControl ltcInCell = new LiteralControl();
            System.Web.UI.HtmlControls.HtmlInputFile fileUpload = new HtmlInputFile();

            CompareValidator comp;
            RequiredFieldValidator req;
            RegularExpressionValidator reg;
            Epoint.Web.UI.WebControls2X.TreeViewControls.TextTreeView tvcIncell;
            ListItem item;
            string strFieldName = "";

            int j = 0;
            string strValueUrl = "";

            //Add By XGC 2009-12-1 筛选不需要显示的字段
            DvFields.RowFilter = "DispInAdd=1";
            for (int i = 0; i < DvFields.Count; i++)
            {

                //字段中文名称单元格
                cell = new HtmlTableCell();
                //add by liq 为了实现字段的隐藏,需要标识单元格   2008-10-18
                cell.ID = "FieldDesc_" + DvFields[i]["fieldName"].ToString() + "_" + TableID.ToString();

                if (Convert.ToString(DvFields[i]["IsAllNull"]) == "1")
                    cell.InnerHtml = DvFields[i]["fieldChineseName"].ToString() + "<font color=red>(*)</font>";
                else
                    cell.InnerText = DvFields[i]["fieldChineseName"].ToString();

                cell.Attributes.Add("class", "TableSpecial1");
                cell.Width = "15%";

                trNew.Cells.Add(cell);

                strFieldName = DvFields[i]["fieldName"].ToString();

                //字段控件单元格
                cell = new HtmlTableCell();
                cell.Attributes.Add("Class", "TableSpecial");
                cell.Height = "26";
                cell.Width = "85%";

                //add by liq 为了实现字段的隐藏,需要标识单元格   2008-10-18
                cell.ID = "FieldInput_" + DvFields[i]["fieldName"].ToString() + "_" + TableID.ToString();

                #region 根据字段类型写入控件
                //外键字段不需要填写

                switch (DvFields[i]["fieldDisplayType"].ToString().ToLower())
                {
                    case "textbox":
                        #region TextBox类型
                        //strValueUrl = GetValueUrlProperty(DvFields[i]["ValueUrl"]);
                        txtInCell = new Epoint.Web.UI.WebControls2X.TextBox();// TextBox();
                        txtInCell.ID = strFieldName + "_" + TableID;
                        if (strValueUrl == "")
                        {
                            txtInCell.Width = Unit.Percentage(80);
                        }
                        txtInCell.BackColor = System.Drawing.Color.FromName("white");
                        txtInCell.BorderStyle = BorderStyle.Inset;
                        txtInCell.Font.Size = FontUnit.Point(9);
                        txtInCell.EnableViewState = true;

                        txtInCell.Attributes.Add("datatype", DvFields[i]["fieldType"].ToString());
                        txtInCell.Attributes.Add("maxsize", DvFields[i]["fieldLength"].ToString());
                        txtInCell.Attributes.Add("chname", DvFields[i]["fieldChineseName"].ToString());

                        cell.Controls.Add(txtInCell);

                        if (strValueUrl != "")
                        {
                            cell.Controls.Add(new LiteralControl("<input type=\"button\" value=\"...\" onclick=\"java" + "script:SelectUrl(" + str_ControlID_Prefix + "_" + txtInCell.ID + ",'" + HttpContext.Current.Request.ApplicationPath + "/EpointMis/Pages/BackEnd/iFrame.aspx?PageUrl=" + strValueUrl + "')\">"));
                        }

                        //对于数值型的控件,右对齐

                        if (DvFields[i]["FieldType"].ToString().ToLower() == "numeric"
                            || DvFields[i]["FieldType"].ToString().ToLower() == "money"
                            || DvFields[i]["FieldType"].ToString().ToLower() == "int")
                        {
                            txtInCell.Style.Add("TEXT-ALIGN", "right");
                            txtInCell.Style.Add("padding-right", "2px");
                        }

                        #region 添加数字验证控件

                        string strDataType1 = DvFields[i]["fieldType"].ToString();
                        if (strDataType1.ToLower().IndexOf("int") > -1) //整数字段
                        {
                            comp = new CompareValidator();
                            comp.ID = "comp_" + strFieldName + "_" + TableID;
                            comp.ControlToValidate = txtInCell.ID;
                            comp.Operator = ValidationCompareOperator.DataTypeCheck;
                            comp.Type = ValidationDataType.Integer;
                            comp.EnableClientScript = true;
                            comp.ErrorMessage = DvFields[i]["fieldChineseName"].ToString() + ":必须填写整数类型数据!";
                            comp.Display = ValidatorDisplay.None;
                            comp.ForeColor = System.Drawing.Color.Red;
                            comp.Visible = true;
                            cell.Controls.Add(comp);
                        }

                        if (strDataType1.ToLower().IndexOf("numeric") > -1) //浮点数字段
                        {
                            comp = new CompareValidator();
                            comp.ID = "comp_" + strFieldName + "_" + TableID;
                            comp.ControlToValidate = txtInCell.ID;
                            comp.Operator = ValidationCompareOperator.DataTypeCheck;
                            comp.Type = ValidationDataType.Double;
                            comp.EnableClientScript = true;
                            comp.ErrorMessage = DvFields[i]["fieldChineseName"].ToString() + ":不是合法的数字!";
                            comp.Display = ValidatorDisplay.None;
                            comp.ForeColor = System.Drawing.Color.Red;
                            comp.Visible = true;
                            cell.Controls.Add(comp);
                        }

                        if (strDataType1.ToLower().IndexOf("datetime") > -1) //浮点数字段
                        {
                            comp = new CompareValidator();
                            comp.ID = "comp_" + strFieldName + "_" + TableID;
                            comp.ControlToValidate = txtInCell.ID;
                            comp.Operator = ValidationCompareOperator.DataTypeCheck;
                            comp.Type = ValidationDataType.Date;
                            comp.EnableClientScript = true;
                            comp.ErrorMessage = DvFields[i]["fieldChineseName"].ToString() + ":不是合法的日期!";
                            comp.Display = ValidatorDisplay.None;
                            comp.ForeColor = System.Drawing.Color.Red;
                            comp.Visible = true;
                            cell.Controls.Add(comp);
                        }
                        #endregion

                        #region 必填校验和正则表达式校验

                        if (Convert.ToString(DvFields[i]["IsAllNull"]) == "1")
                        {
                            req = new RequiredFieldValidator();
                            req.ID = "req_" + strFieldName + "_" + TableID;
                            req.ControlToValidate = txtInCell.ID;
                            req.Display = ValidatorDisplay.None;
                            req.ErrorMessage = DvFields[i]["fieldChineseName"].ToString() + "必填";
                            cell.Controls.Add(req);
                        }

                        if (Convert.ToString(DvFields[i]["validCheckFormula"]) != "")
                        {
                            reg = new RegularExpressionValidator();
                            reg.ID = "reg_" + strFieldName + "_" + TableID;
                            reg.ValidationExpression = Convert.ToString(DvFields[i]["validCheckFormula"]);
                            reg.ControlToValidate = txtInCell.ID;
                            reg.Display = ValidatorDisplay.None;
                            reg.ErrorMessage = DvFields[i]["fieldChineseName"].ToString() + ":不符合格式要求";
                            cell.Controls.Add(reg);
                        }
                        #endregion
                        break;
                        #endregion
                    case "datetimepick":
                    case "datepick"://add by liq 2008-6-30
                        #region 日期类型
                        Epoint.Web.UI.WebControls2X.DateTextBox dtb = new Epoint.Web.UI.WebControls2X.DateTextBox();
                        dtb.ID = strFieldName + "_" + TableID;
                        dtb.Character = Epoint.Web.UI.WebControls2X.DateCharacter.HX;
                        if (Convert.ToString(DvFields[i]["IsAllNull"]) == "1")
                        {
                            dtb.AllowNull = false;
                            dtb.RelationName = DvFields[i]["fieldChineseName"].ToString();
                        }
                        if (DvFields[i]["fieldDisplayType"].ToString().ToLower() == "datetimepick")
                        {
                            dtb.DateControlType = Epoint.Web.UI.WebControls2X.eDateTextBox.DateTime;
                        }
                        else
                        {
                            dtb.DateControlType = Epoint.Web.UI.WebControls2X.eDateTextBox.Date;
                        }
                        dtb.InputDateType = Epoint.Web.UI.WebControls2X.eInputDateType.Select;

                        cell.Controls.Add(dtb);
                        break;
                        #endregion
                    case "html":

                        break;
                    case "dropdownlist":
                        #region 下拉框类型
                        DropDownList jpdIncell = new DropDownList();
                        jpdIncell.ID = strFieldName + "_" + TableID;
                        jpdIncell.Width = Unit.Percentage(80);
                        jpdIncell.Height = Unit.Percentage(100);
                        jpdIncell.BackColor = System.Drawing.Color.FromName("white");
                        jpdIncell.BorderStyle = BorderStyle.Inset;
                        jpdIncell.Font.Size = FontUnit.Point(9);
                        jpdIncell.EnableViewState = true;

                        //jpdIncell.DataSource = codes.Get_Items_By_CodeName(DvFields[i]["DataSource_CodeName"].ToString());
                        //jpdIncell.DataTextField = "ItemText";
                        //jpdIncell.DataValueField = "ItemValue";
                        //jpdIncell.DataBind();

                        //if (DvFields[i]["fieldDefaultValue"].ToString() != "")
                        //    jpdIncell.SelectedValue = OtherFunction.getFieldDefaultValue(DvFields[i]["fieldDefaultValue"].ToString());
                        cell.Controls.Add(jpdIncell);
                        if (Convert.ToString(DvFields[i]["IsAllNull"]) == "1")
                        {
                            System.Web.UI.WebControls.RequiredFieldValidator RFV = new RequiredFieldValidator();
                            RFV.ID = "RFV" + strFieldName;
                            RFV.ControlToValidate = jpdIncell.ID;
                            RFV.ErrorMessage = DvFields[i]["fieldChineseName"].ToString() + "必填";
                            cell.Controls.Add(RFV);
                        }
                        break;
                        #endregion
                    case "textarea":
                        #region 多行文本框
                        //strValueUrl = GetValueUrlProperty(DvFields[i]["ValueUrl"]);
                        txtInCellMulText = new Epoint.Web.UI.WebControls2X.TextBox();
                        txtInCellMulText.ID = strFieldName + "_" + TableID;
                        txtInCellMulText.Width = Unit.Percentage(97);
                        txtInCellMulText.Height = Unit.Pixel(100);
                        txtInCellMulText.TextMode = TextBoxMode.MultiLine;
                        if (strValueUrl == "")
                        {
                            txtInCellMulText.Width = Unit.Percentage(100);
                        }
                        txtInCellMulText.BackColor = System.Drawing.Color.FromName("white");
                        txtInCellMulText.BorderStyle = BorderStyle.Inset;
                        txtInCellMulText.Font.Size = FontUnit.Point(9);
                        txtInCellMulText.EnableViewState = true;

                        //txtInCellMulText.Text = OtherFunction.getDefaultText(DvFields[i]["DefaultValue"]);
                        if (txtInCellMulText.Text == "")
                        {
                            //这是默认值
                            //txtInCellMulText.Text = OtherFunction.getFieldDefaultValue(DvFields[i]["fieldDefaultValue"]);
                        }
                        cell.Controls.Add(txtInCellMulText);
                        if (strValueUrl != "")
                        {
                            cell.Controls.Add(new LiteralControl("<input type=\"button\" value=\"...\" onclick=\"java" + "script:SelectUrl(" + txtInCell.ID + ",'" + HttpContext.Current.Request.ApplicationPath + "/EpointMis/BackEnd/iFrame.aspx?PageUrl=" + strValueUrl + "')\">"));
                        }
                        if (Convert.ToString(DvFields[i]["IsAllNull"]) == "1")
                        {
                            req = new RequiredFieldValidator();
                            req.ID = "req_" + strFieldName + "_" + TableID;
                            req.ControlToValidate = txtInCellMulText.ID;
                            req.Display = ValidatorDisplay.None;
                            req.ErrorMessage = DvFields[i]["fieldChineseName"].ToString() + "必填";
                            cell.Controls.Add(req);
                        }
                        break;
                        #endregion
                    case "radio":
                        #region 单选框
                        RadioButtonList rdoInCell = new RadioButtonList();
                        rdoInCell.RepeatDirection = RepeatDirection.Horizontal;
                        rdoInCell.ID = strFieldName + "_" + TableID;
                        rdoInCell.DataSource = codes.Get_Items_By_CodeName(DvFields[i]["DataSource_CodeName"].ToString());
                        rdoInCell.DataTextField = "ItemText";
                        rdoInCell.DataValueField = "ItemValue";
                        rdoInCell.DataBind();

                        if (rdoInCell.Items.Count > 0)
                        {
                            rdoInCell.SelectedIndex = 0;
                            //if (DvFields[i]["fieldDefaultValue"].ToString() != "")
                            //{
                            //    item = rdoInCell.Items.FindByValue(OtherFunction.getFieldDefaultValue(DvFields[i]["fieldDefaultValue"].ToString()));
                            //    if (item != null)
                            //    {
                            //        rdoInCell.SelectedIndex = rdoInCell.Items.IndexOf(item);
                            //    }
                            //}
                        }

                        cell.Controls.Add(rdoInCell);

                        break;
                        #endregion
                    case "checkbox":
                        #region 多选框
                        CheckBoxList chkInCell = new CheckBoxList();
                        chkInCell.RepeatDirection = RepeatDirection.Horizontal;
                        chkInCell.ID = strFieldName + "_" + TableID;
                        chkInCell.DataSource = codes.Get_Items_By_CodeName(DvFields[i]["DataSource_CodeName"].ToString());
                        chkInCell.DataTextField = "ItemText";
                        chkInCell.DataValueField = "ItemValue";
                        chkInCell.DataBind();

                        cell.Controls.Add(chkInCell);
                        break;
                        #endregion
                    case "calculate":
                        #region 计算
                        txtInCell = new TextBox();
                        txtInCell.ID = strFieldName + "_" + TableID;
                        txtInCell.Width = Unit.Percentage(97);
                        txtInCell.Height = Unit.Percentage(100);
                        txtInCell.BackColor = System.Drawing.Color.FromName("white");
                        txtInCell.BorderStyle = BorderStyle.Inset;
                        txtInCell.Font.Size = FontUnit.Point(9);
                        txtInCell.EnableViewState = true;
                        txtInCell.Enabled = false;
                        txtInCell.ToolTip = "本输入框是计算格,不需用户输入!";
                        txtInCell.BackColor = System.Drawing.ColorTranslator.FromHtml("#FAEBD7");

                        if (DvFields[i]["FieldType"].ToString().ToLower() == "numeric"
                            || DvFields[i]["FieldType"].ToString().ToLower() == "money"
                            || DvFields[i]["FieldType"].ToString().ToLower() == "int")
                        {
                            txtInCell.Style.Add("TEXT-ALIGN", "right");
                            txtInCell.Style.Add("padding-right", "2px");
                        }

                        cell.Controls.Add(txtInCell);
                        break;
                        #endregion
                    case "image":
                        fileUpload = new HtmlInputFile();
                        fileUpload.ID = strFieldName + "_" + TableID;
                        cell.Controls.Add(fileUpload);
                        break;
                    case "texttreeview"://添加一种类型TextTreeView,使用树选择方式来显示。
                        #region 树选择方式

                        #endregion
                        break;
                    case "multitexttreeview":
                        #region 树选择方式

                        #endregion
                        break;
                    case "checkboxlst":
                        #region MyRegion

                        break;
                        #endregion
                    case "radiolst":
                        #region MyRegion

                        break;
                        #endregion

                }
                #endregion

                int nNextControlWidth = (i < DvFields.Count - 1) ? Convert.ToInt32(DvFields[i + 1]["ControlWidth"]) : 1;

                cell.Width = "85%";
                if (DvFields[i]["fieldDisplayType"].ToString().ToLower() == "dropdownlist")
                {

                }

                trNew.Cells.Add(cell);

                tbReport.Rows.Add(trNew);
                trNew = new HtmlTableRow();

            }//循环结尾
            if (trNew.Controls.Count != 0)
            {
                tbReport.Rows.Add(trNew);
            }
            controlPlaceHolder.Controls.Add(tbReport);
        }
コード例 #14
0
ファイル: GetRoleTree.aspx.cs プロジェクト: kingofhawks/kcsj
 /// <summary>
 /// 加载RG_会员类别
 /// </summary>
 private void AddTopNodes()
 {
     DataView dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("RG_会员类别");
     EpointTreeNode node;
     for (int i = 0; i < dv.Count; i++)
     {
         node = new EpointTreeNode();
         node.Text = dv[i]["ItemText"].ToString();
         node.Value = dv[i]["ItemValue"].ToString() + "@UserType";
         Boolean hasChild = Epoint.MisBizLogic2.DB.ExecuteToInt("select count(RoleName) from RG_Role where UserType='" + dv[i]["ItemValue"].ToString() + "'") > 0;
         if (hasChild)
             node.PopulateOnDemand = true;
         else
             node.PopulateOnDemand = false;
         node.CtrlClickFunction = "AutoSetPValue(this, '" + node.Text + "', '" + node.Value + "')";
         TreeViewRoleList.Nodes.Add(node);
     }
 }
コード例 #15
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                lblTableName.Text = oListPage.TableDetail.TableName;
                //this.CurrentHead = oListPage.TableDetail.TableName;
                if (Request["type"] != "1")
                {
                    this.s_xiangMuJL.Enabled = false;
                }

                #region �Ƿ�������
                if (oListPage.TableDetail.Is_OnlineTable == "1")
                {
                    //btnAddRecord.Visible = false;
                    //btnDel.Visible = false;
                }
                else
                {
                    //btnAddRecord.Visible = true;
                    //btnDel.Visible = true;
                }
                #endregion

                #region ��� ��Ŀ��Դ
                DataView dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("���ݴ�Ͷ_��Ŀ��Դ");
                if (dv.Count > 0)
                {
                    for (int i = 0; i < dv.Count; i++)
                    {
                        this.s_xiangMuLY.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                #region ��� ����ƽ̨
                DataView dv_GLPT = new SVGBLL.Pro_Fund().Select_guanLiPT_byUserGuid(Session["UserGuid"].ToString());
                if (dv_GLPT.Count > 0)
                {
                    for (int i = 0; i < dv_GLPT.Count; i++)
                    {
                        this.s_GuanLiPT.Items.Add(new ListItem(dv_GLPT[i]["s_guanlir"].ToString(), dv_GLPT[i]["rowguid"].ToString()));
                    }
                }
                #endregion

                #region ��� ��Ŀ״̬
                dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("���ݴ�Ͷ_��Ŀ״̬");
                if (dv.Count > 0)
                {
                    for (int i = 1; i < dv.Count; i++)
                    {
                        this.s_xiangMuZT.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                this.RefreshGrid();
            }
        }
コード例 #16
0
ファイル: Record_Add.aspx.cs プロジェクト: kingofhawks/kcsj
 /// <summary>
 /// �󶨵�λ�ĵ�λ���
 /// </summary>
 private void BindOuType()
 {
     if (UserType_2010.SelectedItem.Value == "002")
     {
         DataView dvOuType = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("RG_��Ա��λ");
         if (dvOuType.Count > 0)
         {
             cblOUTypeOU.DataTextField = "ItemText";
             cblOUTypeOU.DataValueField = "ItemValue";
             cblOUTypeOU.DataSource = dvOuType;
             cblOUTypeOU.DataBind();
         }
     }
 }
コード例 #17
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (!Page.IsPostBack)
            {

                #region ��� ��Ŀ��Դ
                DataView dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("���ݴ�Ͷ_��Ŀ��Դ");
                if (dv.Count > 0)
                {
                    for (int i = 0; i < dv.Count; i++)
                    {
                        this.s_xiangMuLY.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                #region ��� ����ƽ̨
                DataView dv_GLPT = new SVGBLL.Pro_Fund().Select_guanLiPT_byUserGuid(Session["UserGuid"].ToString());
                if (dv_GLPT.Count > 0)
                {
                    for (int i = 0; i < dv_GLPT.Count; i++)
                    {
                        this.s_GuanLiPT.Items.Add(new ListItem(dv_GLPT[i]["s_guanlir"].ToString(), dv_GLPT[i]["rowguid"].ToString()));
                    }
                }
                #endregion

                #region ��� ��Ŀ״̬
                dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("���ݴ�Ͷ_��Ŀ״̬");
                if (dv.Count > 0)
                {
                    for (int i = 1; i < dv.Count; i++)
                    {
                        this.s_xiangMuZT.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                #region ��ʱ��ת��Ϊ����ʱ��
                int thisYear = DateTime.Now.Year;
                int thisMonth = DateTime.Now.Month;
                string JD = "";
                JD += thisYear + "-";
                if (thisMonth.ToString() == "1" || thisMonth.ToString() == "2" || thisMonth.ToString() == "3")
                {
                    JD += "01-01 00:00:00";
                }
                else if (thisMonth.ToString() == "4" || thisMonth.ToString() == "5" || thisMonth.ToString() == "6")
                {
                    JD += "04-01 00:00:00";
                }
                else if (thisMonth.ToString() == "7" || thisMonth.ToString() == "8" || thisMonth.ToString() == "9")
                {
                    JD += "07-01 00:00:00";
                }
                else
                {
                    JD += "10-01 00:00:00";
                }
                ViewState["JD"] = JD;
                #endregion

                #region ת����ǰʱ��
                DateTime dt = DateTime.Parse(thisYear + "-" + thisMonth + "-01 00:00:00");
                ViewState["YC"] = dt;
                ViewState["YM"] = dt.AddMonths(1).AddSeconds(-1);
                #endregion

                //
                lblTableName.Text = oListPage.TableDetail.TableName;
                //

                this.RefreshGrid();
                //GridExcel.Visible = true;
            }
        }
コード例 #18
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                #region 填充 项目来源
                DataView dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("苏州创投_项目来源");
                if (dv.Count > 0)
                {
                    for (int i = 0; i < dv.Count; i++)
                    {
                        this.s_xiangMuLY.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                #region 填充 管理平台
                DataView dv_GLPT = new SVGBLL.Pro_Fund().Select_guanLiPT_byUserGuid(Session["UserGuid"].ToString());
                if (dv_GLPT.Count > 0)
                {
                    for (int i = 0; i < dv_GLPT.Count; i++)
                    {
                        this.s_GuanLiPT.Items.Add(new ListItem(dv_GLPT[i]["s_guanlir"].ToString(), dv_GLPT[i]["rowguid"].ToString()));
                    }
                }
                #endregion

                #region 填充 项目状态
                dv = new Epoint.MisBizLogic2.Code.DB_CodeItem().Get_Items_By_CodeName("苏州创投_项目状态");
                if (dv.Count > 0)
                {
                    for (int i = 1; i < dv.Count; i++)
                    {
                        this.s_xiangMuZT.Items.Add(new ListItem(dv[i]["ItemText"].ToString(), dv[i]["ItemValue"].ToString()));
                    }
                }
                #endregion

                #region 将时间转化为季度时间
                int    thisYear  = DateTime.Now.Year;
                int    thisMonth = DateTime.Now.Month;
                string JD        = "";
                JD += thisYear + "-";
                if (thisMonth.ToString() == "1" || thisMonth.ToString() == "2" || thisMonth.ToString() == "3")
                {
                    JD += "01-01 00:00:00";
                }
                else if (thisMonth.ToString() == "4" || thisMonth.ToString() == "5" || thisMonth.ToString() == "6")
                {
                    JD += "04-01 00:00:00";
                }
                else if (thisMonth.ToString() == "7" || thisMonth.ToString() == "8" || thisMonth.ToString() == "9")
                {
                    JD += "07-01 00:00:00";
                }
                else
                {
                    JD += "10-01 00:00:00";
                }
                ViewState["JD"] = JD;
                #endregion

                #region 转化当前时间
                DateTime dt = DateTime.Parse(thisYear + "-" + thisMonth + "-01 00:00:00");
                ViewState["YC"] = dt;
                ViewState["YM"] = dt.AddMonths(1).AddSeconds(-1);
                #endregion

                //
                lblTableName.Text = oListPage.TableDetail.TableName;
                //


                this.RefreshGrid();
                //GridExcel.Visible = true;
            }
        }