Ejemplo n.º 1
0
        /*/// <summary>
         * /// 获取消息集合
         * /// </summary>
         * /// <param name="chaXun">查询</param>
         * /// <returns></returns>
         * public IList<EyouSoft.Model.MXiaoXiInfo> GetXiaoXis(EyouSoft.Model.MXiaoXiChaXunInfo chaXun)
         * {
         *  int pageSize = 2000;
         *  int recordCount = 0;
         *
         *  return GetXiaoXis(pageSize, 1, ref recordCount, chaXun);
         * }*/

        /// <summary>
        /// 获取消息数
        /// </summary>
        /// <param name="chaXun">查询</param>
        /// <returns></returns>
        public int GetXiaoXiShu(EyouSoft.Model.MXiaoXiChaXunInfo chaXun)
        {
            int recordCount = 0;

            var items = GetXiaoXis(1, 1, ref recordCount, chaXun);

            return(recordCount);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// init xiaoxi shu
        /// </summary>
        void InitXiaoXiShu()
        {
            IList <EyouSoft.Model.XiaoXiLeiXing> leixings = new List <EyouSoft.Model.XiaoXiLeiXing>();

            leixings.Add(EyouSoft.Model.XiaoXiLeiXing.公司注册待审核);
            var chaXun = new EyouSoft.Model.MXiaoXiChaXunInfo();

            chaXun.Status          = EyouSoft.Model.XiaoXiStatus.未读;
            chaXun.LeiXings        = leixings;
            chaXun.JieShouGongSiId = YongHuInfo.GongSiId;

            XiaoXiShu = new BLL.BXiaoXi().GetXiaoXiShu(chaXun);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// get chaxun
        /// </summary>
        /// <returns></returns>
        EyouSoft.Model.MXiaoXiChaXunInfo GetChaXunInfo()
        {
            var info = new EyouSoft.Model.MXiaoXiChaXunInfo();

            info.JieShouGongSiId = YongHuInfo.GongSiId;
            info.LeiXings        = new List <EyouSoft.Model.XiaoXiLeiXing>();
            info.LeiXings.Add(EyouSoft.Model.XiaoXiLeiXing.公司注册待审核);
            info.Status = (EyouSoft.Model.XiaoXiStatus?)Utils.GetEnumValueNullable(typeof(EyouSoft.Model.XiaoXiStatus), Utils.GetQueryStringValue("txtStatus"));

            if (Utils.GetQueryStringValue("txtIsChaXun") != "1")
            {
                info.Status  = EyouSoft.Model.XiaoXiStatus.未读;
                XiaoXiStatus = ((int)EyouSoft.Model.XiaoXiStatus.未读).ToString();
            }


            return(info);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 获取采购商消息数量
        /// </summary>
        void GetCgsXiaoXi()
        {
            var info   = new MAjaxXiaoXiInfo();
            var chaXun = new EyouSoft.Model.MXiaoXiChaXunInfo();

            EyouSoft.Model.SSO.MYongHuInfo loginYongHuInfo;
            bool isLogin = EyouSoft.Security.Membership.YongHuProvider.IsLogin(out loginYongHuInfo);

            if (isLogin && loginYongHuInfo.LeiXing == EyouSoft.Model.YongHuLeiXing.采购商)
            {
                chaXun.JieShouGongSiId = loginYongHuInfo.GongSiId;
                chaXun.Status          = EyouSoft.Model.XiaoXiStatus.未读;
                chaXun.LeiXings        = new List <EyouSoft.Model.XiaoXiLeiXing>();
                chaXun.LeiXings.Add(EyouSoft.Model.XiaoXiLeiXing.采购商待确认报价);
                chaXun.LeiXings.Add(EyouSoft.Model.XiaoXiLeiXing.采购商待确认收货);

                var xiaoXiShuLiang = new EyouSoft.BLL.BXiaoXi().GetXiaoXiShu(chaXun);

                info.ShuLiang = xiaoXiShuLiang;
            }

            Utils.RCWE_AJAX("1", "", info);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 获取消息集合
        /// </summary>
        /// <param name="pageSize">页记录数</param>
        /// <param name="pageIndex">页序号</param>
        /// <param name="recordCount">总记录数</param>
        /// <param name="chaXun">查询</param>
        /// <returns></returns>
        public IList <EyouSoft.Model.MXiaoXiInfo> GetXiaoXis(int pageSize, int pageIndex, ref int recordCount, EyouSoft.Model.MXiaoXiChaXunInfo chaXun)
        {
            IList <EyouSoft.Model.MXiaoXiInfo> items = new List <EyouSoft.Model.MXiaoXiInfo>();

            string        fields        = "*";
            StringBuilder sql           = new StringBuilder();
            string        tableName     = "tbl_XiaoXi";
            string        orderByString = " Status ASC,FaChuTime DESC ";
            string        heJiString    = "";

            #region sql
            sql.Append(" 1=1 ");

            if (chaXun != null)
            {
                if (!string.IsNullOrEmpty(chaXun.FaChuGongSiId))
                {
                    sql.AppendFormat(" AND FaChuGongSiId='{0}' ", chaXun.FaChuGongSiId);
                }
                if (!string.IsNullOrEmpty(chaXun.FaChuRenId))
                {
                    sql.AppendFormat(" AND FaChuRenId='{0}' ", chaXun.FaChuRenId);
                }
                if (!string.IsNullOrEmpty(chaXun.JieShouGongSiId))
                {
                    sql.AppendFormat(" AND JieShouGongSiId='{0}' ", chaXun.JieShouGongSiId);
                }
                if (!string.IsNullOrEmpty(chaXun.JieShouRenId))
                {
                    sql.AppendFormat(" AND JieShouRenId='{0}' ", chaXun.JieShouRenId);
                }
                if (chaXun.LeiXing.HasValue)
                {
                    sql.AppendFormat(" AND LeiXing={0} ", (int)chaXun.LeiXing.Value);
                }
                if (chaXun.Status.HasValue)
                {
                    sql.AppendFormat(" AND Status={0} ", (int)chaXun.Status.Value);
                }
                if (chaXun.LeiXings != null && chaXun.LeiXings.Count > 0)
                {
                    sql.AppendFormat(" AND LeiXing IN({0}) ", GetSqlIn(chaXun.LeiXings));
                }
            }

            #endregion

            using (IDataReader rdr = DbHelper.ExecuteReader1(_db, pageSize, pageIndex, ref recordCount, tableName, fields, sql.ToString(), orderByString, heJiString))
            {
                while (rdr.Read())
                {
                    var info = new EyouSoft.Model.MXiaoXiInfo();
                    info.BiaoTi     = rdr["BiaoTi"].ToString();
                    info.ChuLiRenId = rdr["ChuLiRenId"].ToString();
                    if (!rdr.IsDBNull(rdr.GetOrdinal("ChuLiTime")))
                    {
                        info.ChuLiTime = rdr.GetDateTime(rdr.GetOrdinal("ChuLiTime"));
                    }
                    info.FaChuGongSiId   = rdr["FaChuGongSiId"].ToString();
                    info.FaChuRenId      = rdr["FaChuRenId"].ToString();
                    info.FaChuTime       = rdr.GetDateTime(rdr.GetOrdinal("FaChuTime"));
                    info.GuanLianId      = rdr["GuanLianId"].ToString();
                    info.JieShouGongSiId = rdr["JieShouGongSiId"].ToString();
                    info.JieShouRenId    = rdr["JieShouRenId"].ToString();
                    info.LeiXing         = (EyouSoft.Model.XiaoXiLeiXing)rdr.GetInt32(rdr.GetOrdinal("LeiXing"));
                    info.NeiRong         = rdr["NeiRong"].ToString();
                    info.Status          = (EyouSoft.Model.XiaoXiStatus)rdr.GetInt32(rdr.GetOrdinal("Status"));
                    info.XiaoXiId        = rdr["XiaoXiId"].ToString();
                    items.Add(info);
                }
            }

            return(items);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 获取消息集合
        /// </summary>
        /// <param name="pageSize">页记录数</param>
        /// <param name="pageIndex">页序号</param>
        /// <param name="recordCount">总记录数</param>
        /// <param name="chaXun">查询</param>
        /// <returns></returns>
        public IList <EyouSoft.Model.MXiaoXiInfo> GetXiaoXis(int pageSize, int pageIndex, ref int recordCount, EyouSoft.Model.MXiaoXiChaXunInfo chaXun)
        {
            if (pageSize <= 0)
            {
                pageSize = 1;
            }
            if (pageIndex <= 0)
            {
                pageIndex = 1;
            }

            var items = dal.GetXiaoXis(pageSize, pageIndex, ref recordCount, chaXun);

            return(items);
        }