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


C# Common.UserInfoUtil类代码示例

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


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

示例1: WriteSystemLog

        /// <summary>
        /// 输出系统日志
        /// </summary>
        /// <param name="userInfo">用户信息</param>
        /// <param name="ex">异常信息</param>
        private static void WriteSystemLog(UserInfoUtil userInfo, int ModuleType, Exception ex)
        {
            /* 
             * 出现异常时,输出系统日志到文本文件 
             * 考虑出现异常情况比较少,尽管一个方法可能多次异常,
             *      但还是考虑将异常日志的变量定义放在catch里面
             */
            //定义变量
            LogInfo logSys = new LogInfo();
            //设置日志类型 需要指定为系统日志
            logSys.Type = LogInfo.LogType.SYSTEM;
            //指定系统日志类型 出错信息
            logSys.SystemKind = LogInfo.SystemLogKind.SYSTEM_ERROR;
            //指定登陆用户信息
            logSys.UserInfo = userInfo;
            //设定模块ID
            if (ModuleType == 0)
            {
                logSys.ModuleID = ConstUtil.MODULE_ID_INCOMEBILL_ADD;
            }
            else
            {
                logSys.ModuleID = ConstUtil.MODULE_ID_INCOMEBILL_LIST;
            }
            //描述
            logSys.Description = ex.ToString();

            //输出日志
            LogUtil.WriteLog(logSys);
        }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:35,代码来源:IncomeBillBus.cs

示例2: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];
        if (!Page.IsPostBack)
        {
            this.txt_begintime.Text = DateTime.Now.ToString("yyyy-MM-01");
            this.txt_endtime.Text = DateTime.Now.ToString("yyyy-MM-dd");

            string flag = this.summaryType.Value;
            switch (flag)
            {
                case "1":
                    lbl_title.Text = "部门/分店名称";
                    break;
                case "2":
                    lbl_title.Text = "业务员姓名";
                    break;
                case "3":
                    lbl_title.Text = "产品名称";
                    break;
            }
            rpt_result1.DataSource = UserProjectInfoBus.GetSummaryData(this.txt_begintime.Text, this.txt_endtime.Text, userInfo, typeorder.Value, int.Parse(this.summaryType.Value),userInfo.SelPoint);
            rpt_result1.DataBind();
        }
    }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:25,代码来源:SellRank.aspx.cs

示例3: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        userInfo = SessionUtil.Session["UserInfo"] as UserInfoUtil;
        // 小数位数
        _selPoint = int.Parse(userInfo.SelPoint);
        if (!IsPostBack)
        {
            FlowApply1.BillTypeFlag = ConstUtil.BILL_TYPECODE_STORAGE_QUALITY;
            FlowApply1.BillTypeCode = ConstUtil.BILL_TYPECODE_STORAGE_NOPASS;

            checkNo.CodingType = ConstUtil.CODING_RULE_StorageQuality_NO;
            checkNo.ItemTypeID = ConstUtil.CODING_RULE_StorageNOPass_NO;
            #region 初始化
            int EmployeeId = userInfo.EmployeeID;
            string Company = userInfo.CompanyCD;
            string UserID = userInfo.UserID;
            txtCloseDate.Text = Convert.ToDateTime(DateTime.Now.ToShortDateString()).ToString("yyyy-MM-dd");
            txtCloser.Value = userInfo.EmployeeName;
            txtCloserReal.Value = userInfo.EmployeeName;
            txtCloser.Value = EmployeeId.ToString();
            txtConfirmor.Value = userInfo.EmployeeName;
            txtConfirmDate.Text = Convert.ToDateTime(DateTime.Now.ToShortDateString()).ToString("yyyy-MM-dd");
            tbCreater.Text = userInfo.EmployeeName;
            txtCreateDate.Text = Convert.ToDateTime(DateTime.Now.ToShortDateString()).ToString("yyyy-MM-dd");
            txtModifiedUserID.Text = UserID;
            txtModifiedDate.Text = Convert.ToDateTime(DateTime.Now.ToShortDateString()).ToString("yyyy-MM-dd");
            tbProcessDate.Text = Convert.ToDateTime(DateTime.Now.ToShortDateString()).ToString("yyyy-MM-dd");

            hiddenModifiedUserID.Value = UserID;

            #endregion
        }
    }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:33,代码来源:StorageCheckNotPassAdd.aspx.cs

