Exemple #1
0
        public static int CustInfoUpload(string SysID, string ID, string UserType, string UserAccount, string CustLevel,
                                         string RealName, string ContactTel, string Address, string ZipCode, string CertificateCode,
                                         string CertificateType, string AreaID, string Sex, string Email, string dealType, string ExtendField, AuthenRecord[] AuthenRecords, string spid, out string CustID, out string ErrMsg)
        {
            int result = ErrorDefinition.IError_Result_UnknowError_Code;

            ErrMsg = "";
            CustID = "";
            try
            {
                SqlCommand cmd = new SqlCommand();
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "dbo.up_BT_OV3_Interface_CustInfoUpload";

                SqlParameter parSysID = new SqlParameter("@SysID", SqlDbType.VarChar, 8);
                parSysID.Value = SysID + "999999";
                cmd.Parameters.Add(parSysID);

                SqlParameter parID = new SqlParameter("@ID", SqlDbType.VarChar, 30);
                parID.Value = ID;
                cmd.Parameters.Add(parID);

                SqlParameter parUserType = new SqlParameter("@UserType", SqlDbType.VarChar, 2);
                parUserType.Value = UserType;
                cmd.Parameters.Add(parUserType);


                SqlParameter parUserAccount = new SqlParameter("@UserAccount", SqlDbType.VarChar, 16);
                parUserAccount.Value = (UserAccount == null ? "" : UserAccount);
                cmd.Parameters.Add(parUserAccount);

                SqlParameter parCustLevel = new SqlParameter("@CustLevel", SqlDbType.VarChar, 1);
                parCustLevel.Value = CustLevel;
                cmd.Parameters.Add(parCustLevel);

                SqlParameter parRealName = new SqlParameter("@RealName", SqlDbType.VarChar, 20);
                parRealName.Value = (RealName == null ? "" : RealName);
                cmd.Parameters.Add(parRealName);

                //        string ContactTel, string Address, string ZipCode, string CertificateCode,
                //string CertificateType, string AreaID, string Sex, string Email, string dealType, string ExtendField,


                SqlParameter parContactTel = new SqlParameter("@ContactTel", SqlDbType.VarChar, 20);
                parContactTel.Value = (ContactTel == null ? "" : ContactTel);
                cmd.Parameters.Add(parContactTel);


                SqlParameter parAddress = new SqlParameter("@Address", SqlDbType.VarChar, 200);
                parAddress.Value = (Address == null ? "" : Address);
                cmd.Parameters.Add(parAddress);


                SqlParameter parZipCode = new SqlParameter("@ZipCode", SqlDbType.VarChar, 6);
                parZipCode.Value = (ZipCode == null ? "" : ZipCode);
                cmd.Parameters.Add(parZipCode);

                //string CertificateCode,
                //string CertificateType, string AreaID, string Sex, string Email, string dealType, string ExtendField,

                SqlParameter parCertificateCode = new SqlParameter("@CertificateCode", SqlDbType.VarChar, 20);
                parCertificateCode.Value = (CertificateCode == null ? "" : CertificateCode);
                cmd.Parameters.Add(parCertificateCode);

                SqlParameter parCertificateType = new SqlParameter("@CertificateType", SqlDbType.VarChar, 2);
                parCertificateType.Value = CertificateType;
                cmd.Parameters.Add(parCertificateType);

                SqlParameter parAreaID = new SqlParameter("@AreaID", SqlDbType.VarChar, 3);
                parAreaID.Value = AreaID;
                cmd.Parameters.Add(parAreaID);


                SqlParameter parSex = new SqlParameter("@Sex", SqlDbType.VarChar, 1);
                parSex.Value = Sex;
                cmd.Parameters.Add(parSex);


                SqlParameter parEmail = new SqlParameter("@Email", SqlDbType.VarChar, 50);
                parEmail.Value = (Email == null ? "" : Email);
                cmd.Parameters.Add(parEmail);

                SqlParameter pardealType = new SqlParameter("@dealType", SqlDbType.VarChar, 1);
                pardealType.Value = dealType;
                cmd.Parameters.Add(pardealType);

                SqlParameter   parAuthenRecords = new SqlParameter("@AuthenRecords", SqlDbType.Text);
                AuthenRecord[] au = new AuthenRecord[0];
                parAuthenRecords.Value = BTBizRules.GenerateXmlForAuthenRecords(AuthenRecords == null ? au : AuthenRecords);
                cmd.Parameters.Add(parAuthenRecords);

                SqlParameter parSPID = new SqlParameter("@SPID", SqlDbType.VarChar, 8);
                parSPID.Value = spid;
                cmd.Parameters.Add(parSPID);

                SqlParameter parResult = new SqlParameter("@Result ", SqlDbType.Int);
                parResult.Direction = ParameterDirection.Output;
                cmd.Parameters.Add(parResult);

                SqlParameter parCustID = new SqlParameter("@CustID ", SqlDbType.VarChar, 16);
                parCustID.Direction = ParameterDirection.Output;
                cmd.Parameters.Add(parCustID);

                SqlParameter parErrMsg = new SqlParameter("@ErrMsg ", SqlDbType.VarChar, 256);
                parErrMsg.Direction = ParameterDirection.Output;
                cmd.Parameters.Add(parErrMsg);

                DBUtility.Execute(cmd, DBUtility.BestToneCenterConStr);

                result = int.Parse(parResult.Value.ToString());
                ErrMsg = parErrMsg.Value.ToString();
                CustID = parCustID.Value.ToString();
            }
            catch (Exception e)
            {
                result = ErrorDefinition.IError_Result_System_UnknowError_Code;
                ErrMsg = ErrorDefinition.IError_Result_System_UnknowError_Msg + e.Message;
            }

            return(result);
        }
