Example #1
0
    private Boolean ValidateInputParameter()
    {
        Boolean boolReturn = true;

        //UserLoginName输入检验
        if (DataValidateManager.ValidateIsNull(htInputParameter["UserLoginName"]) ||
            DataValidateManager.ValidateStringLengthRange(htInputParameter["UserLoginName"], 1, 50) == false)
        {
            strMessageParam[0] = "用户登录名";
            strMessageParam[1] = "1";
            strMessageParam[2] = "50";
            strMessageInfo     = MessageManager.GetMessageInfo(MessageManager.HINT_MSGID_0004, strMessageParam, strMessageInfo);
            boolReturn         = false;
        }
        //Password输入检验
        if (DataValidateManager.ValidateIsNull(htInputParameter["Password"]) == true ||
            DataValidateManager.ValidateStringLengthRange(htInputParameter["Password"], 1, 20) == false)
        {
            strMessageParam[0] = "用户密码";
            strMessageParam[1] = "1";
            strMessageParam[2] = "20";
            strMessageInfo     = MessageManager.GetMessageInfo(MessageManager.HINT_MSGID_0004, strMessageParam, strMessageInfo);
            boolReturn         = false;
        }
        return(boolReturn);
    }
Example #2
0
 //=====================================================================
 //  FunctionName : ExportToFile
 /// <summary>
 /// 重载ExportToFile
 /// </summary>
 //=====================================================================
 protected override void ExportToFile()
 {
     appData = new ShortMessageApplicationData();
     appData.OPCode = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ID;
     appData.ObjectID = base.ObjectID;
     QueryRecord();
     gvPrint.Visible = true;
     gvPrint.DataSource = appData.ResultSet;
     gvPrint.DataBind();
     switch (ddlExportFileFormat.SelectedValue.ToLower())
     {
         case "xls":
             FileLibrary.ExportToExcelFile(gvPrint, "Result");
             break;
         case "doc":
             FileLibrary.ExportToWordFile(gvPrint, "Result");
             break;
         case "pdf":
             string pageSize = ddlPrintPageSize.SelectedValue;
             bool boolOrientation = ddlPrintPageOrientation.SelectedValue == "landscape" ? true : false;
             float marginTop = DataValidateManager.ValidateNumberFormat(txtMarginTop.Text) == true ? Convert.ToSingle(txtMarginTop.Text) : 50;
             float marginRight = DataValidateManager.ValidateNumberFormat(txtMarginRight.Text) == true ? Convert.ToSingle(txtMarginRight.Text) : 50;
             float marginBottom = DataValidateManager.ValidateNumberFormat(txtMarginBottom.Text) == true ? Convert.ToSingle(txtMarginBottom.Text) : 50;
             float marginLeft = DataValidateManager.ValidateNumberFormat(txtMarginLeft.Text) == true ? Convert.ToSingle(txtMarginLeft.Text) : 50;
             ExportToPDFFile(appData.ResultSet, "Result", pageSize, boolOrientation, marginTop, marginRight, marginBottom, marginLeft);
             break;
         default:
             FileLibrary.ExportToExcelFile(gvPrint, "Result");
             break;
     }
     gvPrint.Visible = false;
 }
