예제 #1
0
        /// <summary>
        /// 获取单据列表
        /// </summary>
        /// <param name="userid">创建人(拥有者)</param>
        /// <param name="type">类型</param>
        /// <param name="status">状态</param>
        /// <param name="keywords">关键词</param>
        /// <param name="pageSize">页Size</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="totalCount">总数</param>
        /// <param name="pageCount"><总页/param>
        /// <param name="clientID">客户端ID</param>
        /// <returns></returns>
        public static List <StorageDoc> GetStorageDocList(string userid, EnumDocType type, EnumDocStatus status, string keywords, int pageSize, int pageIndex, ref int totalCount, ref int pageCount, string clientID)
        {
            DataSet ds = OrdersDAL.GetStorageDocList(userid, (int)type, (int)status, keywords, pageSize, pageIndex, ref totalCount, ref pageCount, clientID);

            List <StorageDoc> list = new List <StorageDoc>();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                StorageDoc model = new StorageDoc();
                model.FillData(dr);
                model.CreateUser = OrganizationBusiness.GetUserByUserID(model.CreateUserID, clientID);
                model.StatusStr  = GetDocStatusStr(model.DocType, model.Status);

                list.Add(model);
            }
            return(list);
        }