當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。