Example #3
0
        public void UpdateRecordInfo(Hashtable htInputParameter)
        {
            Database  db          = DatabaseFactory.CreateDatabase("strConnManager");
            string    strProcName = "SP_UpdatePurviewInfo";
            DbCommand cmdProc     = db.GetStoredProcCommand(strProcName);

            db.AddInParameter(cmdProc, "@ObjectID", DbType.String);
            db.AddInParameter(cmdProc, "@PurviewID", DbType.String);
            db.AddInParameter(cmdProc, "@PurviewName", DbType.String);
            db.AddInParameter(cmdProc, "@PurviewTypeID", DbType.String);
            db.AddInParameter(cmdProc, "@PurviewContent", DbType.String);
            db.AddInParameter(cmdProc, "@PurviewRemark", DbType.String);
            db.AddInParameter(cmdProc, "@IsPageMenu", DbType.Boolean);
            db.AddInParameter(cmdProc, "@PageFileName", DbType.String);
            db.AddInParameter(cmdProc, "@PageFileParameter", DbType.String);
            db.AddInParameter(cmdProc, "@PageFilePath", DbType.String);

            db.SetParameterValue(cmdProc, "@ObjectID", (string)htInputParameter["ObjectID"]);
            db.SetParameterValue(cmdProc, "@PurviewID", (string)htInputParameter["PurviewID"]);
            db.SetParameterValue(cmdProc, "@PurviewName", (string)htInputParameter["PurviewName"]);
            db.SetParameterValue(cmdProc, "@PurviewTypeID", (string)htInputParameter["PurviewTypeID"]);
            db.SetParameterValue(cmdProc, "@PurviewContent", (string)htInputParameter["PurviewContent"]);
            db.SetParameterValue(cmdProc, "@PurviewRemark", (string)htInputParameter["PurviewRemark"]);
            if (DataValidateManager.ValidateBooleanFormat(htInputParameter["IsPageMenu"]) == true)
            {
                db.SetParameterValue(cmdProc, "@IsPageMenu", Boolean.Parse((string)htInputParameter["IsPageMenu"]));
            }
            db.SetParameterValue(cmdProc, "@PageFileName", (string)htInputParameter["PageFileName"]);
            db.SetParameterValue(cmdProc, "@PageFileParameter", (string)htInputParameter["PageFileParameter"]);
            db.SetParameterValue(cmdProc, "@PageFilePath", (string)htInputParameter["PageFilePath"]);

            db.ExecuteNonQuery(cmdProc);
        }
    //=====================================================================
    //  FunctionName : GetTableCaption
    /// <summary>
    /// 得到信息标题
    /// </summary>
    //=====================================================================
    private string GetTableCaption()
    {
        System.Text.StringBuilder sbCaption = new System.Text.StringBuilder(string.Empty);
        sbCaption.Append(@"<div class=""caption"">");
        sbCaption.Append(@"字典类型列表");
        sbCaption.Append(@"</div>");
        sbCaption.Append(@"<div class=""captionnote"">");
        sbCaption.Append(@"查询条件如下:");

        if (!DataValidateManager.ValidateIsNull(DM.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("类型代码:");
            sbCaption.Append(DM.Text);
            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(MC.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("类型名称:");
            sbCaption.Append(MC.Text);
            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(SM.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("说明:");
            sbCaption.Append(SM.Text);
            sbCaption.Append(@"</div>");
        }
        // 一对一相关表

        sbCaption.Append("</div>");
        return(sbCaption.ToString());
    }
    //=====================================================================
    //  FunctionName : GetTableCaption
    /// <summary>
    /// 得到信息标题
    /// </summary>
    //=====================================================================
    private string GetTableCaption()
    {
        System.Text.StringBuilder sbCaption = new System.Text.StringBuilder(string.Empty);
        sbCaption.Append(@"<div class=""caption"">");
        sbCaption.Append(@"报表信息列表");
        sbCaption.Append(@"</div>");
        sbCaption.Append(@"<div class=""captionnote"">");
        sbCaption.Append(@"查询条件如下:");

        if (!DataValidateManager.ValidateIsNull(BGMC.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("报表名称:");
            sbCaption.Append(BGMC.Text);
            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(UserID.SelectedValue))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("用户编号:");
            sbCaption.Append(new RICH.Common.BM.T_PM_UserInfo.T_PM_UserInfoBusinessEntity().GetValueByFixCondition("UserID", UserID.SelectedValue, "UserLoginName"));

            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(BGLX.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("报告类型:");
            sbCaption.Append(BGLX.Text);
            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(GXBG.SelectedValue))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("共享报告:");
            sbCaption.Append(new RICH.Common.BM.Dictionary.DictionaryBusinessEntity().GetValueByFixCondition("DM", GXBG.SelectedValue, "MC"));

            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(XTBG.SelectedValue))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("系统报告:");
            sbCaption.Append(new RICH.Common.BM.Dictionary.DictionaryBusinessEntity().GetValueByFixCondition("DM", XTBG.SelectedValue, "MC"));

            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(BGCJSJ.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("创建时间:");
            sbCaption.Append(BGCJSJ.Text);
            sbCaption.Append(@"</div>");
        }
        // 一对一相关表

        sbCaption.Append("</div>");
        return(sbCaption.ToString());
    }
Example #6
0
    //=====================================================================
    //  FunctionName : Initalize
    /// <summary>
    /// 重载初始化函数
    /// </summary>
    //=====================================================================
    protected override void Initalize()
    {
        // 初始化界面
        XXNR.ImageGalleryPath = "~/Media/Image/FreeTextBox/" + Session[RICH.Common.ConstantsManager.SESSION_USER_ID] + "/";

        // 界面控件状态

        if (ViewMode || EditMode || CopyMode)
        {
            // 读取要修改记录详细资料
            appData = new T_BG_0601ApplicationData
            {
                ObjectID = base.ObjectID,
                OPCode   = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ID
            };
            QueryRecord();
            // 控件赋值
            if (appData.RecordCount > 0)
            {
                ObjectID.Text        = GetValue(appData.ResultSet.Tables[0].Rows[0]["ObjectID"]);
                FBH.Text             = GetValue(appData.ResultSet.Tables[0].Rows[0]["FBH"]);
                BT.Text              = GetValue(appData.ResultSet.Tables[0].Rows[0]["BT"]);
                FBLM.SelectedValue   = GetValue(appData.ResultSet.Tables[0].Rows[0]["FBLM"]);
                FBBM.SelectedValue   = GetValue(appData.ResultSet.Tables[0].Rows[0]["FBBM"]);
                XXLX.SelectedValue   = GetValue(appData.ResultSet.Tables[0].Rows[0]["XXLX"]);
                XXTPDZ.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["XXTPDZ"]);
                XXNR.Text            = GetValue(appData.ResultSet.Tables[0].Rows[0]["XXNR"]);
                FJXZDZ.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["FJXZDZ"]);
                XXZT.SelectedValue   = GetValue(appData.ResultSet.Tables[0].Rows[0]["XXZT"]);
                IsTop.SelectedValue  = GetValue(appData.ResultSet.Tables[0].Rows[0]["IsTop"]);
                TopSort.Text         = GetValue(appData.ResultSet.Tables[0].Rows[0]["TopSort"]);
                IsBest.SelectedValue = GetValue(appData.ResultSet.Tables[0].Rows[0]["IsBest"]);
                FBRJGH.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["FBRJGH"]);
                FBSJRQ.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["FBSJRQ"]);
                FBIP.Text            = GetValue(appData.ResultSet.Tables[0].Rows[0]["FBIP"]);
            }
        }
        if (AddMode)
        {
            // 初始化传入参数

            if (!DataValidateManager.ValidateIsNull(Request.QueryString["FBLM"]))
            {
                FBLM.SelectedValue = GetValue(Request.QueryString["FBLM"]);
                FBLM.Enabled       = false;
            }

            if (!DataValidateManager.ValidateIsNull(Request.QueryString["FBBM"]))
            {
                FBBM.SelectedValue = GetValue(Request.QueryString["FBBM"]);
                FBBM.Enabled       = false;
            }

            // 初始化默认值
            FBBM.SelectedValue = CurrentUserInfo.SubjectID;
        }
    }
