Example #1
0
        private void BindData()
        {
            int count = -1;

            BitAuto.YanFa.Crm2009.Entities.QueryCustInfo query = new BitAuto.YanFa.Crm2009.Entities.QueryCustInfo();
            Entities.ProjectTask_DelCustRelation         model = BLL.ProjectTask_DelCustRelation.Instance.GetProjectTask_DelCustRelationByTID(TID);
            if (IsShowdDelCustRelation && model != null &&
                !string.IsNullOrEmpty(model.DelCustIDs))
            {
                query.DelCustIDs = model.DelCustIDs;
            }
            else
            {
                if (!string.IsNullOrEmpty(CustName))
                {
                    if (!string.IsNullOrEmpty(CustNameAllMatch) &&
                        CustNameAllMatch.ToLower().Equals("yes"))
                    {
                        query.ExistCustName = CustName;
                    }
                    else
                    {
                        query.CustName = CustName;
                    }
                }
                if (ProvinceID > 0)
                {
                    query.ProvinceID = ProvinceID.ToString();
                }
                if (CityID > 0)
                {
                    query.CityID = CityID.ToString();
                }
                if (CountyID > 0)
                {
                    query.CountyID = CountyID.ToString();
                }
                if (ExceptCustID > 0)
                {
                    query.ExistCustID = ExceptCustID.ToString();
                }
                if (!string.IsNullOrEmpty(CustAddress))
                {
                    query.Address = CustAddress;
                }
                //if (!string.IsNullOrEmpty(TradeMarketID))
                //{
                //    query.TradeMarketID = TradeMarketID;
                //}
                if (!string.IsNullOrEmpty(CustContactName))
                {
                    query.ContactAllName = CustContactName;
                }
            }
            DataTable dt = BitAuto.YanFa.Crm2009.BLL.CustInfo.Instance.GetCustInfo(query, "CustName", 1, 100, out count);

            repterCustInfo.DataSource = dt;
            repterCustInfo.DataBind();
        }
