Пример #1
0
        protected void BindOUInfo()
        {
            Epoint.MisBizLogic2.Code.DB_CodeMain codemain = new Epoint.MisBizLogic2.Code.DB_CodeMain();
            Epoint.MisBizLogic2.Data.MisGuidRow  oRow     = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_User", Request["RowGuid"]);
            Epoint.MisBizLogic2.Data.MisGuidRow  arow     = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_OUInfo", oRow["DanWeiGuid"].ToString());
            EnterpriseName.Text    = arow["EnterpriseName"].ToString();
            CodeCertificate.Text   = arow["CodeCertificate"].ToString();
            EnterpriseType.Text    = arow["EnterpriseType"].ToString();
            LegalPerson.Text       = arow["LegalPerson"].ToString();
            RegionCharacter.Text   = arow["RegionCharacter"].ToString();
            BusinessLicenseNO.Text = arow["BusinessLicenseNO"].ToString();
            Contacter.Text         = arow["Contacter"].ToString();
            Tel.Text           = arow["Tel"].ToString();
            ContacterID.Text   = arow["ContacterID"].ToString();
            Email.Text         = arow["Email"].ToString();
            Address.Text       = arow["Address"].ToString();
            RegistAddress.Text = arow["RegistAddress"].ToString();
            BeiZhu.Text        = arow["BeiZhu"].ToString();
            DataView dv   = Epoint.MisBizLogic2.DB.ExecuteDataView("select * FROM RG_OuType_Relate WHERE RelatedGuid='" + oRow["DanWeiGuid"].ToString() + "'and RelatedType='OU'");
            string   Type = "";

            foreach (DataRowView row in dv)
            {
                Type += codemain.GetCodeText_FromHash("RG_会员单位", row["OuType"].ToString()) + ';';
            }
            EnterpriseType.Text = Type;
        }
Пример #2
0
 protected void BindOUInfo()
 {
     Epoint.MisBizLogic2.Code.DB_CodeMain codemain = new Epoint.MisBizLogic2.Code.DB_CodeMain();
     Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_User", Request["RowGuid"]);
     Epoint.MisBizLogic2.Data.MisGuidRow arow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_OUInfo", oRow["DanWeiGuid"].ToString());
     EnterpriseName.Text = arow["EnterpriseName"].ToString();
     CodeCertificate.Text = arow["CodeCertificate"].ToString();
     EnterpriseType.Text = arow["EnterpriseType"].ToString();
     LegalPerson.Text = arow["LegalPerson"].ToString();
     RegionCharacter.Text = arow["RegionCharacter"].ToString();
     BusinessLicenseNO.Text = arow["BusinessLicenseNO"].ToString();
     Contacter.Text = arow["Contacter"].ToString();
     Tel.Text = arow["Tel"].ToString();
     ContacterID.Text = arow["ContacterID"].ToString();
     Email.Text = arow["Email"].ToString();
     Address.Text = arow["Address"].ToString();
     RegistAddress.Text = arow["RegistAddress"].ToString();
     BeiZhu.Text = arow["BeiZhu"].ToString();
     DataView dv = Epoint.MisBizLogic2.DB.ExecuteDataView("select * FROM RG_OuType_Relate WHERE RelatedGuid='" + oRow["DanWeiGuid"].ToString() + "'and RelatedType='OU'");
     string Type = "";
     foreach (DataRowView row in dv)
     {
         Type += codemain.GetCodeText_FromHash("RG_��Ա��λ", row["OuType"].ToString()) + ';';
     }
     EnterpriseType.Text = Type;
 }
Пример #3
0
        /// <summary>
        /// 绑定单位类别
        /// </summary>
        private void BindOuType()
        {
            string rguserguid = Epoint.Frame.Bizlogic.common.strReplaceSql(Request["RowGuid"]);
            string danweiguid = Epoint.Frame.Bizlogic.common.strReplaceSql(dpDanWeiGuid.SelectedValue);

            if (string.IsNullOrEmpty(danweiguid))
            {
                danweiguid = Epoint.Frame.Bizlogic.common.strReplaceSql(DanWeiGuid_2010.Text);
            }
            // 获得所属单位的单位类别
            DataView dvOuType  = Epoint.MisBizLogic2.DB.ExecuteDataView("select OuType from RG_OuType_Relate where RelatedType='Ou' AND RelatedGuid='" + danweiguid + "'");
            DataView dvOuType1 = Epoint.MisBizLogic2.DB.ExecuteDataView("select OuType from RG_OuType_Relate where RelatedType='User' AND RelatedGuid='" + rguserguid + "'");

            List <string> lstOuType = new List <string>();

            foreach (DataRowView item in dvOuType1)
            {
                lstOuType.Add(item[0].ToString());
            }
            if (dvOuType.Count > 0)
            {
                Epoint.MisBizLogic2.Code.DB_CodeMain oCodeMain = new Epoint.MisBizLogic2.Code.DB_CodeMain();
                foreach (DataRowView item in dvOuType)
                {
                    ListItem li = new ListItem(oCodeMain.GetCodeText_FromHash("RG_会员单位", item[0].ToString()), item[0].ToString());
                    li.Selected = lstOuType.IndexOf(item[0].ToString()) >= 0;
                    cblOUType.Items.Add(li);
                }
            }
            else
            {
                //trOuType.Visible = false;
            }
        }