Example #7
0
        public Hashtable SelectRecordInfo(Hashtable htInputParameter)
        {
            Database  db          = DatabaseFactory.CreateDatabase("strConnManager");
            string    strProcName = "SP_SelectPurviewInfo";
            DbCommand cmdProc     = db.GetStoredProcCommand(strProcName);

            db.AddInParameter(cmdProc, "@Sort", DbType.Boolean);
            db.AddInParameter(cmdProc, "@SortField", DbType.String);
            db.AddInParameter(cmdProc, "@PageSize", DbType.String);
            db.AddInParameter(cmdProc, "@CurrentPage", DbType.String);

            db.AddInParameter(cmdProc, "@ObjectID", DbType.String);
            db.AddInParameter(cmdProc, "@PurviewID", DbType.String);
            db.AddInParameter(cmdProc, "@PurviewName", DbType.String);
            db.AddInParameter(cmdProc, "@PurviewTypeID", DbType.String);
            db.AddInParameter(cmdProc, "@PurviewContent", DbType.String);
            db.AddInParameter(cmdProc, "@PurviewRemark", DbType.String);
            db.AddInParameter(cmdProc, "@IsPageMenu", DbType.Boolean);
            db.AddInParameter(cmdProc, "@PageFileName", DbType.String);
            db.AddInParameter(cmdProc, "@PageFileParameter", DbType.String);
            db.AddInParameter(cmdProc, "@PageFilePath", DbType.String);

            db.AddOutParameter(cmdProc, "@RecordCount", DbType.Int32, 4);

            if (htInputParameter["Sort"] != null)
            {
                db.SetParameterValue(cmdProc, "@Sort", Boolean.Parse((string)htInputParameter["Sort"]));
            }
            db.SetParameterValue(cmdProc, "@SortField", (string)htInputParameter["SortField"]);
            if (htInputParameter["PageSize"] != null)
            {
                db.SetParameterValue(cmdProc, "@PageSize", Int32.Parse((string)htInputParameter["PageSize"]));
            }
            if (htInputParameter["CurrentPage"] != null)
            {
                db.SetParameterValue(cmdProc, "@CurrentPage", Int32.Parse((string)htInputParameter["CurrentPage"]));
            }

            db.SetParameterValue(cmdProc, "@ObjectID", (string)htInputParameter["ObjectID"]);
            db.SetParameterValue(cmdProc, "@PurviewID", (string)htInputParameter["PurviewID"]);
            db.SetParameterValue(cmdProc, "@PurviewName", (string)htInputParameter["PurviewName"]);
            db.SetParameterValue(cmdProc, "@PurviewTypeID", (string)htInputParameter["PurviewTypeID"]);
            db.SetParameterValue(cmdProc, "@Purviewcontent", (string)htInputParameter["Purviewcontent"]);
            db.SetParameterValue(cmdProc, "@PurviewRemark", (string)htInputParameter["PurviewRemark"]);
            if (DataValidateManager.ValidateBooleanFormat(htInputParameter["IsPageMenu"]) == true)
            {
                db.SetParameterValue(cmdProc, "@IsPageMenu", Boolean.Parse((string)htInputParameter["IsPageMenu"]));
            }
            db.SetParameterValue(cmdProc, "@PageFileName", (string)htInputParameter["PageFileName"]);
            db.SetParameterValue(cmdProc, "@PageFileParameter", (string)htInputParameter["PageFileParameter"]);
            db.SetParameterValue(cmdProc, "@PageFilePath", (string)htInputParameter["PageFilePath"]);

            htInputParameter[ConstantsManager.QUERY_DATASET_NAME] = db.ExecuteDataSet(cmdProc);
            htInputParameter[ConstantsManager.RECORD_COUNT]       = db.GetParameterValue(cmdProc, "@RecordCount");
            return(htInputParameter);
        }
    //=====================================================================
    //  FunctionName : GetTableCaption
    /// <summary>
    /// 得到信息标题
    /// </summary>
    //=====================================================================
    private string GetTableCaption()
    {
        System.Text.StringBuilder sbCaption = new System.Text.StringBuilder(string.Empty);
        sbCaption.Append(@"<div class=""caption"">");
        sbCaption.Append(@"Dictionary列表");
        sbCaption.Append(@"</div>");
        sbCaption.Append(@"<div class=""captionnote"">");
        sbCaption.Append(@"查询条件如下:");

        if (!DataValidateManager.ValidateIsNull(DM.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("代码:");
            sbCaption.Append(DM.Text);
            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(LX.SelectedValue))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("类型:");
            sbCaption.Append(new RICH.Common.BM.DictionaryType.DictionaryTypeBusinessEntity().GetValueByFixCondition("DM", LX.SelectedValue, "MC"));

            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(MC.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("名称:");
            sbCaption.Append(MC.Text);
            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(SJDM.SelectedValue))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("上级代码:");
            sbCaption.Append(new RICH.Common.BM.Dictionary.DictionaryBusinessEntity().GetValueByFixCondition("DM", SJDM.SelectedValue, "MC"));

            if (chkShowSubItemSJDM.Checked)
            {
                sbCaption.Append("的子(下级)项信息");
            }

            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(SM.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("说明:");
            sbCaption.Append(SM.Text);
            sbCaption.Append(@"</div>");
        }
        // 一对一相关表

        sbCaption.Append("</div>");
        return(sbCaption.ToString());
    }
Example #9
0
        protected string GetValue(object objValue, string strDisplayFormat = null)
        {
            string strReturn = string.Empty;

            if (objValue == DBNull.Value)
            {
                return(strReturn);
            }
            if (objValue == null)
            {
                return(strReturn);
            }
            if (strDisplayFormat == null)
            {
                strReturn = objValue.ToString();
            }
            else if (Type.GetType("System.String") == objValue.GetType())
            {
                char[] value = objValue.ToString().ToCharArray();
                for (int i = 0; i < value.Length; i++)
                {
                    strDisplayFormat = strDisplayFormat.Replace("{" + i.ToString() + "}", value[i].ToString());
                }
                strReturn = strDisplayFormat;
            }
            else if (DataValidateManager.ValidateNumberFormat(objValue))
            {
                var number = Decimal.Parse(objValue.ToString());
                strReturn = number.ToString(strDisplayFormat);
            }
            else if (DataValidateManager.ValidateDateFormat(objValue))
            {
                strReturn = DateTime.Parse(objValue.ToString()).ToString(strDisplayFormat);
            }
            else
            {
                try
                {
                    char[] value = objValue.ToString().ToCharArray();
                    for (int i = 0; i < value.Length; i++)
                    {
                        strDisplayFormat = strDisplayFormat.Replace("{" + i.ToString() + "}", value[i].ToString());
                    }
                    strReturn = strDisplayFormat;
                }
                catch (Exception)
                {
                    strReturn = objValue.ToString();
                }
            }
            return(strReturn);
        }
Example #10
0
    //=====================================================================
    //  FunctionName : Page_Load
    /// <summary>
    /// Page_Load
    /// </summary>
    //=====================================================================
    protected override void Page_Load(object sender, EventArgs e)
    {
        MessageContent = string.Empty;
        if (IsPostBack != true)
        {
            Password_Area.Visible              = false;
            btnChangePassword.Visible          = false;
            btnSendChangePasswordEmail.Visible = false;
            // 初始化界面
            Password.TextMode        = TextBoxMode.Password;
            PasswordConfirm.TextMode = TextBoxMode.Password;
            // 界面控件状态
            ObjectID_Area.Visible = false;

            var vcode = Request.QueryString["vcode"];
            if (vcode.IsHtmlNullOrWiteSpace() || !DataValidateManager.ValidateUniqueIdentifierFormat(vcode))
            {
                UserLoginName.Text                 = Server.UrlDecode(Request.Cookies[ConstantsManager.COOKIE_USER_LOGIN_NAME].Value);
                Password_Area.Visible              = false;
                btnChangePassword.Visible          = false;
                btnSendChangePasswordEmail.Visible = true;
            }
            else
            {
                T_PM_UserInfoApplicationLogic userInfoApplicationLogic = new T_PM_UserInfoApplicationLogic();
                appData             = new T_PM_UserInfoApplicationData();
                appData.vcode       = vcode;
                appData.CurrentPage = 1;
                appData.PageSize    = 1;
                appData.OPCode      = ApplicationDataBase.OPType.ALL;
                userInfoApplicationLogic.Query(appData);
                if (appData.RecordCount > 0)
                {
                    ObjectID.Text                      = GetValue(appData.ResultSet.Tables[0].Rows[0]["ObjectID"]);
                    UserLoginName.Text                 = GetValue(appData.ResultSet.Tables[0].Rows[0]["UserLoginName"]);
                    UserLoginName.Enabled              = false;
                    Password_Area.Visible              = true;
                    btnChangePassword.Visible          = true;
                    btnSendChangePasswordEmail.Visible = false;
                    MessageContent                     = "请修改密码。";
                }
                else
                {
                    Password_Area.Visible              = false;
                    btnChangePassword.Visible          = false;
                    btnSendChangePasswordEmail.Visible = true;
                    MessageContent = "修改密码链接已过期,请重新提交。";
                }
            }
        }
        base.Page_Load(sender, e);
    }
 protected bool ValidateUserIsLogined()
 {
     if (DataValidateManager.ValidateIsNull(Session[ConstantsManager.SESSION_USER_ID]) == false &&
         DataValidateManager.ValidateIsNull(Session[ConstantsManager.SESSION_USER_GROUP_ID]) == false &&
         DataValidateManager.ValidateIsNull(Session[ConstantsManager.SESSION_USER_NICK_NAME]) == false
         // && DataValidateManager.ValidateIsNull(Session[ConstantsManager.SESSION_SSDW_ID]) == false
         && DataValidateManager.ValidateIsNull(Session[ConstantsManager.SESSION_USER_LOGIN_NAME]) == false)
     {
         currentUserInfo = T_PM_UserInfoBusinessEntity.GetDataByKey(new T_PM_UserInfoApplicationData()
         {
             UserID = (string)Session[ConstantsManager.SESSION_USER_ID],
         });
         return(true);
     }
     if (!string.IsNullOrWhiteSpace(Request.QueryString["lcode"]))
     {
         currentUserInfo = T_PM_UserInfoBusinessEntity.GetDataByKey(new T_PM_UserInfoApplicationData()
         {
             UserID = (string)(new T_PM_UserInfoBusinessEntity()).GetValueByFixCondition("lcode", (string)Request.QueryString["lcode"], "UserID"),
         });
         Session[ConstantsManager.SESSION_USER_ID]         = currentUserInfo.UserID;
         Session[ConstantsManager.SESSION_USER_GROUP_ID]   = currentUserInfo.UserGroupID;
         Session[ConstantsManager.SESSION_USER_LOGIN_NAME] = currentUserInfo.UserLoginName;
         Session[ConstantsManager.SESSION_SSDW_ID]         = currentUserInfo.SubjectID;
         Session[ConstantsManager.SESSION_USER_NICK_NAME]  = currentUserInfo.UserNickName;
         return(true);
     }
     if (DataValidateManager.ValidateIsNull(Request.Cookies[ConstantsManager.COOKIE_USER_ID]) == false &&
         DataValidateManager.ValidateIsNull(Request.Cookies[ConstantsManager.COOKIE_USER_GROUP_ID]) == false &&
         DataValidateManager.ValidateIsNull(Request.Cookies[ConstantsManager.COOKIE_USER_NICK_NAME]) == false
         // && DataValidateManager.ValidateIsNull(Request.Cookies[ConstantsManager.COOKIE_SSDW_ID]) == false
         && DataValidateManager.ValidateIsNull(Request.Cookies[ConstantsManager.COOKIE_USER_LOGIN_NAME]) == false)
     {
         Session[ConstantsManager.SESSION_USER_ID]         = Server.UrlDecode(Request.Cookies[ConstantsManager.COOKIE_USER_ID].Value.ToString());
         Session[ConstantsManager.SESSION_USER_GROUP_ID]   = Server.UrlDecode(Request.Cookies[ConstantsManager.COOKIE_USER_GROUP_ID].Value.ToString());
         Session[ConstantsManager.SESSION_USER_LOGIN_NAME] = Server.UrlDecode(Request.Cookies[ConstantsManager.COOKIE_USER_LOGIN_NAME].Value.ToString());
         Session[ConstantsManager.SESSION_SSDW_ID]         = Server.UrlDecode(Request.Cookies[ConstantsManager.COOKIE_SSDW_ID].Value.ToString());
         Session[ConstantsManager.SESSION_USER_NICK_NAME]  = Server.UrlDecode(Request.Cookies[ConstantsManager.COOKIE_USER_NICK_NAME].Value.ToString());
         currentUserInfo = T_PM_UserInfoBusinessEntity.GetDataByKey(new T_PM_UserInfoApplicationData()
         {
             UserID = (string)Session[ConstantsManager.SESSION_USER_ID],
         });
         //记录日志开始
         string strLogContent = MessageManager.GetMessageInfo(MessageManager.LOG_MSGID_0001, new string[] { currentUserInfo.UserLoginName });
         LogLibrary.LogWrite("A01", strLogContent, null, null, null);
         //记录日志结束
         return(true);
     }
     currentUserInfo = null;
     return(false);
 }
 protected override void Page_Load(object sender, EventArgs e)
 {
     base.Page_Load(sender, e);
     if (!IsPostBack)
     {
         websiteName.Text = RICH.Common.ConstantsManager.WEBSITE_NAME;
         InitalPage();
         if (!DataValidateManager.ValidateIsNull(Request.Cookies["LAST_MENU_USERGROUPID"]))
         {
             ddlUserGroupID.SelectedValue = Request.Cookies["LAST_MENU_USERGROUPID"].Value;
         }
     }
     GetMenu();
 }
    //=====================================================================
    //  FunctionName : GetTableCaption
    /// <summary>
    /// 得到信息标题
    /// </summary>
    //=====================================================================
    private string GetTableCaption()
    {
        System.Text.StringBuilder sbCaption = new System.Text.StringBuilder(string.Empty);
        sbCaption.Append(@"<div class=""caption"">");
        sbCaption.Append(@"单位信息列表");
        sbCaption.Append(@"</div>");
        sbCaption.Append(@"<div class=""captionnote"">");
        sbCaption.Append(@"查询条件如下:");

        if (!DataValidateManager.ValidateIsNull(DWBH.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("单位编号:");
            sbCaption.Append(DWBH.Text);
            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(DWMC.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("单位名称:");
            sbCaption.Append(DWMC.Text);
            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(SJDWBH.SelectedValue))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("上级单位:");
            sbCaption.Append(new RICH.Common.BM.T_BM_DWXX.T_BM_DWXXBusinessEntity().GetValueByFixCondition("DWBH", SJDWBH.SelectedValue, "DWMC"));

            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(DZ.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("地址:");
            sbCaption.Append(DZ.Text);
            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(LXR.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("联系人:");
            sbCaption.Append(LXR.Text);
            sbCaption.Append(@"</div>");
        }
        // 一对一相关表

        sbCaption.Append("</div>");
        return(sbCaption.ToString());
    }
Example #14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!DataValidateManager.ValidateIsNull(Request.Cookies[ConstantsManager.COOKIE_SAVE_LOGIN_STATUS]) &&
         !DataValidateManager.ValidateIsNull(Request.Cookies[ConstantsManager.COOKIE_USER_LOGIN_NAME]) &&
         !DataValidateManager.ValidateIsNull(Request.Cookies[ConstantsManager.COOKIE_PASSWORD]))
     {
         txtUserLoginName.Text      = Server.UrlDecode(Request.Cookies[ConstantsManager.COOKIE_USER_LOGIN_NAME].Value);
         txtPassword.Text           = Server.UrlDecode(Request.Cookies[ConstantsManager.COOKIE_PASSWORD].Value);
         chkSaveLoginStatus.Checked = true;
         ValidateUserLogin();
     }
     imgIdentifyCode.ImageUrl = ConstantsManager.WEBSITE_VIRTUAL_ROOT_DIR + "/Page/IdentifyCode.aspx";
     if (!IsPostBack)
     {
         var vcode = Request.QueryString["vcode"];
         if (vcode.IsHtmlNullOrWiteSpace() || !DataValidateManager.ValidateUniqueIdentifierFormat(vcode))
         {
             if (!DataValidateManager.ValidateIsNull(Request.Cookies[ConstantsManager.COOKIE_USER_LOGIN_NAME]))
             {
                 txtUserLoginName.Text = Server.UrlDecode(Request.Cookies[ConstantsManager.COOKIE_USER_LOGIN_NAME].Value);
             }
         }
         else
         {
             T_PM_UserInfoApplicationLogic userInfoApplicationLogic = new T_PM_UserInfoApplicationLogic();
             T_PM_UserInfoApplicationData  appData = new T_PM_UserInfoApplicationData();
             appData.vcode       = vcode;
             appData.CurrentPage = 1;
             appData.PageSize    = 1;
             appData.OPCode      = ApplicationDataBase.OPType.ALL;
             userInfoApplicationLogic.Query(appData);
             if (appData.RecordCount > 0)
             {
                 appData            = T_PM_UserInfoBusinessEntity.GetDataByObjectID(((Guid)appData.ResultSet.Tables[0].Rows[0]["ObjectID"]).ToString());
                 appData.UserStatus = "02";
                 appData.vcode      = null;
                 appData.OPCode     = ApplicationDataBase.OPType.ID;
                 userInfoApplicationLogic.Modify(appData);
                 txtUserLoginName.Text = appData.UserLoginName;
                 MessageLabel.Text     = "邮箱通过验证,请登录开始使用系统。";
             }
             else
             {
                 MessageLabel.Text = "邮箱验证信息有误。";
             }
         }
     }
     txtIdentifyCode.Attributes.Add("onfocus", "document.getElementById('txtIdentifyCode').value = GetCookie('IdentifyCode');");
 }
    //=====================================================================
    //  FunctionName : Initalize
    /// <summary>
    /// 重载初始化函数
    /// </summary>
    //=====================================================================
    protected override void Initalize()
    {
        // 初始化界面


        // 界面控件状态

        if (ViewMode || EditMode || CopyMode)
        {
            // 读取要修改记录详细资料
            appData = new DictionaryApplicationData
            {
                ObjectID = base.ObjectID,
                OPCode   = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ID
            };
            QueryRecord();
            // 控件赋值
            if (appData.RecordCount > 0)
            {
                ObjectID.Text    = GetValue(appData.ResultSet.Tables[0].Rows[0]["ObjectID"]);
                DM.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["DM"]);
                LX.SelectedValue = GetValue(appData.ResultSet.Tables[0].Rows[0]["LX"]);
                MC.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["MC"]);
                LXCoupled();
                SJDM.SelectedValue = GetValue(appData.ResultSet.Tables[0].Rows[0]["SJDM"]);
                SM.Text            = GetValue(appData.ResultSet.Tables[0].Rows[0]["SM"]);
            }
        }
        if (AddMode)
        {
            // 初始化传入参数

            if (!DataValidateManager.ValidateIsNull(Request.QueryString["LX"]))
            {
                LX.SelectedValue = GetValue(Request.QueryString["LX"]);
                LX.Enabled       = false;
            }
            LXCoupled();

            if (!DataValidateManager.ValidateIsNull(Request.QueryString["SJDM"]))
            {
                SJDM.SelectedValue = GetValue(Request.QueryString["SJDM"]);
                SJDM.Enabled       = false;
            }

            // 初始化默认值
        }
    }
    //=====================================================================
    //  FunctionName : Initalize
    /// <summary>
    /// 重载初始化函数
    /// </summary>
    //=====================================================================
    protected override void Initalize()
    {
        // 初始化界面
        BZ.ImageGalleryPath = "~/Media/Image/FreeTextBox/" + Session[RICH.Common.ConstantsManager.SESSION_USER_ID] + "/";

        // 界面控件状态

        if (ViewMode || EditMode || CopyMode)
        {
            // 读取要修改记录详细资料
            appData = new T_BM_BMXXApplicationData
            {
                ObjectID = base.ObjectID,
                OPCode   = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ID
            };
            QueryRecord();
            // 控件赋值
            if (appData.RecordCount > 0)
            {
                ObjectID.Text      = GetValue(appData.ResultSet.Tables[0].Rows[0]["ObjectID"]);
                BMBH.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["BMBH"]);
                HYBH.SelectedValue = GetValue(appData.ResultSet.Tables[0].Rows[0]["HYBH"]);
                KCJG.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["KCJG"]);
                KSS.Text           = GetValue(appData.ResultSet.Tables[0].Rows[0]["KSS"]);
                KCZK.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["KCZK"]);
                SJJG.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["SJJG"]);
                SKR.SelectedValue  = GetValue(appData.ResultSet.Tables[0].Rows[0]["SKR"]);
                BMSJ.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["BMSJ"]);
                BZ.Text            = GetValue(appData.ResultSet.Tables[0].Rows[0]["BZ"]);
                LRR.SelectedValue  = GetValue(appData.ResultSet.Tables[0].Rows[0]["LRR"]);
                LRSJ.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["LRSJ"]);
            }
        }
        if (AddMode)
        {
            // 初始化传入参数

            if (!DataValidateManager.ValidateIsNull(Request.QueryString["HYBH"]))
            {
                HYBH.SelectedValue = GetValue(Request.QueryString["HYBH"]);
                HYBH.Enabled       = false;
            }

            // 初始化默认值
        }
    }
