Beispiel #1
0
        public UserInfoClass(UserInfo UserDetailInfo)
        {
            this.userType = UserDetailInfo.UserType;
            this.userAccount = UserDetailInfo.UserAccount;
            this.password = UserDetailInfo.Password;
            this.custID = UserDetailInfo.CustID;
            this.uProvinceID = UserDetailInfo.UProvinceID;
            this.areaCode = UserDetailInfo.AreaCode;

            this.Status = UserDetailInfo.Status;
            this.RealName = UserDetailInfo.RealName;
            this.CertificateCode = UserDetailInfo.CertificateCode;
            this.CertificateType = UserDetailInfo.CertificateType;
            this.Birthday = UserDetailInfo.Birthday;
            this.Sex = UserDetailInfo.Sex;
            this.CustLevel = UserDetailInfo.CustLevel;
            this.EduLevel = UserDetailInfo.EduLevel;
            this.Favorite = UserDetailInfo.Favorite;
            this.IncomeLevel = UserDetailInfo.IncomeLevel;
            this.Email = UserDetailInfo.Email;
            this.PaymentAccountType = UserDetailInfo.PaymentAccountType;
            this.PaymentAccount = UserDetailInfo.PaymentAccount;
            this.PaymentAccountPassword = UserDetailInfo.PaymentAccountPassword;
            this.CustContactTel = UserDetailInfo.CustContactTel;
            this.IsPost = UserDetailInfo.IsPost;
            this.boundPhoneRecords = UserDetailInfo.BoundPhoneRecords;
            this.addressRecords = UserDetailInfo.AddressRecords;
            this.assessmentInfoRecords = UserDetailInfo.AssessmentInfos;
            this.extendField = UserDetailInfo.ExtendField;
            //this.userName = UserDetailInfo.UserName;
        }