示例4: GetTask

        /// <summary>
        /// 获得任务状态
        /// </summary>
        /// <param name="userInfo">当前用户信息</param>
        /// <param name="userList">查询人员列表</param>
        /// <param name="dtS">开始时间</param>
        /// <param name="dtE">结束时间</param>
        /// <returns></returns>
        public static DataTable GetTask(UserInfoUtil userInfo, string userList, Nullable<DateTime> dtS, Nullable<DateTime> dtE)
        {
            string sql = @"SELECT tab1.UserID, tab1.MainDate, tab1.ReportStatus, tab1.TaskType,COUNT(*) AS Num  FROM (
                                SELECT t.Principal AS UserID
                                  ,SUBSTRING(CONVERT(VARCHAR ,t.CompleteDate ,120) ,0 ,11) AS MainDate
                                  ,CASE t.[Status]
			                            WHEN 1 THEN '待下达'
			                            WHEN 2 THEN '未完成'
			                            WHEN 3 THEN '已完成'
			                            WHEN 4 THEN '已撤销'
			                            WHEN 5 THEN '已考评'
					                    ELSE '状态错误'
		                            END AS ReportStatus
                                  ,t.TaskType
                            FROM   officedba.Task t
                            WHERE  [email protected] 
                                AND t.Principal IN ({0})
                                AND DATEDIFF(DAY, @DateStart, t.CompleteDate) >= 0 
                                AND DATEDIFF(DAY, t.CreateDate, @DateEnd) >= 0
) AS tab1
GROUP BY tab1.MainDate,tab1.ReportStatus,tab1.UserID,tab1.TaskType";
            SqlParameter[] parms = 
                           {
                               new SqlParameter("@CompanyCD",userInfo.CompanyCD),
                               new SqlParameter("@DateStart",dtS.Value),
                               new SqlParameter("@DateEnd",dtE.Value)
                           };

            return SqlHelper.ExecuteSql(String.Format(sql, userList), parms);
        }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:38,代码来源:PersonalAnalysisDBhelper.cs

示例5: GetPersonalNote

        /// <summary>
        /// 获得日志状态
        /// </summary>
        /// <param name="userInfo">当前用户信息</param>
        /// <param name="userList">查询人员列表</param>
        /// <param name="dtS">开始时间</param>
        /// <param name="dtE">结束时间</param>
        /// <returns></returns>
        public static DataTable GetPersonalNote(UserInfoUtil userInfo, string userList, Nullable<DateTime> dtS, Nullable<DateTime> dtE)
        {
            string sql = @"SELECT  pn.Creator AS UserID, SUBSTRING(CONVERT(VARCHAR, pn.NoteDate, 120), 0, 11) AS MainDate
		                    , CASE pn.[Status]
			                    WHEN 0 THEN '草稿'
			                    WHEN 1 THEN '已提交'
			                    WHEN 2 THEN '已点评'
					            ELSE '状态错误'
		                      END AS ReportStatus
		                    ,pn.[Status]
                            FROM   officedba.PersonalNote pn
                            WHERE [email protected] 
                                AND pn.Creator IN ({0}) 
                                AND DATEDIFF(DAY, @DateStart, pn.NoteDate) >= 0 
                                AND DATEDIFF(DAY, pn.NoteDate, @DateEnd) >= 0
                            GROUP BY pn.Creator,pn.NoteDate,pn.[Status]";
            SqlParameter[] parms = 
                           {
                               new SqlParameter("@CompanyCD",userInfo.CompanyCD),
                               new SqlParameter("@DateStart",dtS.Value),
                               new SqlParameter("@DateEnd",dtE.Value)
                           };

            return SqlHelper.ExecuteSql(String.Format(sql, userList), parms);
        }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:33,代码来源:PersonalAnalysisDBhelper.cs

示例6: Page_Load

 private static int ruleCode; //企业员工编号规则码
 protected void Page_Load(object sender, EventArgs e)
 {
     userinfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];
     if (!Page.IsPostBack)
     {
         initState();
     }
 }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:9,代码来源:HProfileFromExcel.aspx.cs

