예제 #1
0
        /// <summary>
        /// 初始化服务标准信息
        /// </summary>
        private void InitData(EyouSoft.Model.CompanyStructure.ServiceTypes type)
        {
            int intRecordCount = 0;

            CurrencyPage = Utils.GetInt(Request.QueryString["Page"], 1);
            EyouSoft.IBLL.CompanyStructure.IServiceStandard         bll  = EyouSoft.BLL.CompanyStructure.ServiceStandard.CreateInstance();
            IList <EyouSoft.Model.CompanyStructure.ServiceStandard> list = bll.GetList(CompanyidAndUserid.Split('$')[0], type, intPageSize, CurrencyPage, ref intRecordCount);

            if (list != null && list.Count > 0)
            {
                this.RepeaterList.DataSource = list;
                this.RepeaterList.DataBind();
            }
            else
            {
                this.pnlNoData.Visible = true;
            }

            this.ExportPageInfo1.intPageSize    = intPageSize;
            this.ExportPageInfo1.intRecordCount = intRecordCount;
            this.ExportPageInfo1.CurrencyPage   = CurrencyPage;
            this.ExportPageInfo1.UrlParams      = Request.QueryString;
            this.ExportPageInfo1.PageLinkURL    = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?";

            list = null;
            bll  = null;
        }
예제 #2
0
        /// <summary>
        /// 根据公司ID获取包含项目列表
        /// </summary>
        /// <param name="companyId">公司编号</param>
        /// <param name="TypeID">包含项目类型</param>
        /// <param name="pageSize">每页显示条数</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="recordCount">总记录数</param>
        /// <returns></returns>
        public virtual IList <EyouSoft.Model.CompanyStructure.ServiceStandard> GetList(string companyId, EyouSoft.Model.CompanyStructure.ServiceTypes TypeID, int pageSize, int pageIndex, ref int recordCount)
        {
            IList <EyouSoft.Model.CompanyStructure.ServiceStandard> list = new List <EyouSoft.Model.CompanyStructure.ServiceStandard>();
            string tableName     = "tbl_ServiceStandard";
            string fields        = "ID,[Content],TypeID";
            string primaryKey    = "ID";
            string orderByString = "ID DESC";

            #region 查询条件
            StringBuilder strWhere = new StringBuilder();
            if (!string.IsNullOrEmpty(companyId))
            {
                strWhere.AppendFormat(" companyId='{0}' ", companyId);
            }
            if (strWhere.Length > 0)
            {
                strWhere.AppendFormat(" and TypeId={0} ", (int)TypeID);
            }
            else
            {
                strWhere.AppendFormat(" TypeId={0} ", (int)TypeID);
            }
            #endregion

            using (IDataReader dr = DbHelper.ExecuteReader(this._database, pageSize, pageIndex, ref recordCount, tableName, primaryKey, fields, strWhere.ToString(), orderByString))
            {
                EyouSoft.Model.CompanyStructure.ServiceStandard model = null;
                while (dr.Read())
                {
                    model         = new EyouSoft.Model.CompanyStructure.ServiceStandard();
                    model.Content = dr.GetString(1);
                    model.ID      = dr.GetInt32(0);
                    if (!dr.IsDBNull(2))
                    {
                        model.TypeID = (EyouSoft.Model.CompanyStructure.ServiceTypes)(int) dr.GetByte(2);
                    }
                    list.Add(model);
                    model = null;
                }
            }
            return(list);
        }
예제 #3
0
 /// <summary>
 /// 根据公司ID获取包含项目列表
 /// </summary>
 /// <param name="companyId">公司编号</param>
 /// <param name="TypeID">包含项目类型</param>
 /// <param name="pageSize">每页显示条数</param>
 /// <param name="pageIndex">当前页码</param>
 /// <param name="recordCount">总记录数</param>
 /// <returns></returns>
 public IList <EyouSoft.Model.CompanyStructure.ServiceStandard> GetList(string companyId, EyouSoft.Model.CompanyStructure.ServiceTypes TypeID, int pageSize, int pageIndex, ref int recordCount)
 {
     return(dal.GetList(companyId, TypeID, pageSize, pageIndex, ref recordCount));
 }