Beispiel #2
0
        /// <summary>
        /// �ͻ���Ϣ��ѯ�ӿ�
        /// ���ߣ�����   ʱ�䣺2009-8-14
        /// </summary>
        /// <param name="ProvinceID"></param>
        /// <param name="SPID"></param>
        /// <param name="UserAccount"></param>
        /// <param name="CustID"></param>
        /// <param name="CertificateCode"></param>
        /// <param name="CertificateType"></param>
        /// <param name="PhoneNum"></param>
        /// <param name="ErrMsg"></param>
        /// <param name="UserDetailInfo"></param>
        /// <returns></returns>
        public static int UserInfoQueryV2(string ProvinceID, string SPID, string UserAccount, string CustID,
            string PhoneNum, string Password, out string ErrMsg, out UserInfo UserDetailInfo, out SubscriptionRecord[] SubscriptionRecords)
        {
            int Result = ErrorDefinition.BT_IError_Result_UnknowError_Code;
            ErrMsg = "";
            UserDetailInfo = null;
            SubscriptionRecords = null;

            SqlConnection myCon = null;
            SqlCommand cmd = new SqlCommand();
            try
            {
                myCon = new SqlConnection(DBUtility.BestToneCenterConStr);
                cmd.Connection = myCon;
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "up_Customer_OV3_Interface_UserInfoQuery_2";

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

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

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

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

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

                SqlParameter parPassword = new SqlParameter("@Password", SqlDbType.VarChar, 6);
                parPassword.Value = Password;
                cmd.Parameters.Add(parPassword);

                SqlParameter parEncryptedPassword = new SqlParameter("@EncryptedPassword", SqlDbType.VarChar, 50);
                parEncryptedPassword.Value = (CommonUtility.IsEmpty(Password) ? "" : CryptographyUtil.Encrypt(Password));
                cmd.Parameters.Add(parEncryptedPassword);

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

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

                UserDetailInfo = new UserInfo();

                //�����ĸ���
                DataSet ds = DBUtility.FillData(cmd, DBUtility.BestToneCenterConStr);

                Result = int.Parse(parResult.Value.ToString());
                ErrMsg = parErrMsg.Value.ToString();
                //����������������������֤�ɹ�
                if (Result != 0 || ErrMsg == "000")
                    return Result;

                if (ds == null)
                {
                    Result = ErrorDefinition.IError_Result_UserNotExist_Code;
                    ErrMsg = "���û���¼";
                    return Result;
                }

                string UserName = "";
                string MobilePhone = "";

                DataTable tb = new DataTable();
                tb = ds.Tables[0];
                if (tb != null)
                {
                    if (tb.Rows.Count > 0)
                    {
                        string UserType1 = tb.Rows[0]["CustType"].ToString().Trim();
                        #region �ж��Ƿ��������SPID

                        string OldSPID = ConfigurationManager.AppSettings["OldType_SPID"];

                        int SIP = OldSPID.IndexOf(SPID);

                        if (SIP >= 0)
                        {
                            // userType = "";
                            switch (UserType1)
                            {
                                case "14":
                                    UserType1 = "01";
                                    break;
                                case "20":
                                    UserType1 = "02";
                                    break;
                                case "12":
                                    UserType1 = "03";
                                    break;
                                case "90":
                                    UserType1 = "09";
                                    break;
                                case "30":
                                    UserType1 = "11";
                                    break;
                                case "42":
                                    UserType1 = "00";
                                    break;
                                default:
                                    UserType1 = "90";
                                    break;
                            }

                        }

                        #endregion
                        UserDetailInfo.UserType = UserType1;
                        UserDetailInfo.UserAccount = tb.Rows[0]["CardID"].ToString().Trim();
                        UserDetailInfo.Password = "";
                        UserDetailInfo.CustID = tb.Rows[0]["CustID"].ToString().Trim();
                        UserDetailInfo.UProvinceID = tb.Rows[0]["ProvinceID"].ToString().Trim();
                        UserDetailInfo.AreaCode = tb.Rows[0]["AreaID"].ToString().Trim();
                        UserDetailInfo.Status = tb.Rows[0]["Status"].ToString().Trim();
                        UserDetailInfo.RealName = tb.Rows[0]["RealName"].ToString().Trim();
                        //UserDetailInfo.UserName = tb.Rows[0]["UserName"].ToString().Trim();
                        UserName = tb.Rows[0]["UserName"].ToString().Trim();
                        UserDetailInfo.CertificateCode = tb.Rows[0]["CertificateCode"].ToString().Trim();
                        UserDetailInfo.CertificateType = tb.Rows[0]["CertificateType"].ToString().Trim();
                        if (!CommonUtility.IsEmpty(tb.Rows[0]["Birthday"].ToString()))
                        {
                            UserDetailInfo.Birthday = DateTime.Parse(tb.Rows[0]["Birthday"].ToString()).ToString("yyyy-MM-dd HH:mm:ss").Trim();
                        }
                        else
                        {
                            UserDetailInfo.Birthday = "";
                        }
                        UserDetailInfo.Sex = tb.Rows[0]["Sex"].ToString().Trim();
                        UserDetailInfo.CustLevel = tb.Rows[0]["CustLevel"].ToString().Trim();
                        UserDetailInfo.EduLevel = tb.Rows[0]["EduLevel"].ToString().Trim();
                        UserDetailInfo.Favorite = tb.Rows[0]["Favorite"].ToString().Trim();
                        UserDetailInfo.IncomeLevel = tb.Rows[0]["IncomeLevel"].ToString().Trim();
                        UserDetailInfo.Email = tb.Rows[0]["Email"].ToString().Trim();
                        UserDetailInfo.EnterpriseID = tb.Rows[0]["EnterpriseID"].ToString().Trim();
                        UserDetailInfo.PaymentAccountType = "";
                        UserDetailInfo.PaymentAccount = "";
                        UserDetailInfo.PaymentAccountPassword = "";//tb.Rows[0]["PaymentAccountPassword"].ToString().Trim();
                        UserDetailInfo.CustContactTel = tb.Rows[0]["Phone"].ToString().Trim();
                        UserDetailInfo.IsPost = "";

                        if (!tb.Rows[0]["PhoneClass"].ToString().Equals("1"))
                        {
                            MobilePhone = tb.Rows[0]["Phone"].ToString().Trim();
                        }
                    }
                }

                //�󶨵绰
                tb = ds.Tables[1];
                if (tb != null)
                {
                    if (tb.Rows.Count > 0)
                    {
                        UserDetailInfo.BoundPhoneRecords = new BoundPhoneRecord[tb.Rows.Count];
                        for (int i = 0; i < tb.Rows.Count; i++)
                        {
                            BoundPhoneRecord tmpBoundPhone = new BoundPhoneRecord();
                            tmpBoundPhone.Phone = tb.Rows[i]["Phone"].ToString().Trim();
                            UserDetailInfo.BoundPhoneRecords[i] = tmpBoundPhone;
                        }
                    }
                }

                //��ϵ��Ϣ
                tb = ds.Tables[2];
                if (tb != null)
                {
                    if (tb.Rows.Count > 0)
                    {
                        UserDetailInfo.AddressRecords = new AddressRecord[tb.Rows.Count];
                        for (int i = 0; i < tb.Rows.Count; i++)
                        {
                            AddressRecord tmpAddress = new AddressRecord();
                            tmpAddress.Address = tb.Rows[i]["Address"].ToString().Trim();
                            tmpAddress.ContactTel = tb.Rows[i]["Phone"].ToString().Trim();
                            tmpAddress.LinkMan = tb.Rows[i]["RealName"].ToString().Trim();
                            tmpAddress.Zipcode = tb.Rows[i]["Zipcode"].ToString().Trim();
                            tmpAddress.Type = tb.Rows[i]["Type"].ToString().Trim();
                            UserDetailInfo.AddressRecords[i] = tmpAddress;
                        }
                    }
                }

                //������Ϣ---�Ѿ�������
                UserDetailInfo.AssessmentInfos = null;
                //tb = ds.Tables[3];
                //if (tb != null)
                //{
                //    if (tb.Rows.Count > 0)
                //    {
                //        UserDetailInfo.AssessmentInfos = new AssessmentInfoRecord[tb.Rows.Count];
                //        for (int i = 0; i < tb.Rows.Count; i++)
                //        {
                //            AssessmentInfoRecord tmpAssessMent = new AssessmentInfoRecord();
                //            tmpAssessMent.Credit = long.Parse(tb.Rows[i]["Credit"].ToString().Trim());
                //            tmpAssessMent.CreditLevel = tb.Rows[i]["CreditLevel"].ToString().Trim();
                //            tmpAssessMent.Score = long.Parse(tb.Rows[i]["Score"].ToString().Trim());
                //            tmpAssessMent.AvailableScore = long.Parse(tb.Rows[i]["AvailableScore"].ToString().Trim());
                //            UserDetailInfo.AssessmentInfos[i] = tmpAssessMent;
                //        }
                //    }
                //}

                //������¼--�Ѿ�������
                SubscriptionRecords = null;
                //tb = ds.Tables[4];
                //if (tb != null)
                //{
                //    if (tb.Rows.Count > 0)
                //    {
                //        SubscriptionRecords = new SubscriptionRecord[tb.Rows.Count];
                //        for (int i = 0; i < tb.Rows.Count; i++)
                //        {
                //            SubscriptionRecord tmpSub = new SubscriptionRecord();
                //            tmpSub.CustID = tb.Rows[i]["CustID"].ToString().Trim();
                //            tmpSub.EndTime = DateTime.Parse(tb.Rows[i]["EndTime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss").Trim();
                //            tmpSub.ServiceID = tb.Rows[i]["ServiceID"].ToString().Trim();
                //            tmpSub.ServiceName = tb.Rows[i]["ServiceName"].ToString().Trim();
                //            tmpSub.StartTime = DateTime.Parse(tb.Rows[i]["StartTime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss").Trim();
                //            tmpSub.SubscribeStyle = tb.Rows[i]["SubscribeStyle"].ToString().Trim();
                //            tmpSub.TransactionID = tb.Rows[i]["TransactionID"].ToString().Trim();
                //            tmpSub.UserAccount = tb.Rows[i]["UserAccount"].ToString().Trim();
                //            SubscriptionRecords[i] = tmpSub;
                //        }

                //    }
                //}

                tb = ds.Tables[3];
                //��֤��ʽ��Ϣ
                if (tb != null)
                {
                    if (tb.Rows.Count > 0)
                    {
                        //for (int i = 0; i < tb.Rows.Count; i++)
                        //{
                        //    if (tb.Rows[i]["AuthenType"].ToString().Trim() == "1") //�û���
                        //        UserName = tb.Rows[i]["AuthenName"].ToString().Trim();
                        //    else if (tb.Rows[i]["AuthenType"].ToString().Trim() == "1") //�ֻ�
                        //        MobilePhone = tb.Rows[i]["AuthenName"].ToString().Trim();
                        //}
                    }
                }
                StringBuilder sm = new StringBuilder();
                //<?xml version='1.0' encoding='gb2312' standalone='yes'?><Root><UserExtendInfo><MobilePhone></MobilePhone><UserName>moomoofarm</UserName></UserExtendInfo></Root>
                sm.Append(@"<?xml version='1.0' encoding='gb2312' standalone='yes'?><Root><UserExtendInfo><MobilePhone>");
                sm.Append(MobilePhone);
                sm.Append(@"</MobilePhone><UserName>");
                sm.Append(UserName);
                sm.Append(@"</UserName></UserExtendInfo></Root>");
                UserDetailInfo.ExtendField = sm.ToString();

            }
            catch (Exception ex)
            {
                Result = ErrorDefinition.BT_IError_Result_System_UnknowError_Code;
                ErrMsg = ex.Message;
            }

            return Result;
        }
