protected SupplierSearchPage()
     : base()
 {
     SearchResult = new StringBuilder();
     searchConditions = new string[] { "", "", "", "" };
     pager = new Pager(1, 25, 0);
 }
 protected MarketingServiceSearchPage()
     : base()
 {
     Keywords = "";
     ResultCategoriesHtml = new StringBuilder();
     ResultArticlesHtml = new StringBuilder();
     ResultArticlesPager = new Pager(1, 30);
     ResultArticlesPagerBar=new PagerBar();
 }
 public PagerBar()
     : base()
 {
     currentPageStyle = "";
     firstText = "��һҳ";
     previousText = "��һҳ";
     nextText = "��һҳ";
     lastText = "��ĩҳ";
     pageInfoFormat = "��{0}����¼����ǰ {1}/{2} ҳ ";
     numberCount = 9;
     displayFirstAndLast = true;
     method = PagerMethod.Get;
     pagerBarUrl = "";
     pager = null;
 }
Beispiel #4
0
 protected BasePage()
     : base()
 {
     base.EnableViewState = false;
     checkLogin = true;
     AjaxAction = "";
     RefUrl = String.Empty;
     ListPager = new Pager(1, 20);
     firstText = "��һҳ";
     previousText = "��һҳ";
     nextText = "��һҳ";
     lastText = "��ĩҳ";
     currentPageStyle = "cur";
     numberCount = 10;
 }
 public static List<PaymentRequire> List(int uid, PaymentRequireStatus status, Pager pager)
 {
     return List(uid, (short)status, pager);
 }
        private static ArrayList List(string op,int comId, DateTime start, DateTime end, Pager pager)
        {
            /*SupplierAccountList
            @comId int=0,
            @op varchar(20)='',
            @start varchar(10)='',
            @end varchar(10)='',
            @pageIndex int=1,
            @pageSize int=20,
            @sort int=0
             */

            //[Id], CompanyId, PaymentMode, Amount, [Datetime], Remark, Operater

            ArrayList list = new ArrayList();

            SqlParameter[] prams ={
                Database.MakeInParam("@comId",SqlDbType.Int,comId),
                Database.MakeInParam("@op",SqlDbType.VarChar,20,op),
                Database.MakeInParam("@start",SqlDbType.VarChar,10,start==DateTime.MinValue?"":start.ToShortDateString()),
                Database.MakeInParam("@end",SqlDbType.VarChar,10,end==DateTime.MinValue?"":end.ToShortDateString()),
                Database.MakeInParam("@pageIndex",SqlDbType.Int,pager.PageIndex),
                Database.MakeInParam("@pageSize",SqlDbType.Int,pager.PageSize),
                Database.MakeInParam("@sort",SqlDbType.Int,pager.SortNum)
            };

            SqlDataReader reader = null;
            try
            {
                reader = Database.ExecuteReader(CommandType.StoredProcedure, "SupplierAccountList", prams);

                if (reader.Read())
                {
                    pager.RecordCount = reader.GetInt32(0);

                    if (reader.NextResult())
                    {
                        while (reader.Read())
                        {
                            SupplierAccount sa = new SupplierAccount();
                            sa.id = reader.GetInt32(0);
                            sa.companyId = reader.GetInt32(1);
                            sa.paymentMode = reader.GetString(2);
                            sa.amount = Convert.ToSingle(reader.GetValue(3));
                            sa.datetime = reader.GetDateTime(4);
                            sa.remark = reader.GetString(5);
                            sa.operater = reader.GetString(6);
                            list.Add(sa);
                        }
                    }
                }
                reader.Close();
            }
            catch
            {
                //throw;
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
            }

            return list;
        }
 public static ArrayList List(int comId,Pager pager)
 {
     return List("", comId, DateTime.MinValue, DateTime.MinValue, pager);
 }
 public static ArrayList List(DateTime start, DateTime end, Pager pager)
 {
     return List("", 0, start, end, pager);
 }
Beispiel #9
0
 public static ArrayList ListBySupplier(int spId, bool viewed, bool evaled, Pager pager)
 {
     return List(0, "", "", "", spId, 0, -1, viewed ? (short)1 : (short)0, evaled ? (short)1 : (short)0,pager);
 }
Beispiel #10
0
 public static ArrayList ListByCategory(string category, Pager pager)
 {
     return List(0, "", category, "", 0, 0, -1, -1, -1,pager);
 }
 public static ArrayList List(Pager pager)
 {
     return List(-1, pager);
 }