Exemple #2
0
        /// <summary>
        /// 修改认证信息
        /// </summary>
        /// <param name="OriginalID"></param>
        /// <param name="NewID"></param>
        /// <param name="DealType"></param>
        /// <param name="AuthenRecords"></param>
        /// <returns></returns>
        public static int ChangeUserAuthenStyle(string ProvinceID, string OriginalID, string NewID,
                                                string DealType, AuthenRecord[] AuthenRecords, string SPID, out string NewCustID, out string OriginalCustID, out string ErrorDescription)
        {
            int Result = ErrorDefinition.IError_Result_UnknowError_Code;

            ErrorDescription = "";
            NewCustID        = "";
            OriginalCustID   = "";

            try
            {
                SqlCommand cmd = new SqlCommand();
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "dbo.up_BT_OV3_Interface_ChangeUserAuthenStyleCRM";


                SqlParameter parProvinceID = new SqlParameter("@ProvinceID", SqlDbType.VarChar, 2);
                parProvinceID.Value = ProvinceID;
                cmd.Parameters.Add(parProvinceID);

                SqlParameter parOriginalID = new SqlParameter("@OriginalID", SqlDbType.VarChar, 30);
                parOriginalID.Value = OriginalID;
                cmd.Parameters.Add(parOriginalID);

                SqlParameter parNewID = new SqlParameter("@NewID", SqlDbType.VarChar, 30);
                parNewID.Value = NewID;
                cmd.Parameters.Add(parNewID);


                SqlParameter parDealType = new SqlParameter("@DealType", SqlDbType.VarChar, 1);
                parDealType.Value = DealType;
                cmd.Parameters.Add(parDealType);


                SqlParameter   parAuthenRecords = new SqlParameter("@AuthenRecords", SqlDbType.Text);
                AuthenRecord[] au = new AuthenRecord[0];
                parAuthenRecords.Value = BTBizRules.GenerateXmlForAuthenRecords(AuthenRecords == null ? au : AuthenRecords);
                cmd.Parameters.Add(parAuthenRecords);


                SqlParameter parSPID = new SqlParameter("@SPID", SqlDbType.VarChar, 8);
                parSPID.Value = SPID;
                cmd.Parameters.Add(parSPID);


                SqlParameter parResult = new SqlParameter("@Result", SqlDbType.Int);
                parResult.Direction = ParameterDirection.Output;
                cmd.Parameters.Add(parResult);

                SqlParameter parErrorDescription = new SqlParameter("@ErrorDescription", SqlDbType.VarChar, 256);
                parErrorDescription.Direction = ParameterDirection.Output;
                cmd.Parameters.Add(parErrorDescription);

                SqlParameter parNewCustID = new SqlParameter("@NewCustID", SqlDbType.VarChar, 16);
                parNewCustID.Direction = ParameterDirection.Output;
                cmd.Parameters.Add(parNewCustID);

                SqlParameter parOriginalCustID = new SqlParameter("@OriginalCustID", SqlDbType.VarChar, 16);
                parOriginalCustID.Direction = ParameterDirection.Output;
                cmd.Parameters.Add(parOriginalCustID);

                DBUtility.Execute(cmd, DBUtility.BestToneCenterConStr);

                Result           = int.Parse(parResult.Value.ToString());
                ErrorDescription = parErrorDescription.Value.ToString();


                OriginalCustID = parOriginalCustID.Value.ToString();
                NewCustID      = parNewCustID.Value.ToString();
            }
            catch (Exception ex)
            {
                Result           = ErrorDefinition.IError_Result_System_UnknowError_Code;
                ErrorDescription = ex.Message;
            }

            return(Result);
        }