Beispiel #3
0
        //������֤��
        public static int CheckUserPassword(string ProvinceID, string SPID, string CustID, string UserAccount,string PhoneNum, string EncryptedPassword, out string ErrMsg, out UserInfo UserDetailInfo)
        {
            int Result = ErrorDefinition.BT_IError_Result_UnknowError_Code;
            ErrMsg = "";
            UserDetailInfo = null;
            //SubscriptionRecords = null;

            SqlConnection myCon = null;
            SqlCommand cmd = new SqlCommand();
            try
            {
                myCon = new SqlConnection(DBUtility.BestToneCenterConStr);
                cmd.Connection = myCon;
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "up_Customer_OV3_Interface_CheckUserPassword";

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

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

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

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

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

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

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

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

                DataSet ds = DBUtility.FillData(cmd, DBUtility.BestToneCenterConStr);

                Result = int.Parse(parResult.Value.ToString());
                ErrMsg = parErrMsg.Value.ToString();
                if (Result != 0)
                    return Result;

                if (ds == null)
                {
                    Result = ErrorDefinition.IError_Result_UserNotExist_Code;
                    ErrMsg = "���û���¼";
                    return Result;
                }

                //if (ds.Tables.Count != 1)
                //{
                //    Result = ErrorDefinition.IError_Result_UserNotExist_Code;
                //    ErrMsg = "���û���¼";
                //    return Result;
                //}

                UserDetailInfo = new UserInfo();

                //DataTable tb = new DataTable();
                //tb = ds.Tables[0];
                //if (tb != null)
                //{
                //    if (tb.Rows.Count > 0)
                //    {
                //        UserDetailInfo.UserType = tb.Rows[0]["UserType"].ToString().Trim();
                //        UserDetailInfo.UserAccount = tb.Rows[0]["UserAccount"].ToString().Trim();
                //        UserDetailInfo.Password = "";
                //        UserDetailInfo.CustID = tb.Rows[0]["CustID"].ToString().Trim();
                //        UserDetailInfo.UProvinceID = tb.Rows[0]["UProvinceID"].ToString().Trim();
                //        UserDetailInfo.AreaCode = tb.Rows[0]["AreaCode"].ToString().Trim();
                //        UserDetailInfo.Status = tb.Rows[0]["Status"].ToString().Trim();
                //        UserDetailInfo.RealName = tb.Rows[0]["RealName"].ToString().Trim();
                //        UserDetailInfo.CertificateCode = tb.Rows[0]["CertificateCode"].ToString().Trim();
                //        UserDetailInfo.CertificateType = tb.Rows[0]["CertificateType"].ToString().Trim();
                //        UserDetailInfo.Birthday = DateTime.Parse(tb.Rows[0]["Birthday"].ToString()).ToString("yyyy-MM-dd HH:mm:ss").Trim();
                //        UserDetailInfo.Sex = tb.Rows[0]["Sex"].ToString().Trim();
                //        UserDetailInfo.CustLevel = tb.Rows[0]["CustLevel"].ToString().Trim();
                //        UserDetailInfo.EduLevel = tb.Rows[0]["EduLevel"].ToString().Trim();
                //        UserDetailInfo.Favorite = tb.Rows[0]["Favorite"].ToString().Trim();
                //        UserDetailInfo.IncomeLevel = tb.Rows[0]["IncomeLevel"].ToString().Trim();
                //        UserDetailInfo.Email = tb.Rows[0]["Email"].ToString().Trim();
                //        UserDetailInfo.PaymentAccountType = tb.Rows[0]["PaymentAccountType"].ToString().Trim();
                //        UserDetailInfo.PaymentAccount = tb.Rows[0]["PaymentAccount"].ToString().Trim();
                //        UserDetailInfo.PaymentAccountPassword = "";//tb.Rows[0]["PaymentAccountPassword"].ToString().Trim();
                //        //UserDetailInfo.CustContactTel = tb.Rows[0]["CustContactTel"].ToString().Trim();
                //        UserDetailInfo.CustContactTel = tb.Rows[0]["Phone"].ToString().Trim();
                //    }
                //}
            }
            catch (Exception ex)
            {

                Result = ErrorDefinition.BT_IError_Result_System_UnknowError_Code;
                ErrMsg = ex.Message;
            }
            return Result;
        }