Example #2
0
        private string GetList()
        {
            QueryCrmCustInfo queryCustInfo = new QueryCrmCustInfo();

            #region 条件

            if (CustID != string.Empty)
            {
                queryCustInfo.CustID = CustID;
            }
            if (CustName != string.Empty)
            {
                queryCustInfo.CustName = CustName;
            }
            if (CustAbbr != string.Empty)
            {
                queryCustInfo.AbbrName = CustAbbr;
            }
            if (BrandIDs != string.Empty)
            {
                queryCustInfo.BrandID = BrandIDs;
            }
            if (CarType != string.Empty)
            {
                queryCustInfo.CarType = CarType;
            }
            if (ProvinceID > 0)
            {
                queryCustInfo.ProvinceID = ProvinceID.ToString();
            }
            if (CityID > 0)
            {
                queryCustInfo.CityID = CityID.ToString();
            }
            if (CountyID > 0)
            {
                queryCustInfo.CountyID = CountyID.ToString();
            }
            //if (IsHavMember)
            //{
            //    queryCustInfo.IsHaveMember = true;
            //}
            //if (IsNoHavMember)
            //{
            //    queryCustInfo.IsHaveNoMember = true;
            //}

            if (!string.IsNullOrEmpty(CustType))
            {
                queryCustInfo.TypeID = CustType;
            }
            if (!string.IsNullOrEmpty(Address))
            {
                queryCustInfo.Address = Address;
            }
            if (!string.IsNullOrEmpty(TradeMarketID))
            {
                queryCustInfo.TradeMarketID = TradeMarketID;
            }

            if (CustStatus != string.Empty && CustStatus != "0,1")
            {
                queryCustInfo.StatusIDs = CustStatus;
            }
            if (CooperateStatusIDs != string.Empty)
            {
                queryCustInfo.CooperateStatusIDs = CooperateStatusIDs;
            }
            if (CooperatedStatusIDs != string.Empty)
            {
                queryCustInfo.CooperatedStatusIDs = CooperatedStatusIDs;
            }
            if (CustLockStatus != string.Empty && CustLockStatus != "0,1")
            {
                queryCustInfo.Lock = int.Parse(CustLockStatus);
            }
            if (DataSource != string.Empty && DataSource != "1,0")
            {
                queryCustInfo.TaskType = int.Parse(DataSource);
            }
            if (!string.IsNullOrEmpty(RequestBeginMemberCooperatedTime))
            {
                queryCustInfo.BeginMemberCooperatedTime = RequestBeginMemberCooperatedTime;
            }
            if (!string.IsNullOrEmpty(RequestEndMemberCooperatedTime))
            {
                queryCustInfo.EndMemberCooperatedTime = RequestEndMemberCooperatedTime;
            }
            if (!string.IsNullOrEmpty(RequestBeginNoMemberCooperatedTime))
            {
                queryCustInfo.BeginNoMemberCooperatedTime = RequestBeginNoMemberCooperatedTime;
            }
            if (!string.IsNullOrEmpty(RequestEndNoMemberCooperatedTime))
            {
                queryCustInfo.EndNoMemberCooperatedTime = RequestEndNoMemberCooperatedTime;
            }
            if (!string.IsNullOrEmpty(RequestMemberCooperateStatus))
            {
                queryCustInfo.MemberCooperateStatus = RequestMemberCooperateStatus;
            }
            if (!string.IsNullOrEmpty(RequestCreateCustStartDate))
            {
                queryCustInfo.CreateTimeStart = RequestCreateCustStartDate;
            }
            if (!string.IsNullOrEmpty(RequestCreateCustEndDate))
            {
                queryCustInfo.CreateTimeEnd = RequestCreateCustEndDate;
            }
            if (!string.IsNullOrEmpty(RequestAreaTypeIDs))
            {
                queryCustInfo.AreaTypeIDs = RequestAreaTypeIDs;
            }

            if (!string.IsNullOrEmpty(RequestProjectName))
            {
                queryCustInfo.ProjectName = RequestProjectName.Trim();
            }
            if (!string.IsNullOrEmpty(RequestStartMemberCooperatedBeginTime) ||
                !string.IsNullOrEmpty(RequestEndMemberCooperatedBeginTime))
            {
                queryCustInfo.CooperatedStatusIDs = "1";
                if (!string.IsNullOrEmpty(RequestStartMemberCooperatedBeginTime))
                {
                    queryCustInfo.StartMemberCooperatedBeginTime = RequestStartMemberCooperatedBeginTime.Trim();
                }
                if (!string.IsNullOrEmpty(RequestEndMemberCooperatedBeginTime))
                {
                    queryCustInfo.EndMemberCooperatedBeginTime = RequestEndMemberCooperatedBeginTime.Trim();
                }
            }
            #endregion

            DataTable dt = BLL.CrmCustInfo.Instance.GetCC_CrmCustIDsByAlone(queryCustInfo);

            List <string> colList = new List <string>();
            colList.Add("CustID");
            string jsonStr = Converter.DataTable2Json(dt, colList);
            return(jsonStr);
        }
        private DataTable GetData()
        {
            QueryCrmCustInfo queryCustInfo = new QueryCrmCustInfo();

            if (CustID != string.Empty)
            {
                queryCustInfo.CustID = CustID;
            }
            if (CustName != string.Empty)
            {
                queryCustInfo.CustName = CustName;
            }
            if (CustAbbr != string.Empty)
            {
                queryCustInfo.AbbrName = CustAbbr;
            }
            if (BrandIDs != string.Empty)
            {
                queryCustInfo.BrandID = BrandIDs;
            }
            if (CarType != string.Empty)
            {
                queryCustInfo.CarType = CarType;
            }
            if (ProvinceID > 0)
            {
                queryCustInfo.ProvinceID = ProvinceID.ToString();
            }
            if (CityID > 0)
            {
                queryCustInfo.CityID = CityID.ToString();
            }
            if (CountyID > 0)
            {
                queryCustInfo.CountyID = CountyID.ToString();
            }
            if (IsHavMember)
            {
                queryCustInfo.IsHaveMember = true;
            }
            if (IsNoHavMember)
            {
                queryCustInfo.IsHaveNoMember = true;
            }

            if (!string.IsNullOrEmpty(CustType))
            {
                queryCustInfo.TypeID = CustType;
            }
            if (!string.IsNullOrEmpty(Address))
            {
                queryCustInfo.Address = Address;
            }
            if (!string.IsNullOrEmpty(TradeMarketID))
            {
                queryCustInfo.TradeMarketID = TradeMarketID;
            }

            if (CustStatus != string.Empty && CustStatus != "0,1")
            {
                queryCustInfo.StatusIDs = CustStatus;
            }
            if (CooperateStatusIDs != string.Empty)
            {
                queryCustInfo.CooperateStatusIDs = CooperateStatusIDs;
            }
            if (CooperatedStatusIDs != string.Empty)
            {
                queryCustInfo.CooperatedStatusIDs = CooperatedStatusIDs;
            }
            if (CustLockStatus != string.Empty && CustLockStatus != "0,1")
            {
                queryCustInfo.Lock = int.Parse(CustLockStatus);
            }
            if (DataSource != string.Empty && DataSource != "1,0")
            {
                queryCustInfo.TaskType = int.Parse(DataSource);
            }
            if (!string.IsNullOrEmpty(RequestBeginMemberCooperatedTime))
            {
                queryCustInfo.BeginMemberCooperatedTime = RequestBeginMemberCooperatedTime;
            }
            if (!string.IsNullOrEmpty(RequestEndMemberCooperatedTime))
            {
                queryCustInfo.EndMemberCooperatedTime = RequestEndMemberCooperatedTime;
            }
            if (!string.IsNullOrEmpty(RequestBeginNoMemberCooperatedTime))
            {
                queryCustInfo.BeginNoMemberCooperatedTime = RequestBeginNoMemberCooperatedTime;
            }
            if (!string.IsNullOrEmpty(RequestEndNoMemberCooperatedTime))
            {
                queryCustInfo.EndNoMemberCooperatedTime = RequestEndNoMemberCooperatedTime;
            }
            if (!string.IsNullOrEmpty(RequestMemberCooperateStatus))
            {
                queryCustInfo.MemberCooperateStatus = RequestMemberCooperateStatus;
            }
            if (!string.IsNullOrEmpty(RequestCreateCustStartDate))
            {
                queryCustInfo.CreateTimeStart = RequestCreateCustStartDate;
            }
            if (!string.IsNullOrEmpty(RequestCreateCustEndDate))
            {
                queryCustInfo.CreateTimeEnd = RequestCreateCustEndDate;
            }
            if (!string.IsNullOrEmpty(RequestDistrictName))
            {
                queryCustInfo.DistrictName = RequestDistrictName;
            }
            DataTable dt = BLL.CrmCustInfo.Instance.GetCC_CrmCustInfoByAloneForExportCustID(queryCustInfo);

            return(dt);
        }