Example #17
0
    //=====================================================================
    //  FunctionName : Initalize
    /// <summary>
    /// 重载初始化函数
    /// </summary>
    //=====================================================================
    protected override void Initalize()
    {
        // 初始化界面
        DXXNR.ImageGalleryPath = "~/Media/Image/FreeTextBox/" + Session[RICH.Common.ConstantsManager.SESSION_USER_ID] + "/";

        // 界面控件状态

        if (ViewMode || EditMode || CopyMode)
        {
            // 读取要修改记录详细资料
            appData = new ShortMessageApplicationData
            {
                ObjectID = base.ObjectID,
                OPCode   = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ID
            };
            QueryRecord();
            // 控件赋值
            if (appData.RecordCount > 0)
            {
                ObjectID.Text       = GetValue(appData.ResultSet.Tables[0].Rows[0]["ObjectID"]);
                DXXBT.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["DXXBT"]);
                DXXLX.SelectedValue = GetValue(appData.ResultSet.Tables[0].Rows[0]["DXXLX"]);
                DXXNR.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["DXXNR"]);
                DXXFJ.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["DXXFJ"]);
                FSSJ.Text           = GetValue(appData.ResultSet.Tables[0].Rows[0]["FSSJ"]);
                FSR.Text            = GetValue(appData.ResultSet.Tables[0].Rows[0]["FSR"]);
                FSBM.Text           = GetValue(appData.ResultSet.Tables[0].Rows[0]["FSBM"]);
                FSIP.Text           = GetValue(appData.ResultSet.Tables[0].Rows[0]["FSIP"]);
                JSR.SelectedValues  = GetValue(appData.ResultSet.Tables[0].Rows[0]["JSR"]);
                SFCK.SelectedValue  = GetValue(appData.ResultSet.Tables[0].Rows[0]["SFCK"]);
                CKSJ.Text           = GetValue(appData.ResultSet.Tables[0].Rows[0]["CKSJ"]);
            }
        }
        if (AddMode)
        {
            // 初始化传入参数

            if (!DataValidateManager.ValidateIsNull(Request.QueryString["JSR"]))
            {
                JSR.SelectedValues = GetValue(Request.QueryString["JSR"]);
                JSR.Enabled        = false;
            }

            // 初始化默认值
        }
    }