Beispiel #12
0
        /// <summary>
        /// ��ȡSupplier�б�
        /// </summary>
        /// <param name="keywords">�ؼ���</param>
        /// <param name="categoryCode">�������</param>
        /// <param name="industryCode">��ҵ����</param>
        /// <param name="areaCode">��������</param>
        /// <param name="pager">��ҳ</param>
        /// <returns></returns>
        public static ArrayList List(int status, string keywords, string categoryCode, string industryCode, string areaCode, Pager pager)
        {
            /*
             SupplierList
            @status int=-1,
            @keywords varchar(50)='',
            @industry varchar(6)='',
            @area varchar(6)='',
            @cate varchar(30)='',
            @pageIndex int=1,
            @pageSize int=20,
            @sort int=0
             */
            //[Id], Guid,Email,[Name],CompanyName, Address, PhoneNumber, Status,FoundedYear,
            //AllowMatch,GeneralScore, IndustryScore,Priority,Balance
            ArrayList list = new ArrayList();

            SqlParameter[] prams ={
                Database.MakeInParam("@status",SqlDbType.Int,status),
                Database.MakeInParam("@keywords",SqlDbType.VarChar,50,keywords),
                Database.MakeInParam("@industry",SqlDbType.VarChar,6,industryCode),
                Database.MakeInParam("@area",SqlDbType.VarChar,6,areaCode),
                Database.MakeInParam("@cate",SqlDbType.VarChar,30,keywords),
                Database.MakeInParam("@pageIndex",SqlDbType.Int,pager.PageIndex),
                Database.MakeInParam("@pageSize",SqlDbType.Int,pager.PageSize),
                Database.MakeInParam("@sort",SqlDbType.Int,pager.SortNum)
            };

            SqlDataReader reader = null;
            try
            {
                reader = Database.ExecuteReader(CommandType.StoredProcedure, "SupplierList", prams);

                if (reader.Read())
                {
                    pager.RecordCount = reader.GetInt32(0);

                    if (reader.NextResult())
                    {
                        SupplierListInfo obj;
                        while (reader.Read())
                        {
                            obj = new SupplierListInfo(reader);
                            list.Add(obj);
                        }
                    }
                }
                reader.Close();
            }
            catch
            {
                throw;
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
            }

            return list;
        }
Beispiel #13
0
 public static ArrayList List(int status, string keywords, string industryCode, string areaCode, Pager pager)
 {
     return List(-1, keywords, "", industryCode, areaCode, pager);
 }
Beispiel #14
0
 public static ArrayList List(string industryCode, string areaCode, Pager pager)
 {
     return List(-1, "", "", industryCode, areaCode, pager);
 }
Beispiel #15
0
 public static ArrayList List(string keywords, Pager pager)
 {
     return List(-1, keywords, "", "", "", pager);
 }