示例7: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     userInfo = SessionUtil.Session["UserInfo"] as UserInfoUtil;
     // 小数位数
     _selPoint = int.Parse(userInfo.SelPoint);
     if (!Page.IsPostBack)
     {
         BinddrpStorageName();//绑定仓库名称
     }
 }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:10,代码来源:StorageList.aspx.cs

示例8: ProcessRequest

    //protected bool Check_page_security_validate_code(string fromUrl)
    //{
    //   string _page_security_validate_code = GetParam("_page_security_validate_code");
    //   bool isok = CRCer.CheckString(_page_security_validate_code);
    //    if(!isok)
    //    {
    //        return false;
    //    }

    //    string _fromUrl = _page_security_validate_code.Substring(0,_page_security_validate_code.Length - 6);

    //    return (_fromUrl == fromUrl);

    //}

    public void ProcessRequest(HttpContext context)
    {
        
        _context = context;
        _request = context.Request;
        _response = context.Response;
        _context.Response.ContentType = "text/plain";

        UserInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

        if (UserInfo == null)
        {
            OutputResult(false,"Session过期,请重新登陆");
            return;
        }

        if (_request.UrlReferrer == null)
        {
            OutputResult(false, "未授权的访问.");
            return;
        }

        if (_request.UrlReferrer.Host != _request.Url.Host)
        {
            OutputResult(false, "未授权的访问.");
            return;
        }

        //string fromUrl = _request.UrlReferrer.PathAndQuery;
        //if (fromUrl.IndexOf("))/") != -1)
        //{ 
        //    fromUrl = fromUrl.Substring(  fromUrl.IndexOf("))/")+3);
        //}
      
        //if (!Check_page_security_validate_code(fromUrl))
        //{
        //    OutputResult(false, "未授权的访问.");
        //    return;
        //}



     

        _action = GetParam("action");//获取当前的ACTION

        if (_action == string.Empty)
        {
            Output("未指定action");
        }
        else
        {
            ActionHandler(_action);
        }
    }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:70,代码来源:BaseHandler.cs

示例9: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        txtContent.Attributes.Add("onkeyup", "freshLength(this)");
        ImageButton1.Attributes.Add("onclick", "return checkInput()");

        UserInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

        //XBase.Model.SystemManager.CompanyOpenServModel entity = XBase.Business.SystemManager.CompanyOpenServBus.GetCompanyOpenServInfo(UserInfo.CompanyCD);
        DataSet ds = new XBase.Business.KnowledgeCenter.MyKeyWord().GetCompanyOpenServ(UserInfo.CompanyCD);
        smCnt.Text = ds.Tables[0].Rows[0]["ManMsgNum"].ToString();

    }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:12,代码来源:SendSMBatch.aspx.cs

示例10: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        userInfo = SessionUtil.Session["UserInfo"] as UserInfoUtil;
        // 小数位数
        _selPoint = int.Parse(userInfo.SelPoint);

        if (!Page.IsPostBack)
        {
            DataRow dt = SubStorageDBHelper.GetSubDeptFromDeptID(((UserInfoUtil)SessionUtil.Session["UserInfo"]).DeptID.ToString());

            if (dt != null)
            {
                HidDeptID.Value = dt["ID"].ToString();

            }
        }
    }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:17,代码来源:SubStorageList.aspx.cs

示例11: WriteSystemLog

 /// <summary>
 /// 输出系统日志
 /// </summary>
 /// <param name="userInfo">用户信息</param>
 /// <param name="ex">异常信息</param>
 private static void WriteSystemLog(UserInfoUtil userInfo, Exception ex)
 {
     /* 
      * 出现异常时,输出系统日志到文本文件 
      * 考虑出现异常情况比较少,尽管一个方法可能多次异常,
      * 但还是考虑将异常日志的变量定义放在catch里面
      */
     //定义变量
     LogInfo logSys = new LogInfo();
     //设置日志类型 需要指定为系统日志
     logSys.Type = LogInfo.LogType.SYSTEM;
     //指定系统日志类型 出错信息
     logSys.SystemKind = LogInfo.SystemLogKind.SYSTEM_ERROR;
     //指定登陆用户信息
     logSys.UserInfo = userInfo;
     //设定模块ID
     logSys.ModuleID = ConstUtil.MODULE_ID_ACCOUNTSUBJECTS_SETTING;
     //描述
     logSys.Description = ex.ToString();
     //输出日志
     LogUtil.WriteLog(logSys);
 }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:27,代码来源:AccountSubjectsBus.cs