Example #18
0
 public static string GetRemoteTrueIP()
 {
     try
     {
         if (DataValidateManager.ValidateIsNull(HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]) == true)
         {
             return(HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]);
         }
         else
         {
             return(HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]);
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
 private void InitalPage()
 {
     linkDefaultIndex.HRef = ConstantsManager.DEFAULT_ADMINISTRATOR_INDEX;
     if (!DataValidateManager.ValidateIsNull(Session[ConstantsManager.SESSION_USER_GROUP_ID]))
     {
         string[] strArrUserGroupID = ((string)Session[ConstantsManager.SESSION_USER_GROUP_ID]).Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
         foreach (string strUserGroupID in strArrUserGroupID)
         {
             string strUserGroupName;
             RICH.Common.BM.T_PM_UserGroupInfo.T_PM_UserGroupInfoBusinessEntityBase t_PM_UserGroupInfoBusinessEntityBase = new RICH.Common.BM.T_PM_UserGroupInfo.T_PM_UserGroupInfoBusinessEntityBase();
             strUserGroupName = (string)t_PM_UserGroupInfoBusinessEntityBase.GetValueByFixCondition("UserGroupID", strUserGroupID, "UserGroupName");
             if (!DataValidateManager.ValidateIsNull(strUserGroupName))
             {
                 ddlUserGroupID.Items.Add(new RadComboBoxItem(strUserGroupName, strUserGroupID));
             }
         }
     }
 }