Пример #4
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     Epoint.MisBizLogic2.Code.DB_CodeMain codemain = new Epoint.MisBizLogic2.Code.DB_CodeMain();
     if (!Page.IsPostBack)
     {
         ViewState["TableName"] = oDetailPage.TableDetail.TableName;
         Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow(oDetailPage.TableDetail.SQL_TableName, Request["RowGuid"]);
         if (!oRow.R_HasFilled)
         {
             this.AlertAjaxMessage("没有对应的数据记录!");
             this.WriteAjaxMessage("window.close();");
             return;
         }
         if (Convert.ToString(oRow["UserType"]) == "001")
         {
             trperson.Style["display"] = "";
             tabou.Style["display"]    = "none";
             trDanwei.Style["display"] = "none";
             trOuType.Style["display"] = "none";
         }
         else
         if (Convert.ToString(oRow["UserType"]) == "003")
         {
             trperson.Style["display"] = "";
             tabou.Style["display"]    = "none";
             trDanwei.Style["display"] = "";
             trOuType.Style["display"] = "";
             Epoint.MisBizLogic2.Data.MisGuidRow userrow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_User", Request["RowGuid"]);
             OUBelong.Text = Epoint.MisBizLogic2.DB.ExecuteToString("select EnterpriseName from RG_OUInfo where RowGuid='" + userrow["DanWeiGuid"].ToString() + "'");
             DataView dv   = Epoint.MisBizLogic2.DB.ExecuteDataView("select * FROM RG_OuType_Relate WHERE RelatedGuid='" + Request["RowGuid"] + "'and RelatedType='User'");
             string   Type = "";
             foreach (DataRowView row in dv)
             {
                 Type += codemain.GetCodeText_FromHash("RG_会员单位", row["OuType"].ToString()) + ';';
             }
             OUType.Text = Type;
         }
         else
         {
             trperson.Style["display"] = "none";
             tabou.Style["display"]    = "";
             trDanwei.Style["display"] = "none";
             trOuType.Style["display"] = "none";
             BindOUInfo();
         }
         Epoint.MisBizLogic2.Web.CodeGenerator.InitiateControl_DetailPage(oDetailPage, tdContainer, oRow);
         isEnableSMS.Text      = showisEnableSMS(Convert.ToString(oRow["EnableSMS"]));
         EnableOnlineChat.Text = showEnableOnlineChat(Convert.ToString(oRow["EnableOnlineChat"]));
         BindRoleName();
     }
 }
Пример #5
0
        /// <summary>
        /// 绑定会员的单位类别
        /// </summary>
        private void BindOuType(string danweiguid)
        {
            // 获得所属单位的单位类别
            DataView dvOuType = Epoint.MisBizLogic2.DB.ExecuteDataView("select OuType from RG_OuType_Relate where RelatedType='Ou' AND RelatedGuid='" + danweiguid + "'");

            if (dvOuType.Count > 0)
            {
                Epoint.MisBizLogic2.Code.DB_CodeMain oCodeMain = new Epoint.MisBizLogic2.Code.DB_CodeMain();
                foreach (DataRowView item in dvOuType)
                {
                    cblOUType.Items.Add(new ListItem(oCodeMain.GetCodeText_FromHash("RG_会员单位", item[0].ToString()), item[0].ToString()));
                }
            }
        }