示例12: Page_Load

 public string errorstr = string.Empty; //错误串
 protected void Page_Load(object sender, EventArgs e)
 {
     userinfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];
 }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:5,代码来源:StorageFromExcel.aspx.cs

示例13: GetAllReport

        /// <summary>
        /// 根据日期获得汇报任务列表
        /// </summary>
        /// <param name="reportDate">时间</param>
        /// <param name="isNew">是否是新增</param>
        /// <param name="userInfo">用户信息</param>
        /// <returns></returns>
        public static DataTable GetAllReport(DateTime reportDate, bool isNew, UserInfoUtil userInfo)
        {
            string strSql = @"SELECT t.id AS ID,t.Title AS Title,t.[Content] AS [Content],0 AS ReportType
FROM officedba.Task t
WHERE [email protected] 
        AND ([email protected] OR CHARINDEX(','[email protected]+',',','+ISNULL(t.Joins,'')+',')>0 ) 
	    AND DATEDIFF(DAY,t.CreateDate,@Time)>=0 AND DATEDIFF(DAY,@Time,t.CompleteDate)>=0
        {0}
UNION ALL
SELECT pda.id AS ID,pda.ArrangeTItle AS Title,pda.[Content] AS [Content],1 AS ReportType
FROM officedba.PersonalDateArrange pda
WHERE [email protected] 
        AND ([email protected] OR CHARINDEX(','+cast(@userID AS VARCHAR)+',',','+ISNULL(pda.CanViewUser,'')+',')>0 ) 
	    AND DATEDIFF(DAY,pda.StartDate,@Time)>=0 AND DATEDIFF(DAY,@Time, pda.EndDate)>=0 {1} ";
            SqlParameter[] parameters = new SqlParameter[] 
                        {
                            new SqlParameter("@Time", SqlDbType.DateTime),
                            new SqlParameter("@CompanyCD", SqlDbType.VarChar),
                            new SqlParameter("@userID", SqlDbType.Int),
                            new SqlParameter("@userName", SqlDbType.VarChar)
                        };
            parameters[0].Value = reportDate;
            parameters[1].Value = userInfo.CompanyCD;
            parameters[2].Value = userInfo.EmployeeID;
            parameters[3].Value = userInfo.UserName;
            strSql = String.Format(strSql, isNew ? "AND t.Status=2" : "", isNew ? "AND pda.Status<>'2'" : "");
            return SqlHelper.ExecuteSql(strSql, parameters);
        }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:35,代码来源:NoteDBHelper.cs

示例14: GetQuarter

 /// <summary>
 /// 获得人员岗位权限
 /// </summary>
 /// <param name="userInfo">当前用户信息</param>
 /// <param name="userList">查询人员列表</param>
 /// <returns></returns>
 public static DataTable GetQuarter(UserInfoUtil userInfo, string userList)
 {
     return XBase.Data.OperatingModel.AimManager.PersonalAnalysisDBHelper.GetQuarter(userInfo, userList);
 }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:10,代码来源:PersonalAnalysisBus.cs

示例15: GetAim

 /// <summary>
 /// 获得目标状态
 /// </summary>
 /// <param name="userInfo">当前用户信息</param>
 /// <param name="userList">查询人员列表</param>
 /// <param name="dtS">开始时间</param>
 /// <param name="dtE">结束时间</param>
 /// <returns></returns>
 public static DataTable GetAim(UserInfoUtil userInfo, string userList, Nullable<DateTime> dtS, Nullable<DateTime> dtE)
 {
     return XBase.Data.OperatingModel.AimManager.PersonalAnalysisDBHelper.GetAim(userInfo, userList, dtS, dtE);
 }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:12,代码来源:PersonalAnalysisBus.cs


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