Beispiel #16
0
        public static ArrayList List(int actionId,string leadIdOrGuid,string category,string area,
            int spId,int buyerId,short mailed,short viewed,short evaled,Pager pager)
        {
            /*
             MatchedLeadList
            @actionId int=0,		--ָ������ID
            @leadId varchar(32)='',		--ָ��Lead
            @cate varchar(30)='',		--ָ������
            @area varchar(6)='',		--ָ��ij������
            @spId int=0,			--ָ����Ӧ��
            @buyerId int=0,			--ָ��Buyer
            @mailed smallint=-1,		--����-1ʱָ���ʼ�״̬
            @viewed smallint=-1,		--����-1ʱָ���鿴״̬
            @evaled smallint=-1,		--����-1ʱָ������״̬
            @pageIndex int=1,		--ָ����ҳҳ��
            @pageSize int=20,		--ָ����ҳ��С
            @sort int=0			--ָ������
             */

            ArrayList list = new ArrayList();

            SqlParameter[] prams ={
                Database.MakeInParam("@actionId",SqlDbType.Int,actionId),
                Database.MakeInParam("@leadId",SqlDbType.VarChar,32,leadIdOrGuid),
                Database.MakeInParam("@cate",SqlDbType.VarChar,30,category),
                Database.MakeInParam("@area",SqlDbType.VarChar,6,area),
                Database.MakeInParam("@spId",SqlDbType.Int,spId),
                Database.MakeInParam("@buyerId",SqlDbType.Int,buyerId),
                Database.MakeInParam("@mailed",SqlDbType.SmallInt,mailed),
                Database.MakeInParam("@viewed",SqlDbType.SmallInt,viewed),
                Database.MakeInParam("@evaled",SqlDbType.SmallInt,evaled),
                Database.MakeInParam("@pageIndex",SqlDbType.Int,pager.PageIndex),
                Database.MakeInParam("@pageSize",SqlDbType.Int,pager.PageSize),
                Database.MakeInParam("@sort",SqlDbType.Int,pager.SortNum)
            };

            SqlDataReader reader = null;

            try
            {
                reader = Database.ExecuteReader(CommandType.StoredProcedure, "MatchedLeadList", prams);
                if (reader.Read())
                {
                    pager.RecordCount = reader.GetInt32(0);

                    if (reader.NextResult())
                    {
                        while (reader.Read())
                        {
                            //0-7:[Id], LeadId, LeadGuid, Category, Area, IndustryRequired, Nature, [Datetime],
                            //8-13:ActionId, SupplierId,SupplierName, BuyerId,BuyerName, MatchedDatetime,
                            //14-17:Mailed, Viewed, Evaluated
                            MatchedLeads mlead = new MatchedLeads();
                            mlead.id = reader.GetInt32(0);
                            mlead.actionId = reader.GetInt32(8);
                            mlead.datetime = reader.GetDateTime(13);
                            mlead.mailed = reader.GetBoolean(14);
                            mlead.viewed = reader.GetBoolean(15);
                            mlead.evaluated = reader.GetBoolean(16);
                            mlead.lead = new Lead(reader.GetInt32(1),reader.GetString(2),reader.GetDateTime(7));
                            mlead.lead.Category = reader.GetString(3);
                            mlead.lead.Area = reader.GetString(4);
                            mlead.lead.IndustryRequire = reader.GetBoolean(5);
                            mlead.lead.NatrueRequire = reader.GetInt16(6);
                            mlead.supplierId = reader.GetInt32(9);
                            mlead.supplierName = reader.GetString(10);
                            mlead.buyerId = reader.GetInt32(11);
                            mlead.buyerName = reader.GetString(12);
                            list.Add(mlead);
                        }
                    }
                }
                reader.Close();
            }
            catch
            {
                throw;
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
            }

            return list;
        }
Beispiel #17
0
 public static ArrayList ListByArea(string area, Pager pager)
 {
     return List(0, "", "", area, 0, 0, -1, -1, -1, pager);
 }
 public static ArrayList List(bool isChk,Pager pager)
 {
     return List(isChk ? (short)1 : (short)0, pager);
 }
Beispiel #19
0
 public static ArrayList ListBySupplier(int spId, Pager pager)
 {
     return List(0, "", "", "", spId, 0, -1, -1, -1, pager);
 }
        private static ArrayList List(short isChecked,Pager pager)
        {
            /*
             CompanyMinisiteList
            @ischecked smallint=-1,
            @pageIndex int=1,
            @pageSize int=20,
            @sort int=0
             */

            //CompanyId, Logo,Host,Style, CompanyBrief, ServiceBrief, OutLinks, ViewTimes, Checked,hostBinded

            ArrayList list = new ArrayList();

            SqlParameter[] prams ={
                Database.MakeInParam("@ischecked",SqlDbType.SmallInt,isChecked),
                Database.MakeInParam("@pageIndex",SqlDbType.Int,pager.PageIndex),
                Database.MakeInParam("@pageSize",SqlDbType.Int,pager.PageSize),
                Database.MakeInParam("@sort",SqlDbType.Int,pager.SortNum)
            };

            SqlDataReader reader = null;
            try
            {
                reader = Database.ExecuteReader(CommandType.StoredProcedure, "CompanyMinisiteList", prams);

                if (reader.Read())
                {
                    pager.RecordCount = reader.GetInt32(0);

                    if (reader.NextResult())
                    {
                        while (reader.Read())
                        {
                            CompanyMinisite minisite = new CompanyMinisite();
                            minisite.companyId = reader.GetInt32(0);
                            minisite.companyName = reader.IsDBNull(1) ? "" : reader.GetString(1);
                            minisite.logoGuid = reader.GetString(2);
                            minisite.host = reader.GetString(3);
                            minisite.style = reader.GetString(4);
                            minisite.companyBrief = reader.GetString(5);
                            minisite.serviceBrief = reader.GetString(6);
                            minisite.outLinks = reader.GetString(7);
                            minisite.viewTimes = reader.GetInt32(8);
                            minisite.isChecked = reader.GetString(9) == "1";
                            minisite.hostBinded = reader.GetBoolean(10);
                            list.Add(minisite);
                        }
                    }
                }
                reader.Close();
            }
            catch
            {
                //throw;
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
            }

            return list;
        }
 public static ArrayList List(Pager pager)
 {
     return List("", 0, DateTime.MinValue, DateTime.MinValue, pager);
 }
