Ejemplo n.º 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();
        }
Ejemplo n.º 2
0
 City GetCityByID(CityID cityID)
 {
     // loop through all cites
     foreach (City city in transform.Find("Map/Cities").GetComponentsInChildren <City>())
     {
         // compare city id to searchable id
         if (cityID == city.CityID)
         {
             return(city);
         }
     }
     Debug.LogError("Failed to find city by " + cityID.ToString() + " ID");
     return(null);
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                /*  bool IsSysAdmin = true;
                 * bool IsSceAdmin = true;
                 *
                 * if (null == Session["IsSYS"] || (Boolean)Session["IsSYS"] != true)
                 * {
                 *    IsSysAdmin = false;
                 *    IsSceAdmin = false;
                 *
                 *    AdminInfoBLL _AdminInfoBLL = new AdminInfoBLL();
                 *    RoleBLL _RoleBLL = new RoleBLL();
                 *    int AdminID = int.Parse(Session["AdminID"].ToString());
                 *    int RoleID = _RoleBLL.GetRoleIDByAdminID(AdminID);
                 *    IsSceAdmin = _AdminInfoBLL.CheckFunction(RoleID, "娱乐场所管理");
                 * }
                 *
                 * if (!(IsSysAdmin || IsSceAdmin))
                 *    Response.Redirect("../../NotAllowed.aspx");
                 * else
                 * {*/
                this.CityBind();
                int CityID;
                CityID = int.Parse(this.DropDownCity.SelectedValue.ToString());
                BLL.EntertainmentBLL.EntertainmentBLL _EntertainmentBLL = new BLL.EntertainmentBLL.EntertainmentBLL();
                DT = _EntertainmentBLL.CityEnterTainMentSplit(CityID, this.AspNetPager4.PageSize, PageStart);

                if (Request.QueryString["CityID"] != null && Request.QueryString["CityID"] != "")
                {
                    CityID = int.Parse(Request.QueryString["CityID"].ToString());
                    this.DropDownCity.SelectedValue = CityID.ToString();
                }
                //   }
            }
        }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 6
0
        protected void lvMDCity_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            Int64 CityID;

            Int64.TryParse(e.CommandArgument.ToString(), out CityID);

            if (CityID > 0)
            {
                if (string.Equals(e.CommandName, "EditItem"))
                {
                    _CityID = CityID;

                    PrepareEditView();

                    cpeEditor.Collapsed   = false;
                    cpeEditor.ClientState = "false";
                }
                else if (string.Equals(e.CommandName, "DeleteItem"))
                {
                    try
                    {
                        Int64 result = -1;

                        String fe = SqlExpressionBuilder.PrepareFilterExpression(MDCityEntity.FLD_NAME_CityID, CityID.ToString(), SQLMatchType.Equal);

                        MDCityEntity mDCityEntity = new MDCityEntity();


                        result = FCCMDCity.GetFacadeCreate().Delete(mDCityEntity, fe, DatabaseOperationType.Delete, TransactionRequired.No);

                        if (result == 0)
                        {
                            _CityID       = 0;
                            _MDCityEntity = new MDCityEntity();
                            PrepareInitialView();
                            BindMDCityList();

                            MiscUtil.ShowMessage(lblMessage, "City has been successfully deleted.", true);
                        }
                        else
                        {
                            MiscUtil.ShowMessage(lblMessage, "Failed to delete City.", true);
                        }
                    }
                    catch (Exception ex)
                    {
                        MiscUtil.ShowMessage(lblMessage, ex.Message, true);
                    }
                }
            }
        }
Ejemplo n.º 7
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);
        }
        private string SumbitWXT(out string errMsg)
        {
            errMsg = "";
            string json = "";

            json = FanXianHelper.Instance.SubmitFanxianOrder(UserID, UserName, Mobile, CarTypeID, int.Parse(MemberCode), CityID);


            #region 记日志

            UpdateOrderData updateLogModel = new UpdateOrderData();
            updateLogModel.APIType        = 7;
            updateLogModel.CreateTime     = DateTime.Now;
            updateLogModel.CreateUserID   = BLL.Util.GetLoginUserID();
            updateLogModel.IsUpdate       = 1;
            updateLogModel.TaskID         = TaskID;
            updateLogModel.UpdateErrorMsg = "提交网销通订单接口:汽车通UserID:" + UserID.ToString() + ",用户姓名:" + UserName + ",用户手机号:" + Mobile + ",车款ID:" + CarTypeID.ToString() + ",经销商ID:" + MemberCode + ",用户所在城市ID:" + CityID.ToString() + "。返回信息:" + json;

            BLL.UpdateOrderData.Instance.Insert(updateLogModel);


            #endregion

            return(json);
        }