Example #4
0
        private void rptDataBind()
        {
            QueryCrmCustInfo queryCustInfo = new QueryCrmCustInfo();

            if (CustID != string.Empty)
            {
                queryCustInfo.CustID = CustID;
            }
            if (CustName != string.Empty)
            {
                queryCustInfo.CustName = CustName;
            }
            if (CustAbbr != string.Empty)
            {
                queryCustInfo.AbbrName = CustAbbr;
            }
            if (BrandIDs != string.Empty)
            {
                queryCustInfo.BrandID = BrandIDs;
            }
            if (CarType != string.Empty)
            {
                queryCustInfo.CarType = CarType;
            }
            if (ProvinceID > 0)
            {
                queryCustInfo.ProvinceID = ProvinceID.ToString();
            }
            if (CityID > 0)
            {
                queryCustInfo.CityID = CityID.ToString();
            }
            if (CountyID > 0)
            {
                queryCustInfo.CountyID = CountyID.ToString();
            }
            if (IsHavMember)
            {
                queryCustInfo.IsHaveMember = true;
            }
            if (IsNoHavMember)
            {
                queryCustInfo.IsHaveNoMember = true;
            }

            if (!string.IsNullOrEmpty(CustType))
            {
                queryCustInfo.TypeID = CustType;
            }
            if (!string.IsNullOrEmpty(Address))
            {
                queryCustInfo.Address = Address;
            }
            if (!string.IsNullOrEmpty(TradeMarketID))
            {
                queryCustInfo.TradeMarketID = TradeMarketID;
            }

            if (CustStatus != string.Empty && CustStatus != "0,1")
            {
                queryCustInfo.StatusIDs = CustStatus;
            }
            if (CooperateStatusIDs != string.Empty)
            {
                queryCustInfo.CooperateStatusIDs = CooperateStatusIDs;
            }
            if (CooperatedStatusIDs != string.Empty)
            {
                queryCustInfo.CooperatedStatusIDs = CooperatedStatusIDs;
            }
            if (CustLockStatus != string.Empty && CustLockStatus != "0,1")
            {
                queryCustInfo.Lock = int.Parse(CustLockStatus);
            }
            if (DataSource != string.Empty && DataSource != "1,0")
            {
                queryCustInfo.TaskType = int.Parse(DataSource);
            }
            if (!string.IsNullOrEmpty(RequestBeginMemberCooperatedTime))
            {
                queryCustInfo.BeginMemberCooperatedTime = RequestBeginMemberCooperatedTime;
            }
            if (!string.IsNullOrEmpty(RequestEndMemberCooperatedTime))
            {
                queryCustInfo.EndMemberCooperatedTime = RequestEndMemberCooperatedTime;
            }
            if (!string.IsNullOrEmpty(RequestBeginNoMemberCooperatedTime))
            {
                queryCustInfo.BeginNoMemberCooperatedTime = RequestBeginNoMemberCooperatedTime;
            }
            if (!string.IsNullOrEmpty(RequestEndNoMemberCooperatedTime))
            {
                queryCustInfo.EndNoMemberCooperatedTime = RequestEndNoMemberCooperatedTime;
            }
            if (!string.IsNullOrEmpty(RequestMemberCooperateStatus))
            {
                queryCustInfo.MemberCooperateStatus = RequestMemberCooperateStatus;
            }
            if (!string.IsNullOrEmpty(RequestCreateCustStartDate))
            {
                queryCustInfo.CreateTimeStart = RequestCreateCustStartDate;
            }
            if (!string.IsNullOrEmpty(RequestCreateCustEndDate))
            {
                queryCustInfo.CreateTimeEnd = RequestCreateCustEndDate;
            }
            if (!string.IsNullOrEmpty(RequestDistrictName))
            {
                queryCustInfo.DistrictName = RequestDistrictName;
            }
            DataTable dt = BLL.CrmCustInfo.Instance.GetCC_CrmCustInfoByAlone(queryCustInfo, "", PageCommon.Instance.PageIndex, PageCommon.Instance.PageSize, out RecordCount);

            Repeater_Custs.DataSource = dt;
            Repeater_Custs.DataBind();

            this.AjaxPager_Custs.InitPager(RecordCount);
        }