Exemple #3
0
        public static int UserAuthenStyleUpload(string ProvinceID, string ID, string AreaID, string ExtendField, AuthenRecord[] AuthenRecords, string SPID, out string CustID, out string ErrMsg)
        {
            int result = ErrorDefinition.IError_Result_UnknowError_Code;

            ErrMsg = "";
            CustID = "";
            try
            {
                SqlCommand cmd = new SqlCommand();
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "dbo.up_BT_OV3_Interface_UserAuthenStyleUpload";

                SqlParameter parProvinceID = new SqlParameter("@ProvinceID", SqlDbType.VarChar, 2);
                parProvinceID.Value = ProvinceID;
                cmd.Parameters.Add(parProvinceID);

                SqlParameter parID = new SqlParameter("@ID", SqlDbType.VarChar, 30);
                parID.Value = ID;
                cmd.Parameters.Add(parID);


                SqlParameter parAreaID = new SqlParameter("@AreaID", SqlDbType.VarChar, 3);
                parAreaID.Value = AreaID;
                cmd.Parameters.Add(parAreaID);


                SqlParameter   parAuthenRecords = new SqlParameter("@AuthenRecords", SqlDbType.Text);
                AuthenRecord[] au = new AuthenRecord[0];
                parAuthenRecords.Value = BTBizRules.GenerateXmlForAuthenRecords(AuthenRecords == null ? au : AuthenRecords);
                cmd.Parameters.Add(parAuthenRecords);

                SqlParameter parSPID = new SqlParameter("@SPID", SqlDbType.VarChar, 8);
                parSPID.Value = SPID;
                cmd.Parameters.Add(parSPID);

                SqlParameter parResult = new SqlParameter("@Result ", SqlDbType.Int);
                parResult.Direction = ParameterDirection.Output;
                cmd.Parameters.Add(parResult);

                SqlParameter parCustID = new SqlParameter("@CustID ", SqlDbType.VarChar, 16);
                parCustID.Direction = ParameterDirection.Output;
                cmd.Parameters.Add(parCustID);

                SqlParameter parErrMsg = new SqlParameter("@ErrMsg ", SqlDbType.VarChar, 256);
                parErrMsg.Direction = ParameterDirection.Output;
                cmd.Parameters.Add(parErrMsg);

                DBUtility.Execute(cmd, DBUtility.BestToneCenterConStr);

                result = int.Parse(parResult.Value.ToString());
                ErrMsg = parErrMsg.Value.ToString();
                CustID = parCustID.Value.ToString();
            }
            catch (Exception e)
            {
                result = ErrorDefinition.IError_Result_System_UnknowError_Code;
                ErrMsg = ErrorDefinition.IError_Result_System_UnknowError_Msg + e.Message;
            }

            return(result);
        }