Example #20
0
    //=====================================================================
    //  FunctionName : Initalize
    /// <summary>
    /// 重载初始化函数
    /// </summary>
    //=====================================================================
    protected override void Initalize()
    {
        // 初始化界面
        LMNR.ImageGalleryPath = "~/Media/Image/FreeTextBox/" + Session[RICH.Common.ConstantsManager.SESSION_USER_ID] + "/";

        // 界面控件状态

        if (ViewMode || EditMode || CopyMode)
        {
            // 读取要修改记录详细资料
            appData = new T_BG_0602ApplicationData
            {
                ObjectID = base.ObjectID,
                OPCode   = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ID
            };
            QueryRecord();
            // 控件赋值
            if (appData.RecordCount > 0)
            {
                ObjectID.Text         = GetValue(appData.ResultSet.Tables[0].Rows[0]["ObjectID"]);
                LMH.Text              = GetValue(appData.ResultSet.Tables[0].Rows[0]["LMH"]);
                LMM.Text              = GetValue(appData.ResultSet.Tables[0].Rows[0]["LMM"]);
                SJLMH.SelectedValue   = GetValue(appData.ResultSet.Tables[0].Rows[0]["SJLMH"]);
                LMTP.Text             = GetValue(appData.ResultSet.Tables[0].Rows[0]["LMTP"]);
                LMNR.Text             = GetValue(appData.ResultSet.Tables[0].Rows[0]["LMNR"]);
                LMLBYS.SelectedValue  = GetValue(appData.ResultSet.Tables[0].Rows[0]["LMLBYS"]);
                SFLBLM.SelectedValue  = GetValue(appData.ResultSet.Tables[0].Rows[0]["SFLBLM"]);
                SFWBURL.SelectedValue = GetValue(appData.ResultSet.Tables[0].Rows[0]["SFWBURL"]);
                WBURL.Text            = GetValue(appData.ResultSet.Tables[0].Rows[0]["WBURL"]);
            }
        }
        if (AddMode)
        {
            // 初始化传入参数

            if (!DataValidateManager.ValidateIsNull(Request.QueryString["SJLMH"]))
            {
                SJLMH.SelectedValue = GetValue(Request.QueryString["SJLMH"]);
                SJLMH.Enabled       = false;
            }

            // 初始化默认值
        }
    }
