示例#1
0
        /// <summary>
        /// 统计指定用户的某一类型的需求的数目
        /// </summary>
        /// <param name="Type">统计类型</param>
        /// <param name="loginName">用户名</param>
        /// <returns></returns>
        public int GetCount(Tz888.BLL.Common.AuditStatus Type, string loginName, string RoleName)
        {
            string strWhere = "";

            switch ((int)Type)
            {
            case 0:
                strWhere = "LoginName = '" + loginName + "' And InfoOriginRoleName = '" + RoleName + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) > GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Auditing).ToString();
                break;

            case 1:
                strWhere = "LoginName = '" + loginName + "' And InfoOriginRoleName = '" + RoleName + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) > GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Pass).ToString();
                break;

            case 2:
                strWhere = "LoginName = '" + loginName + "' And InfoOriginRoleName = '" + RoleName + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) > GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.NoPass).ToString();
                break;

            case 3:
                strWhere = "LoginName = '" + loginName + "' And InfoOriginRoleName = '" + RoleName + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) <= GETDATE()";
                break;

            default:
                break;
            }
            return(this.GetCount("", strWhere));
        }
示例#2
0
        /// <summary>
        /// 统计指定用户的某一类型的需求的数目
        /// </summary>
        /// <param name="Type">统计类型</param>
        /// <param name="loginName">用户名</param>
        /// <returns></returns>
        public int GetCount(Tz888.BLL.Common.AuditStatus Type, string loginName, string infoType)
        {
            string strWhere = "";

            switch ((int)Type)
            {
            case 0:
                strWhere = "UserName = '******' And AuditStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Auditing).ToString();
                break;

            case 1:
                strWhere = "UserName = '******' And AuditStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Pass).ToString();
                break;

            case 2:
                strWhere = "UserName = '******'  And AuditStatus = " + ((int)Tz888.BLL.Common.AuditStatus.NoPass).ToString();
                break;

            case 3:
                strWhere = "UserName = '******' ";
                break;

            default:
                break;
            }
            return(this.GetCount(infoType, strWhere));
        }
示例#3
0
        /// <summary>
        /// 获取带数目和需求类型的提示信息
        /// </summary>
        /// <param name="loginName">用户名称</param>
        /// <param name="model">信息模版[***{0}**{1}***],第一个参数为需求数目,第二个参数为需求类型名</param>
        /// <param name="Type">需求类型</param>
        /// <returns></returns>
        public string GetRemind(string model, Tz888.BLL.Common.AuditStatus type, string InfoType)
        {
            string remindInfo = "";

            switch ((int)type)
            {
            case 0:
                remindInfo = "待审核";
                break;

            case 1:
                remindInfo = "通过审核";
                break;

            case 2:
                remindInfo = "未通过审核";
                break;

            case 3:
                remindInfo = "已过期";
                break;

            default:
                break;
            }
            int    count   = this.GetCount(type, InfoType);
            string request = string.Format(model, count.ToString(), remindInfo);

            return(request);
        }
示例#4
0
    protected int GetCount(Tz888.BLL.Common.AuditStatus Type)
    {
        //string loginName = CON_LoginName;
        string loginName = Page.User.Identity.Name;

        Tz888.BLL.Info.MainInfoBLL bll = new Tz888.BLL.Info.MainInfoBLL();
        return(bll.GetCount(Type, loginName, "0"));
    }
示例#5
0
        /// <summary>
        /// 根据需求管理类型获取列表(拓富中心需求管理使用)
        /// </summary>
        /// <param name="strGetFields"></param>
        /// <param name="fldName"></param>
        /// <param name="PageSize"></param>
        /// <param name="PageIndex"></param>
        /// <param name="OrderType"></param>
        /// <param name="loginName"></param>
        /// <param name="RoleName"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public DataSet GetList(string strGetFields, string fldName, int PageSize, int PageIndex, int OrderType, string loginName, string RoleName, Tz888.BLL.Common.AuditStatus type)
        {
            string strWhere = "";

            switch ((int)type)
            {
            case 0:
                strWhere = "LoginName = '" + loginName + "' And InfoOriginRoleName = '" + RoleName + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) > GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Auditing).ToString();
                break;

            case 1:
                strWhere = "LoginName = '" + loginName + "' And InfoOriginRoleName = '" + RoleName + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) > GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Pass).ToString();
                break;

            case 2:
                strWhere = "LoginName = '" + loginName + "' And InfoOriginRoleName = '" + RoleName + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) > GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.NoPass).ToString();
                break;

            case 3:
                strWhere = "LoginName = '" + loginName + "' And InfoOriginRoleName = '" + RoleName + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) <= GETDATE()";
                break;

            default:
                break;
            }

            return(dal.GetList(strGetFields, fldName, PageSize, PageIndex, OrderType, strWhere));
        }
示例#6
0
        /// <summary>
        /// 获取查询条件
        /// </summary>
        public static string GetCriteria(Tz888.BLL.Common.AuditStatus Type, string InfoType)
        {
            string strWhere = "";

            switch ((int)Type)
            {
            case 0:
                if (!string.IsNullOrEmpty(InfoType))
                {
                    strWhere = "InfoTypeID = '" + InfoType + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) > GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Auditing).ToString();
                }
                else
                {
                    strWhere = "DelStatus <> 1 And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Auditing).ToString();
                }
                break;

            case 1:
                if (!string.IsNullOrEmpty(InfoType))
                {
                    strWhere = "InfoTypeID = '" + InfoType + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) > GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Pass).ToString();
                }
                else
                {
                    strWhere = "DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) > GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Pass).ToString();
                }
                break;

            case 2:
                if (!string.IsNullOrEmpty(InfoType))
                {
                    strWhere = "InfoTypeID = '" + InfoType + "' And DelStatus <> 1 And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.NoPass).ToString();
                }
                else
                {
                    strWhere = "DelStatus <> 1 And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.NoPass).ToString();
                }
                break;

            case 3:
                if (!string.IsNullOrEmpty(InfoType))
                {
                    strWhere = "InfoTypeID = '" + InfoType + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) <= GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Pass).ToString();
                }
                else
                {
                    strWhere = "DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) <= GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Pass).ToString();
                }
                break;

            case 5:
                if (!string.IsNullOrEmpty(InfoType))
                {
                    strWhere = "InfoTypeID = '" + InfoType + "' And DelStatus <> 1";
                }
                else
                {
                    strWhere = "DelStatus <> 1";
                }
                break;

            default:
                break;
            }
            return(strWhere);
        }