Beispiel #4
0
        //����UserAccount �õ��ͻ���Ϣ
        public static UserInfo getUserInfoByUserAccount(out string ErrMsg, string UserAccount)
        {
            int Result = ErrorDefinition.BT_IError_Result_UnknowError_Code;
            ErrMsg = "";
            UserInfo UserDetailInfo = new UserInfo();
            SqlConnection myCon = null;
            SqlCommand cmd = new SqlCommand();

            try
            {
                myCon = new SqlConnection(DBUtility.BestToneCenterConStr);
                cmd.Connection = myCon;
                cmd.CommandText = "up_Customer_OV3_Interface_GetUserInfoByUserAccount";
                SqlParameter parUserAccount = new SqlParameter("@UserAccount", SqlDbType.VarChar, 16);
                parUserAccount.Value = UserAccount;
                cmd.Parameters.Add(parUserAccount);

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

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

                DataSet ds = DBUtility.FillData(cmd, DBUtility.BestToneCenterConStr);

                Result = int.Parse(parResult.Value.ToString());
                ErrMsg = parErrMsg.Value.ToString();

                if (Result != 0 || ErrMsg == "000")
                    return UserDetailInfo;

                if (ds == null)
                {
                    Result = ErrorDefinition.IError_Result_UserNotExist_Code;
                    ErrMsg = "���û���¼";
                    return UserDetailInfo;
                }
                if (ds.Tables.Count < 1)
                {
                    Result = ErrorDefinition.IError_Result_UserNotExist_Code;
                    ErrMsg = "���û���¼";
                    return UserDetailInfo;
                }

                //UserDetailInfo = new UserInfo();

                DataTable tb = new DataTable();
                tb = ds.Tables[0];

                if (tb != null)
                {
                    if (tb.Rows.Count > 0)
                    {
                        UserDetailInfo.UserType = tb.Rows[0]["UserType"].ToString().Trim();
                        UserDetailInfo.UserAccount = tb.Rows[0]["UserAccount"].ToString().Trim();
                        UserDetailInfo.Password = "";
                        UserDetailInfo.CustID = tb.Rows[0]["CustID"].ToString().Trim();
                        UserDetailInfo.UProvinceID = tb.Rows[0]["UProvinceID"].ToString().Trim();
                        UserDetailInfo.AreaCode = tb.Rows[0]["AreaCode"].ToString().Trim();
                        UserDetailInfo.Status = tb.Rows[0]["Status"].ToString().Trim();
                        UserDetailInfo.RealName = tb.Rows[0]["RealName"].ToString().Trim();
                        UserDetailInfo.CertificateCode = tb.Rows[0]["CertificateCode"].ToString().Trim();
                        UserDetailInfo.CertificateType = tb.Rows[0]["CertificateType"].ToString().Trim();
                        UserDetailInfo.Birthday = DateTime.Parse(tb.Rows[0]["Birthday"].ToString()).ToString("yyyy-MM-dd HH:mm:ss").Trim();
                        UserDetailInfo.Sex = tb.Rows[0]["Sex"].ToString().Trim();
                        UserDetailInfo.CustLevel = tb.Rows[0]["CustLevel"].ToString().Trim();
                        UserDetailInfo.EduLevel = tb.Rows[0]["EduLevel"].ToString().Trim();
                        UserDetailInfo.Favorite = tb.Rows[0]["Favorite"].ToString().Trim();
                        UserDetailInfo.IncomeLevel = tb.Rows[0]["IncomeLevel"].ToString().Trim();
                        UserDetailInfo.Email = tb.Rows[0]["Email"].ToString().Trim();
                        UserDetailInfo.PaymentAccountType = tb.Rows[0]["PaymentAccountType"].ToString().Trim();
                        UserDetailInfo.PaymentAccount = tb.Rows[0]["PaymentAccount"].ToString().Trim();
                        UserDetailInfo.PaymentAccountPassword = "";//tb.Rows[0]["PaymentAccountPassword"].ToString().Trim();

                        UserDetailInfo.CustContactTel = tb.Rows[0]["Phone"].ToString().Trim();
                    }
                }

            }
            catch (Exception ex)
            {
                Result = ErrorDefinition.BT_IError_Result_System_UnknowError_Code;
                ErrMsg = ex.Message;
            }

            return UserDetailInfo;
        }