Example #21
0
    //=====================================================================
    //  FunctionName : GetTableCaption
    /// <summary>
    /// 得到信息标题
    /// </summary>
    //=====================================================================
    private string GetTableCaption()
    {
        System.Text.StringBuilder sbCaption = new System.Text.StringBuilder(string.Empty);
        sbCaption.Append(@"<div class=""caption"">");
        sbCaption.Append(@"公共信息栏目列表");
        sbCaption.Append(@"</div>");
        sbCaption.Append(@"<div class=""captionnote"">");
        sbCaption.Append(@"查询条件如下:");

        if (!DataValidateManager.ValidateIsNull(LMM.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("栏目名:");
            sbCaption.Append(LMM.Text);
            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(SJLMH.SelectedValue))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("上级栏目:");
            sbCaption.Append(new RICH.Common.BM.T_BG_0602.T_BG_0602BusinessEntity().GetValueByFixCondition("LMH", SJLMH.SelectedValue, "LMM"));

            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(LMNR.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("栏目显示内容:");
            sbCaption.Append(LMNR.Text);
            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(LMLBYS.SelectedValue))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("栏目列表样式:");
            sbCaption.Append(new RICH.Common.BM.Dictionary.DictionaryBusinessEntity().GetValueByFixCondition("DM", LMLBYS.SelectedValue, "MC"));

            sbCaption.Append(@"</div>");
        }
        // 一对一相关表

        sbCaption.Append("</div>");
        return(sbCaption.ToString());
    }
