예제 #1
0
        /// <summary> ��ȡ��֤��ʽxml�ַ���
        /// ��ȡ��֤��ʽxml�ַ���
        /// </summary>
        /// <param name="DeleteUserAccountRecords"></param>
        /// <returns></returns>
        public static string GenerateXmlForAuthenRecords(AuthenRecord[] AuthenRecords)
        {
            string Result = "";

            XmlDocument xmldoc;
            XmlNode xmlnode;
            XmlElement xmlelem;
            XmlElement xmlelem2;
            XmlElement xmlelem3;
            XmlText xmltext;
            try
            {
                xmldoc = new XmlDocument();
                //����XML����������
                xmlnode = xmldoc.CreateNode(XmlNodeType.XmlDeclaration, "", "");
                xmldoc.AppendChild(xmlnode);
                //����һ����Ԫ��
                xmlelem = xmldoc.CreateElement("", "ROOT", "");
                xmldoc.AppendChild(xmlelem);

                for (int i = 0; i < AuthenRecords.Length; i++)
                {
                    //��������һ��Ԫ��
                    xmlelem2 = xmldoc.CreateElement("AuthenRecord");
                    xmlelem2 = xmldoc.CreateElement("", "AuthenRecord", "");

                    xmlelem3 = xmldoc.CreateElement("", "AuthenType", "");
                    xmltext = xmldoc.CreateTextNode(AuthenRecords[i].AuthenType.ToString());
                    xmlelem3.AppendChild(xmltext);
                    xmlelem2.AppendChild(xmlelem3);

                    xmlelem3 = xmldoc.CreateElement("", "AuthenName", "");
                    xmltext = xmldoc.CreateTextNode(AuthenRecords[i].AuthenName.ToString());
                    xmlelem3.AppendChild(xmltext);
                    xmlelem2.AppendChild(xmlelem3);

                    xmldoc.ChildNodes.Item(1).AppendChild(xmlelem2);
                }
                //���洴���õ�XML�ĵ�

                // xmldoc.Save(@".\DeleteUserAccountRecord.xml");
                Result = xmldoc.OuterXml;

            }
            catch
            { }

            return Result;
        }
예제 #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);
        }
예제 #3
0
        /// <summary>
        /// �������ظ�UAϵͳ�Ŀɽ��ܵ��ʺ��б����
        /// </summary>
        /// <param name="XmlInfo">���ص��ʺ��б��XML��</param>
        /// <returns></returns>
        public static AuthenRecord[] GetAccountInfoFromXML(string XmlInfo)
        {
            string XMLValue = "";
            XmlNodeList nodeList = null;
            XmlNodeList nodeList1 = null;
            AuthenRecord[] ais = new AuthenRecord[0];
            try
            {
                XmlDocument xmlReader = new XmlDocument();
                xmlReader.LoadXml(XmlInfo);

                nodeList = xmlReader.GetElementsByTagName("AccountList");
                nodeList1 = nodeList[0].SelectNodes("AccountInfo");
                ais = new AuthenRecord[nodeList1.Count];
                for (int i = 0; i < nodeList1.Count; i++)
                {
                    AuthenRecord ai = new AuthenRecord();
                    ai.AuthenName = nodeList1[0].SelectNodes("AccountID")[0].InnerText == null ? "" : nodeList1[i].SelectNodes("AccountID")[0].InnerText;
                    ai.AuthenType = nodeList1[0].SelectNodes("AccountType")[0].InnerText == null ? "" : nodeList1[i].SelectNodes("AccountType")[0].InnerText;

                    try
                    {
                        ai.areaid = "";
                        XmlNodeList node3 = nodeList1[i].SelectNodes("PWDAttrList/PWDAttr");
                        for (int r = 0; r < node3.Count; r++)
                        {
                            if (node3[r].SelectNodes("AttrName")[0].InnerText == "CityCode")
                            {
                                ai.areaid = node3[r].SelectNodes("AttrValue")[0].InnerText == null ? "" : node3[r].SelectNodes("AttrValue")[0].InnerText;
                            }
                        }
                    }
                    catch
                    {
                        ai.areaid = "";
                    }

                    ai.ExtendField = "";
                    switch (ai.AuthenType)
                    {
                        //case "2000001":
                        //    ai.AuthenType = "9";
                        //    break;
                        //case "2000002":
                        //    ai.AuthenType = "11";
                        //    break;
                        //case "2000003":
                        //    ai.AuthenType = "10";
                        //    break;
                        //case "2000004":
                        //    ai.AuthenType = "7";
                        //    break;
                        case "0000000":
                            ai.AuthenType = "0";
                            break;
                        default:
                            ai.AuthenType = "-1";
                            break;
                    }

                    ais[i] = ai;
                }
            }
            catch (Exception)
            { ais = new AuthenRecord[0]; }

            return ais;
        }
예제 #4
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);
        }
예제 #5
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);
        }
예제 #6
0
파일: BTForCrm.cs 프로젝트: noikiy/lihongtu
        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;
        }
예제 #7
0
파일: BTForCrm.cs 프로젝트: noikiy/lihongtu
        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;
        }
예제 #8
0
파일: BTForCrm.cs 프로젝트: noikiy/lihongtu
        /// <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;
        }