Ejemplo n.º 1
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="phone"></param>
        /// <param name="Comment"></param>
        /// <returns></returns>
        public DataTable GetBlackList(string procinceName, string cityName, string phone, string Comment, string PageIndex, string PageNum)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("SELECT TOP(" + ValueHandler.GetIntNumberValue(PageNum) + ")* FROM(SELECT *,ROW_NUMBER() OVER (ORDER BY JoinDate DESC) AS 'Num' FROM YX_BlackList WHERE 1=1");
            if (procinceName != "")
            {
                sb.Append(" AND BL_ProvinceName='" + ValueHandler.GetStringValue(procinceName) + "'");
            }
            if (cityName != "")
            {
                sb.Append(" AND BL_CityName ='" + ValueHandler.GetStringValue(cityName) + "'");
            }
            if (ValueHandler.GetStringValue(phone) != "")
            {
                sb.Append(" AND BL_Phone LIKE '%" + ValueHandler.GetStringValue(phone) + "%'");
            }
            if (ValueHandler.GetStringValue(Comment) != "")
            {
                sb.Append(" AND BL_Comment LIKE '%" + ValueHandler.GetStringValue(Comment) + "%'");
            }
            sb.AppendFormat(") T WHERE T.Num >(0+({0}-1)*{1}) order by Num asc", ValueHandler.GetIntNumberValue(PageIndex), ValueHandler.GetIntNumberValue(PageNum));

            return(SearchData(sb.ToString()));
        }