示例#7
0
        /// <summary>
        /// 统计信息的数目
        /// </summary>
        /// <param name="Type">信息状态</param>
        /// <param name="InfoType">信息类型</param>
        /// <param name="strWhere">查询条件</param>
        /// <returns></returns>
        public int GetInfoCount(Tz888.BLL.Common.AuditStatus Type, Tz888.BLL.Common.InfoType InfoType, string Criteria)
        {
            string strInfoType = "";

            switch ((int)InfoType)
            {
            case 0:
                strInfoType = "Merchant";
                break;

            case 1:
                strInfoType = "Project";
                break;

            case 2:
                strInfoType = "Capital";
                break;

            default:
                break;
            }

            string strWhere = "";

            switch ((int)Type)
            {
            case 0:
                if (!string.IsNullOrEmpty(strInfoType))
                {
                    strWhere = "InfoTypeID = '" + InfoType + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) > GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Auditing).ToString();
                }
                else
                {
                    strWhere = "DelStatus <> 1 And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Auditing).ToString();
                }
                break;

            case 1:
                if (!string.IsNullOrEmpty(strInfoType))
                {
                    strWhere = "InfoTypeID = '" + InfoType + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) > GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Pass).ToString();
                }
                else
                {
                    strWhere = "DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) > GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Pass).ToString();
                }
                break;

            case 2:
                if (!string.IsNullOrEmpty(strInfoType))
                {
                    strWhere = "InfoTypeID = '" + InfoType + "' And DelStatus <> 1 And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.NoPass).ToString();
                }
                else
                {
                    strWhere = "DelStatus <> 1 And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.NoPass).ToString();
                }
                break;

            case 3:
                if (!string.IsNullOrEmpty(strInfoType))
                {
                    strWhere = "InfoTypeID = '" + InfoType + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) <= GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Pass).ToString();
                }
                else
                {
                    strWhere = "DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) <= GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Pass).ToString();
                }
                break;

            case 5:
                if (!string.IsNullOrEmpty(strInfoType))
                {
                    strWhere = "InfoTypeID = '" + InfoType + "' And DelStatus <> 1";
                }
                else
                {
                    strWhere = "DelStatus <> 1";
                }
                break;

            default:
                break;
            }
            if (string.IsNullOrEmpty(strWhere))
            {
                strWhere = Criteria;
            }
            else
            {
                strWhere += " AND " + Criteria;
            }
            return(this.GetCount(strInfoType, strWhere));
        }
示例#8
0
        /// <summary>
        /// 根据需求管理类型获取列表(总站后台需求管理使用)
        /// </summary>
        /// <param name="strGetFields"></param>
        /// <param name="fldName"></param>
        /// <param name="PageSize"></param>
        /// <param name="PageIndex"></param>
        /// <param name="OrderType"></param>
        /// <param name="loginName"></param>
        /// <param name="RoleName"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public DataSet GetList(string strGetFields, string fldName, int PageSize, int PageIndex, int OrderType, Tz888.BLL.Common.AuditStatus type, string InfoType)
        {
            string strWhere = "";

            switch ((int)type)
            {
            case 0:
                if (!string.IsNullOrEmpty(InfoType))
                {
                    strWhere = "InfoTypeID = '" + InfoType + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) > GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Auditing).ToString();
                }
                else
                {
                    strWhere = "DelStatus <> 1 And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Auditing).ToString();
                }
                break;

            case 1:
                if (!string.IsNullOrEmpty(InfoType))
                {
                    strWhere = "InfoTypeID = '" + InfoType + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) > GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Pass).ToString();
                }
                else
                {
                    strWhere = "DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) > GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Pass).ToString();
                }
                break;

            case 2:
                if (!string.IsNullOrEmpty(InfoType))
                {
                    strWhere = "InfoTypeID = '" + InfoType + "' And DelStatus <> 1 AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.NoPass).ToString();
                }
                else
                {
                    strWhere = "DelStatus <> 1 And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.NoPass).ToString();
                }
                break;

            case 3:
                if (!string.IsNullOrEmpty(InfoType))
                {
                    strWhere = "InfoTypeID = '" + InfoType + "' And DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) <= GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Pass).ToString();
                }
                else
                {
                    strWhere = "DelStatus <> 1 And DATEADD(Month, ValidateTerm, ValidateStartTime) <= GETDATE() And AuditingStatus = " + ((int)Tz888.BLL.Common.AuditStatus.Pass).ToString();
                }
                break;

            case 5:
                if (!string.IsNullOrEmpty(InfoType))
                {
                    strWhere = "InfoTypeID = '" + InfoType + "' And DelStatus <> 1";
                }
                else
                {
                    strWhere = "DelStatus <> 1";
                }
                break;

            default:
                break;
            }

            return(dal.GetList(strGetFields, fldName, PageSize, PageIndex, OrderType, strWhere));
        }