Beispiel #5
0
        ///// <summary>
        ///// ִ�а󶨵绰�洢����
        ///// </summary>
        ///// <param name="cmd"></param>
        ///// <param name="StoredProcedureStr"></param>
        //private void ExBoundPhone(ref SqlCommand cmd, string StoredProcedureStr)
        //{
        //    cmd.CommandText = StoredProcedureStr;
        //    cmd.Parameters.Clear();
        //    SqlParameter parPhoneNum = new SqlParameter("PhoneNum", SqlDbType.VarChar, 20);
        //    cmd.Parameters.Add(parPhoneNum);
        //    SqlParameter parCustID = new SqlParameter("CustID", SqlDbType.VarChar, 16);
        //    cmd.Parameters.Add(parCustID);
        //    parCustID.Value = custID;
        //    for (int i = 0; i < BoundPhoneRecords.Length; i++)
        //    {
        //        parPhoneNum.Value = BoundPhoneRecords[i].Phone;
        //        cmd.ExecuteNonQuery();
        //    }
        //}
        ///// <summary>
        ///// ִ�е�ַ��Ϣ�洢����
        ///// </summary>
        ///// <param name="cmd"></param>
        //private void ExAddressInfoCmd(ref SqlCommand cmd, string StoredProcedureStr)
        //{
        //    cmd.Parameters.Clear();
        //    cmd.CommandText = StoredProcedureStr;
        //    SqlParameter parUserAccount = new SqlParameter("UserAccount", SqlDbType.VarChar, 16);
        //    parUserAccount.Value = userAccount;
        //    cmd.Parameters.Add(parUserAccount);
        //    SqlParameter parCustID = new SqlParameter("CustID", SqlDbType.VarChar, 16);
        //    cmd.Parameters.Add(parCustID);
        //    SqlParameter parLinkMan = new SqlParameter("LinkMan", SqlDbType.VarChar, 20);
        //    cmd.Parameters.Add(parLinkMan);
        //    SqlParameter parContactTel = new SqlParameter("ContactTel", SqlDbType.VarChar, 20);
        //    cmd.Parameters.Add(parContactTel);
        //    SqlParameter parAddress = new SqlParameter("Address", SqlDbType.VarChar, 200);
        //    cmd.Parameters.Add(parAddress);
        //    SqlParameter parZipcode = new SqlParameter("Zipcode", SqlDbType.VarChar, 6);
        //    cmd.Parameters.Add(parZipcode);
        //    for (int i = 0; i < this.addressRecords.Length; i++)
        //    {
        //        parLinkMan.Value = addressRecords[i].LinkMan;
        //        parContactTel.Value = addressRecords[i].ContactTel;
        //        parAddress.Value = addressRecords[i].Address;
        //        parZipcode.Value = addressRecords[i].Zipcode;
        //        cmd.ExecuteNonQuery();
        //    }
        //}
        public static void WriteLogForUserInfo(UserInfo UserDetailInfo, ref StringBuilder Msg)
        {
            if (UserDetailInfo != null)
            {
                Msg.Append("UserType - " + UserDetailInfo.UserType);
                Msg.Append(";UserAccount - " + UserDetailInfo.UserAccount);
                Msg.Append(";Password - " + UserDetailInfo.Password);
                Msg.Append(";CustID - " + UserDetailInfo.CustID);
                Msg.Append(";UProvinceID - " + UserDetailInfo.UProvinceID);
                Msg.Append(";AreaCode - " + UserDetailInfo.AreaCode);
                Msg.Append(";Status - " + UserDetailInfo.Status);
                Msg.Append(";RealName - " + UserDetailInfo.RealName);
                Msg.Append(";CertificateCode - " + UserDetailInfo.CertificateCode);
                Msg.Append(";CertificateType - " + UserDetailInfo.CertificateType);
                Msg.Append(";Birthday - " + UserDetailInfo.Birthday);
                Msg.Append(";Sex - " + UserDetailInfo.Sex);
                Msg.Append(";CustLevel - " + UserDetailInfo.CustLevel);
                Msg.Append(";EduLevel - " + UserDetailInfo.EduLevel);
                Msg.Append(";Favorite - " + UserDetailInfo.Favorite);
                Msg.Append(";IncomeLevel - " + UserDetailInfo.IncomeLevel);
                Msg.Append(";Email - " + UserDetailInfo.Email);
                Msg.Append(";PaymentAccountType - " + UserDetailInfo.PaymentAccountType);
                Msg.Append(";PaymentAccount - " + UserDetailInfo.PaymentAccount);
                Msg.Append(";PaymentAccountPassword - " + UserDetailInfo.PaymentAccountPassword);
                Msg.Append(";CustContactTel - " + UserDetailInfo.CustContactTel);
                Msg.Append(";EnterpriseID - " + UserDetailInfo.EnterpriseID);
                Msg.Append(";IsPost - " + UserDetailInfo.IsPost);
                Msg.Append(";ExtendField - " + UserDetailInfo.ExtendField + "\r\n");

                if (UserDetailInfo.AddressRecords != null)
                    if (UserDetailInfo.AddressRecords.Length > 0)
                    {
                        Msg.Append("AddressRecords: \r\n");
                        for (int i = 0; i < UserDetailInfo.AddressRecords.Length; i++)
                        {
                            Msg.Append("LinkMan - " + UserDetailInfo.AddressRecords[i].LinkMan);
                            Msg.Append(";ContactTel - " + UserDetailInfo.AddressRecords[i].ContactTel);
                            Msg.Append(";Address - " + UserDetailInfo.AddressRecords[i].Address);
                            Msg.Append(";Zipcode - " + UserDetailInfo.AddressRecords[i].Zipcode);
                            Msg.Append(";Type - " + UserDetailInfo.AddressRecords[i].Type);
                            Msg.Append("\r\n");
                        }
                    }

                if (UserDetailInfo.BoundPhoneRecords != null)
                    if (UserDetailInfo.BoundPhoneRecords.Length > 0)
                    {
                        Msg.Append("BoundPhoneRecords: \r\n");
                        for (int i = 0; i < UserDetailInfo.BoundPhoneRecords.Length; i++)
                        {
                            Msg.Append("Phone - " + UserDetailInfo.BoundPhoneRecords[i].Phone);
                            Msg.Append("\r\n");
                        }

                    }

                if (UserDetailInfo.AssessmentInfos != null)
                    if (UserDetailInfo.AssessmentInfos.Length > 0)
                    {
                        Msg.Append("AssessmentInfos: \r\n");
                        for (int i = 0; i < UserDetailInfo.AssessmentInfos.Length; i++)
                        {
                            Msg.Append("Credit - " + UserDetailInfo.AssessmentInfos[i].Credit);
                            Msg.Append(";CreditLevel - " + UserDetailInfo.AssessmentInfos[i].CreditLevel);
                            Msg.Append(";Score - " + UserDetailInfo.AssessmentInfos[i].Score);
                            Msg.Append(";AvailableScore - " + UserDetailInfo.AssessmentInfos[i].AvailableScore);
                            Msg.Append("\r\n");
                        }
                    }
            }
        }