Example #22
0
    //=====================================================================
    //  FunctionName : GetTableCaption
    /// <summary>
    /// 得到信息标题
    /// </summary>
    //=====================================================================
    private string GetTableCaption()
    {
        System.Text.StringBuilder sbCaption = new System.Text.StringBuilder(string.Empty);
        sbCaption.Append(@"<div class=""caption"">");
        sbCaption.Append(@"用户组信息列表");
        sbCaption.Append(@"</div>");
        sbCaption.Append(@"<div class=""captionnote"">");
        sbCaption.Append(@"查询条件如下:");

        if (!DataValidateManager.ValidateIsNull(UserGroupID.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("用户组编号:");
            sbCaption.Append(UserGroupID.Text);
            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(UserGroupName.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("用户组名称:");
            sbCaption.Append(UserGroupName.Text);
            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(UserGroupContent.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("内容:");
            sbCaption.Append(UserGroupContent.Text);
            sbCaption.Append(@"</div>");
        }
        if (!DataValidateManager.ValidateIsNull(UserGroupRemark.Text))
        {
            sbCaption.Append(@"<div style=""margin-right:10px"">");
            sbCaption.Append("备注:");
            sbCaption.Append(UserGroupRemark.Text);
            sbCaption.Append(@"</div>");
        }
        // 一对一相关表

        sbCaption.Append("</div>");
        return(sbCaption.ToString());
    }
Example #23
0
 protected virtual void Page_PreRender(object sender, EventArgs e)
 {
     if (MainContentPlaceHolder != null || MainContainerPlaceHolder != null)
     {
         var placeHolder = (MainContentPlaceHolder ?? MainContainerPlaceHolder);
         if (!DataValidateManager.ValidateIsNull(MessageContent))
         {
             var lb = (Literal)placeHolder.FindControl("MessageBox");
             if (lb != null)
             {
                 lb.Text        = string.Format("<div class='messagebox'><div class='messagebody'><div>{0}</div></div></div>", MessageContent);
                 MessageContent = string.Empty;
             }
         }
     }
     CheckPermission();
     if (!IsPostBack)
     {
         ProcessUIControlsStatus();
     }
 }
    //=====================================================================
    //  FunctionName : LXCoupled()
    /// <summary>
    /// 类型的联动处理方法
    /// </summary>
    //=====================================================================
    protected void LXCoupled()
    {
        if (!DataValidateManager.ValidateIsNull(LX.SelectedValue))
        {
            SJDM.DataSource = GetDataSource_SJDM("LX", LX.SelectedValue);
            SJDM.DataBind();
            if (!(SJDM.Items.Count > 0))
            {
                SJDM.Items.Insert(0, new ListItem("无", ""));
            }

            else
            {
                SJDM.Items.Insert(0, new ListItem("请选择", ""));
            }
        }
        else
        {
            SJDM.Items.Clear();
            SJDM.Items.Insert(0, new ListItem("请先选择类型", ""));
        }
    }
Example #25
0
    //=====================================================================
    //  FunctionName : KCXLBHCoupled()
    /// <summary>
    /// 课程系列的联动处理方法
    /// </summary>
    //=====================================================================
    protected void KCXLBHCoupled()
    {
        if (!DataValidateManager.ValidateIsNull(KCXLBH.SelectedValue))
        {
            KCBH.DataSource = GetDataSource_KCBH("", KCXLBH.SelectedValue);
            KCBH.DataBind();
            if (!(KCBH.Items.Count > 0))
            {
                KCBH.Items.Insert(0, new ListItem("无", ""));
            }

            else
            {
                KCBH.Items.Insert(0, new ListItem("请选择", ""));
            }
        }
        else
        {
            KCBH.Items.Clear();
            KCBH.Items.Insert(0, new ListItem("请先选择课程系列", ""));
        }
    }
 //=====================================================================
 //  FunctionName : KCXLBHCoupled()
 /// <summary>
 /// 课程系列的联动处理方法
 /// </summary>
 //=====================================================================
 protected void KCXLBHCoupled()
 {
     if (!DataValidateManager.ValidateIsNull(KCXLBH.SelectedValue))
     {
         KCBH.DataSource = GetDataSource_KCBH("", KCXLBH.SelectedValue, true);
         KCBH.DataBind();
         if (!(KCBH.Items.Count > 0))
         {
             KCBH.Items.Insert(0, new ListItem("无", ""));
         }
         else
         {
             KCBH.Items.Insert(0, new ListItem("选择", ""));
         }
     }
     else
     {
         KCBH.Items.Clear();
         KCBH.Items.Insert(0, new ListItem("请先选择课程系列", ""));
     }
     KCBH.Attributes.Add("onchange", "RefreshGrid()");
     Initalize();
 }
 //=====================================================================
 //  FunctionName : LXCoupled()
 /// <summary>
 /// 类型的联动处理方法
 /// </summary>
 //=====================================================================
 protected void LXCoupled()
 {
     if (!DataValidateManager.ValidateIsNull(LX.SelectedValue))
     {
         SJDM.DataSource = GetDataSource_SJDM("LX", LX.SelectedValue, true);
         SJDM.DataBind();
         if (!(SJDM.Items.Count > 0))
         {
             SJDM.Items.Insert(0, new ListItem("无", ""));
         }
         else
         {
             SJDM.Items.Insert(0, new ListItem("选择", ""));
         }
     }
     else
     {
         SJDM.Items.Clear();
         SJDM.Items.Insert(0, new ListItem("请先选择类型", ""));
     }
     SJDM.Attributes.Add("onchange", "RefreshGrid()");
     Initalize();
 }
        public Hashtable GetUserPurviewInfoForMenu(Hashtable htInputParameter)
        {
            Database  db          = DatabaseFactory.CreateDatabase("strConnManager");
            string    strProcName = "SP_GetUserPurviewInfoForMenu";
            DbCommand cmdProc     = db.GetStoredProcCommand(strProcName);

            db.AddInParameter(cmdProc, "@UserID", DbType.String);
            db.AddInParameter(cmdProc, "@PurviewPRI", DbType.Int32);
            db.AddInParameter(cmdProc, "@IsPageMenu", DbType.Boolean);

            db.SetParameterValue(cmdProc, "@UserID", (string)htInputParameter["UserID"]);
            if (DataValidateManager.ValidateIsNull(htInputParameter["PurviewPRI"]) == false)
            {
                db.SetParameterValue(cmdProc, "@PurviewPRI", (int)htInputParameter["PurviewPRI"]);
            }
            if (DataValidateManager.ValidateBooleanFormat(htInputParameter["IsPageMenu"]) == true)
            {
                db.SetParameterValue(cmdProc, "@IsPageMenu", Boolean.Parse((string)htInputParameter["IsPageMenu"]));
            }

            htInputParameter[ConstantsManager.QUERY_DATASET_NAME] = db.ExecuteDataSet(cmdProc);
            return(htInputParameter);
        }
 private void InitalPage()
 {
     if (!DataValidateManager.ValidateIsNull(Session[ConstantsManager.SESSION_USER_GROUP_ID]))
     {
         string[]  strArrUserGroupID = ((string)Session[ConstantsManager.SESSION_USER_GROUP_ID]).Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
         Hashtable htUserGroup       = new Hashtable();
         foreach (string strUserGroupID in strArrUserGroupID)
         {
             string strUserGroupName;
             RICH.Common.BM.T_PM_UserGroupInfo.T_PM_UserGroupInfoBusinessEntityBase t_PM_UserGroupInfoBusinessEntityBase = new RICH.Common.BM.T_PM_UserGroupInfo.T_PM_UserGroupInfoBusinessEntityBase();
             strUserGroupName = (string)t_PM_UserGroupInfoBusinessEntityBase.GetValueByFixCondition("UserGroupID", strUserGroupID, "UserGroupName");
             if (!DataValidateManager.ValidateIsNull(strUserGroupName))
             {
                 htUserGroup.Add(strUserGroupID, strUserGroupName);
             }
         }
         UserGroupList.DataSource = htUserGroup;
         UserGroupList.DataBind();
         GetMenu(Request.Cookies["LAST_MENU_USERGROUPID"] != null
                     ? Server.UrlDecode(Request.Cookies["LAST_MENU_USERGROUPID"].Value)
                     : strArrUserGroupID[0]);
     }
 }
    private string GetText(int intRemoveRowIndex = -1)
    {
        string content = string.Empty;

        foreach (GridViewRow row in GridDataBind.Rows)
        {
            if (row.RowType == DataControlRowType.DataRow)
            {
                if (row.RowIndex != intRemoveRowIndex)
                {
                    string strRow    = string.Empty;
                    bool   boolEmpty = true;
                    for (int i = 0; i < gridColumnName.Length; i++)
                    {
                        if (!DataValidateManager.ValidateIsNull(((TextBox)row.Cells[i].FindControl(gridColumnName[i])).Text))
                        {
                            boolEmpty = false;
                        }
                        if (i == 0)
                        {
                            strRow = ((TextBox)row.Cells[i].FindControl(gridColumnName[i])).Text;
                        }
                        else
                        {
                            strRow = strRow + ConstantsManager.FieldSplitString + ((TextBox)row.Cells[i].FindControl(gridColumnName[i])).Text;
                        }
                    }
                    if (!boolEmpty)
                    {
                        content = content + ConstantsManager.ItemSplitString + strRow;
                    }
                }
            }
        }
        return(content);
    }