Beispiel #22
0
        protected override void Render(HtmlTextWriter writer)
        {
            //writer.Write("<!-- classes=" + classes + ",category=" + category + " -->");
            if (!useCache)
            {
                Pager p = new Pager(1, count);
                foreach (ArticleListInfo a in Article.List(keywords, classes, category, p))
                {
                    writer.Write(String.Format(listFormat,
                                            a.Id.ToString(),
                                            a.Guid,
                                            a.TemplateId,
                                            a.Title,
                                            a.ShortTitle,
                                            a.Classes,
                                            a.Categories,
                                            a.Datetime,
                                            a.Datetime.ToString("yyyyMM")));
                }
                if (p.RecordCount == 0)
                {
                    writer.Write("��������£�");
                }
            }
            else
            {
                ArrayList list = DataCache.GetCache("library") as ArrayList;
                int i = 0;
                if (list == null)
                {
                    writer.Write("��������£�");
                    return;
                }

                if (list.Count==0)
                {
                    writer.Write("��������£�");
                    return;
                }

                foreach (ArticleListInfo a in list)
                {
                    writer.Write(String.Format(listFormat,
                                            a.Id.ToString(),
                                            a.Guid,
                                            a.TemplateId,
                                            a.Title,
                                            a.ShortTitle,
                                            a.Classes,
                                            a.Categories,
                                            a.Datetime,
                                            a.Datetime.ToString("yyyyMM")));
                    i++;
                    if (i >= count)
                    {
                        break;
                    }
                }
            }
        }
 public static ArrayList List(string op, DateTime start, DateTime end, Pager pager)
 {
     return List(op, 0, DateTime.MinValue, DateTime.MinValue, pager);
 }
Beispiel #24
0
 public static ArrayList List(Pager pager)
 {
     return List(0, "", "", "", 0, 0, -1, -1, -1,pager);
 }
 public static ArrayList List(int comId,DateTime start,DateTime end, Pager pager)
 {
     return List("", comId, start, end, pager);
 }
Beispiel #26
0
 public static ArrayList List(int buyerId, Pager pager)
 {
     return List(0, "", "", "", 0, buyerId, -1, -1, -1, pager);
 }
Beispiel #27
0
 public static List<PaymentRequire> List(Pager pager)
 {
     return List(0, (short)-1, pager);
 }
Beispiel #28
0
 public static ArrayList List(string leadIdOrGuid, Pager pager)
 {
     return List(0, leadIdOrGuid, "", "", 0, 0, -1, -1, -1, pager);
 }
Beispiel #29
0
        private static List<PaymentRequire> List(int uid,short status,Pager pager)
        {
            /*
             INV_PayRequireList
            @uid int=0,
            @status smallint=-1,
            @pageIndex int=1,
            @pageSize int=20,
            @sort int=0
             */
            //[Id],[UserId],[Datetime],[Amount],[PayModeId],[PayRecordId],[Status]

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

            using (SqlDataReader reader = Database.ExecuteReader(CommandType.StoredProcedure, "INV_PayRequireList",
                new SqlParameter[] {
                    Database.MakeInParam("@uid",SqlDbType.Int,uid),
                    Database.MakeInParam("@status",SqlDbType.SmallInt,status),
                    Database.MakeInParam("@pageindex",SqlDbType.Int,pager.PageIndex),
                    Database.MakeInParam("@pagesize",SqlDbType.Int,pager.PageSize),
                    Database.MakeInParam("@sort",SqlDbType.Int,pager.SortNum)
                }))
            {
                if (reader.Read())
                {
                    pager.RecordCount = reader.GetInt32(0);

                    if (reader.NextResult())
                    {
                        PaymentRequire obj;
                        while (reader.Read())
                        {
                            obj = new PaymentRequire();
                            obj.id = reader.GetInt32(0);
                            obj.userId = reader.GetInt32(1);
                            obj.datetime = reader.GetDateTime(2);
                            obj.amount = Convert.ToSingle(reader.GetValue(3));
                            obj.payModeId = reader.GetInt32(4);
                            obj.payRecordId = reader.GetInt32(5);
                            obj.status = (PaymentRequireStatus)(reader.GetInt16(6));
                            list.Add(obj);
                        }
                    }
                }
                reader.Close();
            }
            return list;
        }
Beispiel #30
0
 public static ArrayList List(bool mailed, Pager pager)
 {
     return List(0, "", "", "", 0, 0, mailed ? (short)1 : (short)0, -1, -1, pager);
 }