Пример #6
0
        /// <summary>
        /// �󶨵�λ���
        /// </summary>
        private void BindOuType()
        {
            string rguserguid = Epoint.Frame.Bizlogic.common.strReplaceSql(Request["RowGuid"]);
            string danweiguid = Epoint.Frame.Bizlogic.common.strReplaceSql(dpDanWeiGuid.SelectedValue);
            if (string.IsNullOrEmpty(danweiguid))
                danweiguid = Epoint.Frame.Bizlogic.common.strReplaceSql(DanWeiGuid_2010.Text);
            // ��������λ�ĵ�λ���
            DataView dvOuType = Epoint.MisBizLogic2.DB.ExecuteDataView("select OuType from RG_OuType_Relate where RelatedType='Ou' AND RelatedGuid='" + danweiguid + "'");
            DataView dvOuType1 = Epoint.MisBizLogic2.DB.ExecuteDataView("select OuType from RG_OuType_Relate where RelatedType='User' AND RelatedGuid='" + rguserguid + "'");

            List<string> lstOuType = new List<string>();
            foreach (DataRowView item in dvOuType1)
            {
                lstOuType.Add(item[0].ToString());
            }
            if (dvOuType.Count > 0)
            {
                Epoint.MisBizLogic2.Code.DB_CodeMain oCodeMain = new Epoint.MisBizLogic2.Code.DB_CodeMain();
                foreach (DataRowView item in dvOuType)
                {
                    ListItem li = new ListItem(oCodeMain.GetCodeText_FromHash("RG_��Ա��λ", item[0].ToString()), item[0].ToString());
                    li.Selected = lstOuType.IndexOf(item[0].ToString()) >= 0;
                    cblOUType.Items.Add(li);
                }
            }
            else
            {
                //trOuType.Visible = false;
            }
        }
Пример #7
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     Epoint.MisBizLogic2.Code.DB_CodeMain codemain = new Epoint.MisBizLogic2.Code.DB_CodeMain();
     if (!Page.IsPostBack)
     {
         ViewState["TableName"] = oDetailPage.TableDetail.TableName;
         Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow(oDetailPage.TableDetail.SQL_TableName, Request["RowGuid"]);
         if (!oRow.R_HasFilled)
         {
             this.AlertAjaxMessage("û�ж�Ӧ�����ݼ�¼��");
             this.WriteAjaxMessage("window.close();");
             return;
         }
         if (Convert.ToString(oRow["UserType"]) == "001")
         {
             trperson.Style["display"] = "";
             tabou.Style["display"] = "none";
             trDanwei.Style["display"] = "none";
             trOuType.Style["display"] = "none";
         }
         else
             if (Convert.ToString(oRow["UserType"]) == "003")
             {
                 trperson.Style["display"] = "";
                 tabou.Style["display"] = "none";
                 trDanwei.Style["display"] = "";
                 trOuType.Style["display"] = "";
                 Epoint.MisBizLogic2.Data.MisGuidRow userrow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_User", Request["RowGuid"]);
                 OUBelong.Text = Epoint.MisBizLogic2.DB.ExecuteToString("select EnterpriseName from RG_OUInfo where RowGuid='" + userrow["DanWeiGuid"].ToString() + "'");
                 DataView dv = Epoint.MisBizLogic2.DB.ExecuteDataView("select * FROM RG_OuType_Relate WHERE RelatedGuid='" + Request["RowGuid"] + "'and RelatedType='User'");
                 string Type = "";
                 foreach (DataRowView row in dv)
                 {
                     Type += codemain.GetCodeText_FromHash("RG_��Ա��λ", row["OuType"].ToString()) + ';';
                 }
                 OUType.Text = Type;
             }
             else
             {
                 trperson.Style["display"] = "none";
                 tabou.Style["display"] = "";
                 trDanwei.Style["display"] = "none";
                 trOuType.Style["display"] = "none";
                 BindOUInfo();
             }
         Epoint.MisBizLogic2.Web.CodeGenerator.InitiateControl_DetailPage(oDetailPage, tdContainer, oRow);
         isEnableSMS.Text = showisEnableSMS(Convert.ToString(oRow["EnableSMS"]));
         EnableOnlineChat.Text = showEnableOnlineChat(Convert.ToString(oRow["EnableOnlineChat"]));
         BindRoleName();
     }
 }
Пример #8
0
 /// <summary>
 /// �󶨻�Ա�ĵ�λ���
 /// </summary>
 private void BindOuType(string danweiguid)
 {
     // ��������λ�ĵ�λ���
     DataView dvOuType = Epoint.MisBizLogic2.DB.ExecuteDataView("select OuType from RG_OuType_Relate where RelatedType='Ou' AND RelatedGuid='" + danweiguid + "'");
     if (dvOuType.Count > 0)
     {
         Epoint.MisBizLogic2.Code.DB_CodeMain oCodeMain = new Epoint.MisBizLogic2.Code.DB_CodeMain();
         foreach (DataRowView item in dvOuType)
         {
             cblOUType.Items.Add(new ListItem(oCodeMain.GetCodeText_FromHash("RG_��Ա��λ", item[0].ToString()), item[0].ToString()));
         }
     }
 }
Пример #9
0
        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);
        }