Ejemplo n.º 2
0
        public string UpXFBdate(object obj)
        {
            ArrayList    arr   = JSON.getPara(obj);
            CXT_Customer Model = new CXT_Customer();

            Model.Cust_Code         = ValueHandler.GetStringValue(arr[0]);
            Model.Cust_Name         = ValueHandler.GetStringValue(arr[1]);
            Model.Cust_OldName      = ValueHandler.GetStringValue(arr[2]);
            Model.Cust_NameKey      = ValueHandler.GetStringValue(arr[3]);
            Model.Cust_Phone        = ValueHandler.GetStringValue(arr[4]);
            Model.Cust_Linkman      = ValueHandler.GetStringValue(arr[5]);
            Model.Cust_LinkPhone    = ValueHandler.GetStringValue(arr[6]);
            Model.Cust_ProvinceCode = ValueHandler.GetStringValue(arr[7]);
            Model.Cust_ProvinceName = ValueHandler.GetStringValue(arr[8]);
            Model.Cust_CityCode     = ValueHandler.GetStringValue(arr[9]);
            Model.Cust_CityName     = ValueHandler.GetStringValue(arr[10]);
            Model.Cust_CountyCode   = ValueHandler.GetStringValue(arr[11]);
            Model.Cust_CountyName   = ValueHandler.GetStringValue(arr[12]);
            Model.Cust_Address      = ValueHandler.GetStringValue(arr[13]);
            Model.Cust_IsBill       = ValueHandler.GetStringValue(arr[14]);
            Model.Cust_BillMoney    = ValueHandler.GetIntNumberValue(arr[15]);
            Model.Cust_BillNumber   = ValueHandler.GetStringValue(arr[16]);
            Model.Cust_Nature       = ValueHandler.GetStringValue(arr[17]);
            Model.Cust_KFVoice      = ValueHandler.GetStringValue(arr[18]);
            Model.Cust_Source       = ValueHandler.GetStringValue(arr[19]);
            Model.Cust_WH_Remark    = ValueHandler.GetStringValue(arr[20]);
            Model.Cust_WH_UserName  = ValueHandler.GetStringValue(BLL_User.User_Name);
            Model.Cust_State        = ValueHandler.GetStringValue("待审");
            Model.Cust_IsView       = ValueHandler.GetIntNumberValue(arr[21]);
            Model.fromPage          = ValueHandler.GetStringValue(arr[22]);
            string Data = dAL_CallCenterDts.UpXFBdate(Model);

            return(Data);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 得到数据
        /// </summary>
        public string ConSql(AF_User Model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("User_LoginName = '" + ValueHandler.GetStringValue(Model.User_LoginName) + "', ");

            strSql.Append("User_Password = '******', ");

            strSql.Append("User_Name = '" + ValueHandler.GetStringValue(Model.User_Name) + "', ");

            strSql.Append("User_Sex = '" + ValueHandler.GetStringValue(Model.User_Sex) + "', ");

            strSql.Append("User_Age = " + ValueHandler.GetIntNumberValue(Model.User_Age) + ", ");

            strSql.Append("User_Phone = '" + ValueHandler.GetStringValue(Model.User_Phone) + "', ");

            strSql.Append("User_Post = '" + ValueHandler.GetStringValue(Model.User_Post) + "', ");

            strSql.Append("User_EntryDate = " + ValueHandler.GetMarkStringDateValue(Model.User_EntryDate) + ", ");

            strSql.Append("User_Place = '" + ValueHandler.GetStringValue(Model.User_Place) + "', ");

            strSql.Append("JoinMan = '" + ValueHandler.GetStringValue(Model.JoinMan) + "' ");
            return(strSql.ToString());
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 查询总数
        /// </summary>
        /// <param name="km_ProcinceName"></param>
        /// <param name="km_CItyName"></param>
        /// <param name="km_Name"></param>
        /// <returns></returns>
        public DataTable GetNum(string km_ProcinceName, string km_Name, string PageIndex, string PageNum, string PlatForm, string Danger)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("SELECT COUNT(*) AS num FROM YX_KeyManager WHERE 1=1");
            if (km_ProcinceName != "")
            {
                sb.Append(" AND KM_ProvinceName='" + ValueHandler.GetStringValue(km_ProcinceName) + "'");
            }
            //if (km_CItyName != "")
            //    sb.Append(" AND KM_CItyName ='" + ValueHandler.GetStringValue(km_CItyName) + "'");
            if (km_Name != "")
            {
                sb.Append(" AND KM_Name LIKE '%" + ValueHandler.GetStringValue(km_Name) + "%'");
            }
            if (PlatForm != "")
            {
                sb.Append(" AND KM_PlatForm = '" + ValueHandler.GetIntNumberValue(PlatForm) + "'");
            }
            if (Danger != "")
            {
                sb.Append(" AND KM_DangerousDegree =" + Danger);
            }

            return(SearchData(sb.ToString()));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="km_ProcinceName">省</param>
        /// <param name="km_CItyName">市</param>
        /// <param name="km_Name">关键字</param>
        /// <param name="PageIndex">页数</param>
        /// <param name="PageNum">条数</param>
        /// <returns></returns>
        public DataTable SearchWord(string km_ProcinceName, string km_Name, string PageIndex, string PageNum, string PlatForm, string Danger)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("SELECT TOP(" + ValueHandler.GetIntNumberValue(PageNum) + ")* FROM(SELECT *,ROW_NUMBER() OVER (ORDER BY JoinDate DESC) AS 'Num' FROM YX_KeyManager WHERE 1=1");
            if (km_ProcinceName != "")
            {
                sb.Append(" AND KM_ProvinceName='" + ValueHandler.GetStringValue(km_ProcinceName) + "'");
            }
            //if (km_CityName != "")
            //    sb.Append(" AND KM_CityName ='"+ValueHandler.GetStringValue(km_CityName)+"'");
            if (km_Name != "")
            {
                sb.Append(" AND KM_Name LIKE '%" + ValueHandler.GetStringValue(km_Name) + "%'");
            }
            if (PlatForm != "")
            {
                sb.Append(" AND KM_PlatForm = '" + ValueHandler.GetIntNumberValue(PlatForm) + "'");
            }
            if (Danger != "")
            {
                sb.Append(" AND KM_DangerousDegree =" + Danger);
            }

            sb.AppendFormat(") T WHERE T.Num >(0+({0}-1)*{1}) order by Num asc", ValueHandler.GetIntNumberValue(PageIndex), ValueHandler.GetIntNumberValue(PageNum));
            return(SearchData(sb.ToString()));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 获取号段信息数量
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public string GetNoMangerCount(object obj)
        {
            ArrayList arr = JSON.getPara(obj);

            return(dAL_NoManager.GetNoMangerCount(ValueHandler.GetStringValue(arr[0]), ValueHandler.GetStringValue(arr[1]),
                                                  ValueHandler.GetStringValue(arr[2]), ValueHandler.GetStringValue(arr[3]),
                                                  ValueHandler.GetIntNumberValue(arr[4]), ValueHandler.GetIntNumberValue(arr[5])));
        }
Ejemplo n.º 7
0
        public string SaveWord(object obj)
        {
            ArrayList arr    = JSON.getPara(obj);
            bool      result = dAL_KeyWordDts.SaveWord(ValueHandler.GetStringValue(arr[0]), ValueHandler.GetStringValue(arr[1]), ValueHandler.GetStringValue(arr[2]),
                                                       ValueHandler.GetIntNumberValue(arr[3]), BLL_User.User_Name);

            return(result.ToString());
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 得到数据
        /// </summary>
        public string GetCXT_Customer(CXT_Customer Model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("Cust_Name = '" + ValueHandler.GetStringValue(Model.Cust_Name) + "', ");

            strSql.Append("Cust_OldName = '" + ValueHandler.GetStringValue(Model.Cust_OldName) + "', ");

            strSql.Append("Cust_NameKey = '" + ValueHandler.GetStringValue(Model.Cust_NameKey) + "', ");

            strSql.Append("Cust_Phone = '" + ValueHandler.GetStringValue(Model.Cust_Phone) + "', ");

            strSql.Append("Cust_Linkman = '" + ValueHandler.GetStringValue(Model.Cust_Linkman) + "', ");

            strSql.Append("Cust_LinkPhone = '" + ValueHandler.GetStringValue(Model.Cust_LinkPhone) + "', ");

            strSql.Append("Cust_ProvinceCode = '" + ValueHandler.GetStringValue(Model.Cust_ProvinceCode) + "', ");

            strSql.Append("Cust_ProvinceName = '" + ValueHandler.GetStringValue(Model.Cust_ProvinceName) + "', ");

            strSql.Append("Cust_CityCode = '" + ValueHandler.GetStringValue(Model.Cust_CityCode) + "', ");

            strSql.Append("Cust_CityName = '" + ValueHandler.GetStringValue(Model.Cust_CityName) + "', ");

            strSql.Append("Cust_CountyCode = '" + ValueHandler.GetStringValue(Model.Cust_CountyCode) + "', ");

            strSql.Append("Cust_CountyName = '" + ValueHandler.GetStringValue(Model.Cust_CountyName) + "', ");

            strSql.Append("Cust_Address = '" + ValueHandler.GetStringValue(Model.Cust_Address) + "', ");

            strSql.Append("Cust_IsBill = '" + ValueHandler.GetStringValue(Model.Cust_IsBill) + "', ");

            strSql.Append("Cust_BillMoney = " + ValueHandler.GetIntNumberValue(Model.Cust_BillMoney) + ", ");

            strSql.Append("Cust_BillNumber = '" + ValueHandler.GetStringValue(Model.Cust_BillNumber) + "', ");

            strSql.Append("Cust_Nature = '" + ValueHandler.GetStringValue(Model.Cust_Nature) + "', ");

            strSql.Append("Cust_KFVoice = '" + ValueHandler.GetStringValue(Model.Cust_KFVoice) + "', ");

            strSql.Append("Cust_Source = '" + ValueHandler.GetStringValue(Model.Cust_Source) + "', ");

            strSql.Append("Cust_OpenDate = " + ValueHandler.GetMarkStringDateValue(Model.Cust_OpenDate) + ", ");

            strSql.Append("Cust_WH_Remark = '" + ValueHandler.GetStringValue(Model.Cust_WH_Remark) + "', ");

            strSql.Append("Cust_WH_UserName = '******', ");

            strSql.Append("Cust_State = '" + ValueHandler.GetStringValue(Model.Cust_State) + "', ");

            string NowTime = DateTime.Now.ToString();

            strSql.Append("Cust_OperateTime = '" + NowTime + "', ");

            strSql.Append("Cust_IsView = " + ValueHandler.GetIntNumberValue(Model.Cust_IsView) + "");

            return(strSql.ToString());
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 获取资讯信息
        /// </summary>
        /// <param name="Pub_LS_Code1">移动端Code</param>
        /// <param name="Pub_LS_Code2">平台名称Code</param>
        /// <param name="Pub_LS_Code3">信息大类Code</param>
        /// <param name="Pub_Title">标题</param>
        /// <param name="Pub_Code">Code</param>
        /// <param name="Pub_LS_Code4">4级节点(信息小类)</param>
        /// <param name="Pub_SA_Code1">省</param>
        /// <param name="Pub_SA_Code2">市</param>
        /// <param name="Pub_SA_Code3">区</param>
        /// <param name="BeginTime">开始时间</param>
        /// <param name="EndTime">结束时间</param>
        /// <param name="PageIndex">当前页码</param>
        /// <param name="PageNum">每页显示数据量</param>
        /// <returns>资讯信息DataTable</returns>
        public DataTable GetPublicInfo(string Pub_LS_Code1, string Pub_LS_Code2, string Pub_LS_Code3, string Pub_Title, string Pub_Code, string Pub_LS_Code4, string Pub_SA_Code1, string Pub_SA_Code2, string Pub_SA_Code3, string BeginTime, string EndTime, string PageIndex, string PageNum)
        {
            StringBuilder sql = new StringBuilder();

            if (ValueHandler.GetStringValue(Pub_Code) != "")
            {
                sql.AppendFormat("SELECT Pub_Code,Pub_LS_Code1,Pub_LS_Code2,Pub_LS_Code3,Pub_LS_Code4,Pub_Title,Pub_ArticleSource,Pub_Pic,Pub_DisplayMode,Pub_Content  FROM dbo.XXSD_PublicInfo WHERE Pub_Code='{0}'", Pub_Code);
            }
            else
            {
                sql.AppendFormat("SELECT TOP {0} Pub_Code,Pub_Title,LS_Name1,LS_Name2,Pub_KeyWords,JoinDate,JoinMan FROM(", ValueHandler.GetIntNumberValue(PageNum));
                sql.Append("SELECT P.Pub_Code,P.Pub_Title,L1.LS_Name AS 'LS_Name1',L2.LS_Name AS 'LS_Name2',P.Pub_KeyWords,P.JoinDate,P.JoinMan,ROW_NUMBER() OVER (ORDER BY P.JoinDate DESC) AS 'Num' FROM XXSD_PublicInfo P LEFT JOIN XXSD_LevelSet L1 ON P.Pub_LS_Code3=L1.LS_Code LEFT JOIN XXSD_LevelSet L2 ON P.Pub_LS_Code4=L2.LS_Code WHERE 1=1");
                if (ValueHandler.GetStringValue(Pub_LS_Code1) != "")
                {
                    sql.AppendFormat(" AND P.Pub_LS_Code1 = '{0}'", ValueHandler.GetStringValue(Pub_LS_Code1));
                }
                if (ValueHandler.GetStringValue(Pub_LS_Code2) != "")
                {
                    sql.AppendFormat(" AND P.Pub_LS_Code2 = '{0}'", ValueHandler.GetStringValue(Pub_LS_Code2));
                }
                if (ValueHandler.GetStringValue(Pub_LS_Code3) != "")
                {
                    sql.AppendFormat(" AND P.Pub_LS_Code3 = '{0}'", ValueHandler.GetStringValue(Pub_LS_Code3));
                }
                if (ValueHandler.GetStringValue(Pub_LS_Code4) != "")
                {
                    sql.AppendFormat(" AND P.Pub_LS_Code4 = '{0}'", ValueHandler.GetStringValue(Pub_LS_Code4));
                }
                if (ValueHandler.GetStringValue(Pub_SA_Code1) != "")
                {
                    sql.AppendFormat(" AND P.Pub_SA_Code1 = '{0}'", ValueHandler.GetStringValue(Pub_SA_Code1));
                }
                if (ValueHandler.GetStringValue(Pub_SA_Code2) != "")
                {
                    sql.AppendFormat(" AND P.Pub_SA_Code2 = '{0}'", ValueHandler.GetStringValue(Pub_SA_Code2));
                }
                if (ValueHandler.GetStringValue(Pub_SA_Code3) != "")
                {
                    sql.AppendFormat(" AND P.Pub_SA_Code3 = '{0}'", ValueHandler.GetStringValue(Pub_SA_Code3));
                }
                if (ValueHandler.GetStringValue(Pub_Title) != "")
                {
                    sql.AppendFormat(" AND P.Pub_Title LIKE '%{0}%'", ValueHandler.GetStringValue(Pub_Title));
                }
                if (ValueHandler.GetMarkStringDateValue(BeginTime) != "" && ValueHandler.GetMarkStringDateValue(BeginTime) != "null" && ValueHandler.GetMarkStringDateValue(BeginTime) != null)
                {
                    sql.AppendFormat(" AND P.JoinDate >= '{0}'", ValueHandler.GetStringValue(BeginTime));
                }
                if (ValueHandler.GetMarkStringDateValue(EndTime) != "" && ValueHandler.GetMarkStringDateValue(EndTime) != "null" && ValueHandler.GetMarkStringDateValue(EndTime) != null)
                {
                    sql.AppendFormat(" AND P.JoinDate <= '{0}'", ValueHandler.GetStringValue(EndTime));
                }
                sql.AppendFormat(") T WHERE T.Num >(0+({0}-1)*{1})", ValueHandler.GetIntNumberValue(PageIndex), ValueHandler.GetIntNumberValue(PageNum));
            }
            return(SearchData(sql.ToString()));
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 获取号段信息
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public string GetNoMangerInfo(object obj)
        {
            ArrayList arr = JSON.getPara(obj);
            DataTable dt  = dAL_NoManager.GetNoMangerInfo(ValueHandler.GetStringValue(arr[0]), ValueHandler.GetStringValue(arr[1]),
                                                          ValueHandler.GetStringValue(arr[2]), ValueHandler.GetStringValue(arr[3]),
                                                          ValueHandler.GetIntNumberValue(arr[4]), ValueHandler.GetIntNumberValue(arr[5]));
            string json = JSON.DataTableToArrayList(dt);

            return(json);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// 根据姓名查询
        /// </summary>
        /// <param name="name"></param>
        /// <param name="indexNum"></param>
        /// <param name="page"></param>
        /// <returns></returns>
        public DataTable GetUser(string name, string PageIndex, string PageNum, string place)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("SELECT TOP(" + ValueHandler.GetIntNumberValue(PageNum) + ")* FROM(SELECT *,ROW_NUMBER() OVER (ORDER BY JoinDate DESC) AS 'Num' FROM AF_User WHERE 1=1");
            if (name != "")
            {
                sb.Append(" AND User_Name like '%" + ValueHandler.GetStringValue(name) + "%'");
            }
            if (place != "" && place != "全部")
            {
                sb.Append(" AND User_Place like '%" + ValueHandler.GetStringValue(place) + "%'");
            }
            sb.AppendFormat(") T WHERE T.Num >(0+({0}-1)*{1})", ValueHandler.GetIntNumberValue(PageIndex), ValueHandler.GetIntNumberValue(PageNum));
            return(SearchData(sb.ToString()));
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 保存用户
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public string SaveUser(object obj)
        {
            ArrayList arr = JSON.getPara(obj);

            aF_User.User_Code      = ValueHandler.GetStringValue(arr[0]);
            aF_User.User_LoginName = ValueHandler.GetStringValue(arr[1]);
            aF_User.User_Password  = Security.EncryptDES(arr[2].ToString());
            aF_User.User_Name      = ValueHandler.GetStringValue(arr[3]);
            aF_User.User_Sex       = ValueHandler.GetStringValue(arr[4]);
            aF_User.User_Age       = ValueHandler.GetIntNumberValue(arr[5]);
            aF_User.User_Phone     = ValueHandler.GetStringValue(arr[6]);
            aF_User.User_Post      = ValueHandler.GetStringValue(arr[7]);
            aF_User.User_EntryDate = ValueHandler.GetStringValue(arr[8]);
            aF_User.User_Place     = ValueHandler.GetStringValue(arr[9]);
            aF_User.JoinMan        = BLL_User.User_Name;
            return(dAL_UserSetDts.SaveUser(aF_User));
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 修改状态
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public string ModState(object obj)
        {
            ArrayList arr  = JSON.getPara(obj);
            bool      flag = dAL_CustomerReturnsDts.ModState(ValueHandler.GetStringValue(arr[0]), ValueHandler.GetStringValue(arr[1]), ValueHandler.GetStringValue(arr[2]), ValueHandler.GetStringValue(arr[3]), ValueHandler.GetIntNumberValue(arr[4]), ValueHandler.GetStringValue(arr[5]),
                                                             ValueHandler.GetStringValue(arr[6]), ValueHandler.GetStringValue(arr[7]), ValueHandler.GetStringValue(arr[8]), ValueHandler.GetStringValue(arr[9]), ValueHandler.GetStringValue(arr[10]), ValueHandler.GetStringValue(arr[11]), BLL_User.User_Name, arr[12].ToString(), BLL_User.User_Code);

            if (flag)
            {
                return("true");
            }
            return("false");
        }
Ejemplo n.º 14
0
        /// <summary>
        /// 修改状态
        /// </summary>
        /// <param name="code"></param>
        /// <param name="cust_UnOrder"></param>
        /// <param name="cust_OutDate"></param>
        /// <param name="cust_OutMoney"></param>
        /// <param name="cust_ReturnMan"></param>
        /// <param name="cust_IsLessMoney"></param>
        /// <param name="cust_TSNatrue"></param>
        /// <param name="cust_TSSource"></param>
        /// <param name="cust_KF_Remark"></param>
        /// <param name="kfname"></param>
        /// <returns></returns>
        public bool ModState(string code, string cust_State, string cust_UnOrder, string cust_OutDate, int cust_OutMoney, string cust_ReturnMan, string cust_IsLessMoney, string cust_TSNatrue, string cust_TSSource, string cust_KF_Remark, string cust_IsKeep, string cust_TSPhone, string kfname, string isBlack, string userCode)
        {
            StringBuilder sb = new StringBuilder();

            bool flag = false, stateFlag = true;

            using (TransactionScope scope = new TransactionScope())
            {
                string    now           = DateTime.Now.ToString();
                DataTable dt            = SearchData($"SELECT c.Cust_State FROM CXT_Customer c WHERE Cust_Code = '{code}'");
                string    tempCustState = dt.Rows[0][0].ToString();
                if (tempCustState != cust_State)
                {
                    //处理状态变更信息
                    stateFlag = UpdateData($@"INSERT INTO dbo.YX_CustStateHistory (CSH_Code,CSH_Remark,JoinMan,CSH_UserCode,CSH_Time)
                        SELECT '{code}','由{dt.Rows[0][0]}改成{cust_State}','{kfname}','{userCode}','{now}'");
                }
                if (cust_UnOrder == "")
                {
                    sb.Append("UPDATE CXT_Customer SET Cust_UnOrder=null,");
                }
                else
                {
                    sb.Append("UPDATE CXT_Customer SET Cust_UnOrder='" + cust_UnOrder + "',");
                }

                sb.Append("Cust_State ='" + ValueHandler.GetStringValue(cust_State) + "',");
                if (cust_OutDate == "")
                {
                    sb.Append("Cust_OutDate =null,");
                }
                else
                {
                    sb.Append("Cust_OutDate ='" + cust_OutDate + "',");
                }

                sb.Append("Cust_OutMoney ='" + ValueHandler.GetIntNumberValue(cust_OutMoney) + "',");
                sb.Append("Cust_ReturnMan ='" + ValueHandler.GetStringValue(cust_ReturnMan) + "',");
                sb.Append("Cust_IsLessMoney ='" + ValueHandler.GetStringValue(cust_IsLessMoney) + "',");
                sb.Append("Cust_TSNatrue ='" + ValueHandler.GetStringValue(cust_TSNatrue) + "',");
                sb.Append("Cust_TSSource ='" + ValueHandler.GetStringValue(cust_TSSource) + "',");
                sb.Append("Cust_TSPhone ='" + ValueHandler.GetStringValue(cust_TSPhone) + "',");
                sb.Append("Cust_KF_Remark ='" + ValueHandler.GetStringValue(cust_KF_Remark) + "',");
                sb.Append("Cust_IsKeep ='" + ValueHandler.GetStringValue(cust_IsKeep) + "',");
                sb.Append("Cust_KF_UserName ='******',");
                string tdr = cust_State == "已审" ? "" : ValueHandler.GetStringValue(kfname);
                sb.Append("Cust_DealPerson ='" + tdr + "',");
                sb.Append("Cust_OperateTime='" + now + "' ");
                sb.Append("WHERE Cust_Code='" + ValueHandler.GetStringValue(code) + "'");
                flag = UpdateData(sb.ToString());

                if (isBlack == "1")//插入黑名单
                {
                    DAL_BlackListDts dalBLack = new DAL_BlackListDts();

                    flag = dalBLack.PlInsertBlackPhone(cust_TSPhone, kfname, $"{DateTime.Now.ToString("yyyyMMdd")} {cust_TSNatrue}用户");
                }

                if (flag && stateFlag)
                {
                    scope.Complete();
                }
                else
                {
                    scope.Dispose();
                }
            }
            return(flag);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 新增、修改营销管理中心数据
        /// </summary>
        public string Update(CXT_Customer Model)
        {
            #region old
            //string msg = CheckExistLinkPhone(Model);
            //if (msg=="")
            //{
            //    StringBuilder strSql = new StringBuilder();

            //    strSql.Append("\r IF NOT EXISTS(SELECT * FROM CXT_Customer WHERE Cust_Code ='" + ValueHandler.GetStringValue(Model.Cust_Code) + "')");
            //    strSql.Append("\r BEGIN ");
            //    strSql.Append("\r INSERT INTO CXT_Customer(");
            //    strSql.Append("Cust_Code,Cust_Name,Cust_OldName,Cust_NameKey,Cust_Phone,Cust_Linkman,Cust_LinkPhone,Cust_ProvinceCode,Cust_ProvinceName,Cust_CityCode,Cust_CityName,Cust_CountyCode,Cust_CountyName,Cust_Address,Cust_IsBill,Cust_BillMoney,Cust_BillNumber,Cust_Nature,Cust_KFVoice,Cust_Source,Cust_OpenDate,Cust_WH_Remark,Cust_WH_UserName,Cust_State,Cust_OperateTime,Cust_IsView ");
            //    strSql.Append(") SELECT ");
            //    strSql.Append(" Cust_Code = '" + GetCode() + "', ");
            //    strSql.Append(GetCXT_Customer(Model));
            //    strSql.Append("\r END");
            //    strSql.Append("\r ELSE");
            //    strSql.Append("\r BEGIN ");
            //    strSql.Append("UPDATE CXT_Customer SET ");
            //    strSql.Append(GetCXT_Customer(Model));
            //    strSql.Append(" WHERE Cust_Code ='" + ValueHandler.GetStringValue(Model.Cust_Code) + "'");
            //    strSql.Append("\r END");

            //    if (strSql.Length > 0)
            //    {
            //        return UpdateData(strSql.ToString()).ToString().ToLower();
            //    }
            //    else
            //    {
            //        throw new Exception("无数据操作!");
            //    }
            //}
            //else
            //{
            //    return msg;
            //}
            #endregion

            string        msg    = "";
            StringBuilder strSql = new StringBuilder();
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_Code) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_Name) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_OldName) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_NameKey) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_Phone) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_Linkman) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_LinkPhone) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_ProvinceCode) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_ProvinceName) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_CityCode) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_CityName) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_CountyCode) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_CountyName) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_Address) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_IsBill) + "', ");
            strSql.Append("'" + ValueHandler.GetIntNumberValue(Model.Cust_BillMoney) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_BillNumber) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_Nature) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_KFVoice) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_Source) + "', ");
            strSql.Append("'" + ValueHandler.GetMarkStringDateValue(Model.Cust_OpenDate) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_WH_Remark) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_WH_UserName) + "', ");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_State) + "', ");
            strSql.Append("'" + ValueHandler.GetIntNumberValue(Model.Cust_IsView) + "',");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.JoinMan) + "',");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.fromPage) + "',");
            strSql.Append("'" + ValueHandler.GetIntNumberValue(Model.platForm) + "',");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.isCheck) + "',");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_BelongProvinceCode) + "',");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_BelongProvinceName) + "',");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_BelongCityCode) + "',");
            strSql.Append("'" + ValueHandler.GetStringValue(Model.Cust_BelongCityName) + "'");

            string sql = string.Format(@"exec [dbo].[SP_CustomerMaitain] {0}", strSql);
            try {
                DataTable dt = SearchData(sql);
                msg = dt.Rows[0][0].ToString();
            }
            catch (Exception ex) {
                msg = ex.Message;
            }
            return(msg);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// 获取修改记录
        /// </summary>
        /// <param name="obj"></param>
        public string GetBillHistoryInfo(object obj)
        {
            ArrayList arr  = JSON.getPara(obj);
            DataTable dt   = dAL_BillHistory.GetBillHistoryInfo(ValueHandler.GetStringValue(arr[0]), ValueHandler.GetIntNumberValue(arr[1]), ValueHandler.GetIntNumberValue(arr[2]));
            string    json = JSON.DataTableToArrayList(dt);

            return(json);
        }