public void Init() { Catalog = AppConst.StringNull; sCustomer = null; sSO = null; sRMA = null; GiftHash = new Hashtable(5); BrowseHistoryList = new ArrayList(5); }
/// <summary> /// 注册新用户 /// </summary> public static bool RegisterNewCustomer(HttpContext context, NewRegisterCustomerModel customer, out string msg) { bool isSuccess = false; msg = String.Empty; string customerID = customer.CustomerID.Trim(); string password1 = customer.PassWordInput1.Trim(); string password2 = customer.PassWordInput2.Trim(); string customerEmail = customer.CustomerEmail.Trim(); if (customerID == "") { msg += "请输入用户名!<br />"; } else if (!CommonUtility.IsValidNum(customerID, "^[\u4e00-\u9fa5a-zA-Z]+$"))//原需求只允许中英文 { msg += "用户名只能包含中英文字符!<br />"; } else if (customerID.Length < 3 || customerID.Length > 20) { msg += "用户名长度必须大于等于3个字符!<br />"; } if (password1 == "") { msg += "请输入密码!<br />"; } else if (!CommonUtility.IsValidNum(password1, "[a-zA-Z0-9]+$"))//原需求只允许英文数字组合 { msg += "密码只能是英文数字组合!<br />"; } else if (password1.Length < 6 || password1.Length > 20) { msg += "密码长度必须大于等于6个字符!<br />"; } else if (password2 == "") { msg += "请输入确认密码!<br />"; } else if (password2 != password1) { msg += "请确保两次输入的密码一致!<br />"; } if (customerEmail == "") { msg += "请输入电子邮箱!<br />"; } else if (!Util.IsEmailAddress(customerEmail)) { msg += "请正确输入电子邮箱地址!"; } try { //定义一个用户对象并赋值 CustomerInfo oCustomer = new CustomerInfo(); //-----基础的三个信息,用户名,密码,邮箱---// oCustomer.CustomerID = customerID; //DESC加密用户密码 oCustomer.Pwd = DESProvider.EncryptString(password1, YoeJoyConfig.DESCEncryptKey); oCustomer.Email = customerEmail; //---其他信息---// oCustomer.EmailStatus = (int)AppEnum.EmailStatus.Origin; oCustomer.Status = (int)AppEnum.BiStatus.Valid; oCustomer.DwellAreaSysNo = AppConst.IntNull; oCustomer.ReceiveAreaSysNo = AppConst.IntNull; oCustomer.CustomerRank = (int)AppEnum.CustomerRank.Ordinary; oCustomer.IsManualRank = (int)AppEnum.YNStatus.No; oCustomer.CustomerType = (int)AppEnum.CustomerType.Personal; oCustomer.RegisterTime = DateTime.Now; oCustomer.LastLoginTime = DateTime.Now; oCustomer.LastLoginIP = context.Request.UserHostAddress; oCustomer.ValidScore = 0; oCustomer.TotalScore = 0; oCustomer.ValidFreeShipFee = 0; oCustomer.TotalFreeShipFee = 0; //注册操作 CustomerManager.GetInstance().Insert(oCustomer); IcsonSessionInfo oSession = (IcsonSessionInfo)context.Session["IcsonSessionInfo"]; if (oSession == null) { oSession = new IcsonSessionInfo(); context.Session["IcsonSessionInfo"] = oSession; } //指定当前用户为注册的用户 oSession.sCustomer = oCustomer; isSuccess = true; } catch (BizException exp) { msg = exp.Message; } catch (Exception ex) { ErrorLog.GetInstance().Write(ex.ToString()); string url = "../CustomError.aspx?msg=" + context.Server.UrlEncode("用户注册失败!"); context.Response.Redirect(url); } if (isSuccess) { //Response.Redirect("../Customer/NewCustomer.aspx?Type=success"); msg += "注册成功"; //lblErrmsg.Text = "恭喜您,注册成功!<br/>"; //lblErrmsg.Text += "<a href='../Account/AccountCenter.aspx'><span style='color:#FF298F'>请点击进入用户中心!</ span></ a>"; //Response.Redirect("../Account/AccountCenter.aspx"); } return isSuccess; }
/// <summary> /// 获得用户的基本信息 /// </summary> /// <param name="cInfo"></param> /// <returns></returns> public static string GetCustomerBasicInfo(CustomerInfo cInfo) { string customInfoHTML = String.Empty; StringBuilder strb = new StringBuilder("<div id='myInfo'>"); // string profileHTMLTemplate = @" // <div class='l'> // <img src='../static/images/tx02.jpg'> // <a href='#'>编辑头像</a> // </div> // <div class='r'> // <h2> // <em>您好,{0}</em><strong>高级会员</strong><em>[</em><b>{1}</b><em>]</em> <span>上一次登录时间:{2}</span> // </h2> // <ul class='infoDetail'> // <li>等待付款订单(0)</li> // <li>等待收货订单(0)</li> // <li><a href='#'>等待评价商品(10)</a></li> // <li>攸怡积分:<b>{3}</b></li> // <li>冻结积分:<b>32</b></li> // <li><a href='#'>优惠券:<b>2</b></a></li> // <li><a href='#'>站内信(<b>2</b>)</a></li> // </ul> // </div>"; string profileHTMLTemplate = @" <div class='l'> <img src='../static/images/tx02.jpg'> <a href='#'>编辑头像</a> </div> <div class='r'> <h2> <em>您好,{0}</em><strong>{1}</strong><em>[</em><b>{2}</b><em>]</em> <span>上一次登录时间:{3}</span> </h2> <ul class='infoDetail'> <li>等待付款订单(0)</li> <li>等待收货订单(0)</li> <li><a href='#'>等待评价商品(0)</a></li> <li>攸怡积分:<b>{4}</b></li> </ul> </div>"; string emailStatus = String.Empty; if (cInfo.EmailStatus == (int)AppEnum.EmailStatus.Origin) { emailStatus = "未验证"; } else { emailStatus = "已验证"; } strb.Append(String.Format(profileHTMLTemplate, cInfo.CustomerID, emailStatus, AppEnum.GetCustomerRank(cInfo.CustomerRank), cInfo.LastLoginTime, cInfo.ValidScore > 0 ? cInfo.ValidScore : 0)); strb.Append("</div>"); customInfoHTML = strb.ToString(); return customInfoHTML; }
private void map(CustomerInfo oParam, DataRow tempdr) { oParam.SysNo = Util.TrimIntNull(tempdr["SysNo"]); oParam.CustomerID = Util.TrimNull(tempdr["CustomerID"]); oParam.Pwd = Util.TrimNull(tempdr["Pwd"]); oParam.Status = Util.TrimIntNull(tempdr["Status"]); oParam.CustomerName = Util.TrimNull(tempdr["CustomerName"]); oParam.Gender = Util.TrimIntNull(tempdr["Gender"]); oParam.Email = Util.TrimNull(tempdr["Email"]); oParam.Phone = Util.TrimNull(tempdr["Phone"]); oParam.CellPhone = Util.TrimNull(tempdr["CellPhone"]); oParam.Fax = Util.TrimNull(tempdr["Fax"]); oParam.DwellAreaSysNo = Util.TrimIntNull(tempdr["DwellAreaSysNo"]); oParam.DwellAddress = Util.TrimNull(tempdr["DwellAddress"]); oParam.DwellZip = Util.TrimNull(tempdr["DwellZip"]); oParam.ReceiveName = Util.TrimNull(tempdr["ReceiveName"]); oParam.ReceiveContact = Util.TrimNull(tempdr["ReceiveContact"]); oParam.ReceivePhone = Util.TrimNull(tempdr["ReceivePhone"]); oParam.ReceiveCellPhone = Util.TrimNull(tempdr["ReceiveCellPhone"]); oParam.ReceiveFax = Util.TrimNull(tempdr["ReceiveFax"]); oParam.ReceiveAreaSysNo = Util.TrimIntNull(tempdr["ReceiveAreaSysNo"]); oParam.ReceiveAddress = Util.TrimNull(tempdr["ReceiveAddress"]); oParam.ReceiveZip = Util.TrimNull(tempdr["ReceiveZip"]); oParam.TotalScore = Util.TrimIntNull(tempdr["TotalScore"]); oParam.ValidScore = Util.TrimIntNull(tempdr["ValidScore"]); oParam.CardNo = Util.TrimNull(tempdr["CardNo"]); oParam.Note = Util.TrimNull(tempdr["Note"]); oParam.EmailStatus = Util.TrimIntNull(tempdr["EmailStatus"]); oParam.RegisterTime = Util.TrimDateNull(tempdr["RegisterTime"]); oParam.LastLoginIP = Util.TrimNull(tempdr["LastLoginIP"]); oParam.LastLoginTime = Util.TrimDateNull(tempdr["LastLoginTime"]); oParam.CustomerRank = Util.TrimIntNull(tempdr["CustomerRank"]); oParam.IsManualRank = Util.TrimIntNull(tempdr["IsManualRank"]); oParam.CustomerType = Util.TrimIntNull(tempdr["CustomerType"]); oParam.TotalFreeShipFee = Util.TrimDecimalNull(tempdr["TotalFreeShipFee"]); oParam.ValidFreeShipFee = Util.TrimDecimalNull(tempdr["ValidFreeShipFee"]); oParam.RefCustomerSysNo = Util.TrimIntNull(tempdr["RefCustomerSysNo"]); oParam.NickName = Util.TrimNull(tempdr["Nickname"]); oParam.BirthDay = Util.TrimNull(tempdr["Birthday"]); }
private CustomerInfo LoadBySql(string sql) { DataSet ds = SqlHelper.ExecuteDataSet(sql); if (!Util.HasMoreRow(ds)) return null; CustomerInfo oCustomer = new CustomerInfo(); map(oCustomer, ds.Tables[0].Rows[0]); return oCustomer; }
public CustomerInfo LoadCustomerBySO(int soSysNo) { string sql = "select c.* from customer c inner join so_master so on c.sysno=so.customersysno where so.sysno=" + soSysNo; DataSet ds = SqlHelper.ExecuteDataSet(sql); if (Util.HasMoreRow(ds)) { CustomerInfo oInfo = new CustomerInfo(); map(oInfo, ds.Tables[0].Rows[0]); return oInfo; } else return null; }
public int Insert(CustomerInfo oParam) { string sql = @"select case when CustomerID = " + Util.ToSqlString(oParam.CustomerID) + @" then 1 else 0 end as idcheck, case when email = " + Util.ToSqlString(oParam.Email) + @" then 1 else 0 end as emailcheck from customer where CustomerID = " + Util.ToSqlString(oParam.CustomerID) + " or Email = " + Util.ToSqlString(oParam.Email); DataSet ds = SqlHelper.ExecuteDataSet(sql); if (Util.HasMoreRow(ds)) { string errorStr = ""; if (Util.TrimIntNull(ds.Tables[0].Rows[0]["idcheck"]) == 1) { errorStr = "����û����Ѿ���ע��"; } if (Util.TrimIntNull(ds.Tables[0].Rows[0]["emailcheck"]) == 1) { if (errorStr != "") errorStr += ","; errorStr += "���Email�Ѿ���ע��"; } if (errorStr == "") { //��������rows���ظ����ݣ��������Dz�Ӧ���е� errorStr = "�û�����Email�Ѿ���ע��"; } throw new BizException(errorStr); } oParam.SysNo = SequenceDac.GetInstance().Create("Customer_Sequence"); return new CustomerDac().Insert(oParam); }
public void ImportCustomer() { if (!AppConfig.IsImportable) throw new BizException("IsImportable is false"); string sql = "select top 1 * from Customer"; DataSet ds = SqlHelper.ExecuteDataSet(sql); if (Util.HasMoreRow(ds)) throw new BizException("The Customer is not empty"); string sqlDataCleanUp = @"--ɾ������ϸ������,�����ο� declare @ret_value as int set @ret_value = 0 begin tran delete from ipp2003..webuser_master where sysno in (select wm.sysno from ipp2003..webuser_master wm left join ipp2003..webuser_item wi on wi.webusersysno = wm.sysno where wi.sysno is null) and sysno <> -100 if @@error<>0 set @ret_value = -1 --ɾ���Ƿ��û��� delete from ipp2003..webuser_item where webusersysno in (select sysno from ipp2003..webuser_master where usercode like '%''%') delete from ipp2003..webuser_master where usercode like '%''%' --ɾ��ͬһ������ظ���ϸ delete from ipp2003..webuser_item where webusersysno in (select webusersysno from ipp2003..webuser_item group by webusersysno having count(*)>1) and sysno not in (select min(sysno) as sysno from ipp2003..webuser_item group by webusersysno having count(*)>1) if @@error<>0 set @ret_value = -2 --����ͬ�������usercode=usercode+sysno�������һ������ update ipp2003..webuser_master set usercode = (ltrim(rtrim(usercode)) +'('+ cast(sysno as nvarchar)+')') where sysno in (select wm.sysno from ipp2003..webuser_master wm inner join (select ltrim(rtrim(usercode)) as usercode ,count(*) as num from ipp2003..webuser_master group by ltrim(rtrim(usercode)) having count(*)>1) a on ltrim(rtrim(wm.usercode)) = a.usercode) and sysno not in (select min(sysno) as sysno from ipp2003..webuser_master group by ltrim(rtrim(usercode)) having count(*)>1) if @@error<>0 set @ret_value = -3 if @ret_value <> 0 rollback tran else commit tran"; new ProductSaleTrendDac().Exec(sqlDataCleanUp); string sqlCheckData = @"select * from ipp2003..webuser_Master wm left join ipp2003..webuser_item wi on wi.webusersysno = wm.sysno where wi.sysno is null and wm.sysno<> -100; select ltrim(rtrim(wm.usercode)) as usercode,count(*) as number from ipp2003..webuser_master wm group by ltrim(rtrim(wm.usercode)) having count(*)>1; select wi.webusersysno,count(*) as number from ipp2003..webuser_item wi group by wi.webusersysno having count(*)>1;"; DataSet dsCheckData = SqlHelper.ExecuteDataSet(sqlCheckData); foreach (DataTable dt in dsCheckData.Tables) { if (Util.HasMoreRow(dt)) throw new BizException("The DataSource is uncorrect"); } TransactionOptions options = new TransactionOptions(); options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted; options.Timeout = TransactionManager.DefaultTimeout; using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options)) { string sqlSearch = @"select wm.sysno,wm.usercode as CustomerID,(case when wm.userpassword = '' then '8888' else isnull(wm.userpassword,'8888') end) as pwd, wm.status ,name as CustomerName,gender,email,phone,cellphone,fax,dwelladdress,zip as dwellzip,shipname as receivename, shipcontact as receivecontact,shipaddress as receiveaddress,shipzip as receivezip, shipphone as receivephone,shipfax as receivefax,totalscore,validscore,wm.isactive as emailstatus, cardnumber as cardno ,registertime ,null as receivecellphone,wi.memo as note, dwellarea.newsysno as dwellareasysno, shiparea.newsysno as receiveareasysno from ipp2003..webuser_master wm inner join ipp2003..webuser_item wi on wi.webusersysno = wm.sysno inner join ippconvert..Area dwellarea on dwellarea.oldsysno = wi.dwellareasysno inner join ippconvert..Area shiparea on shiparea.oldsysno = wi.shipareasysno"; DataSet dsSearch = SqlHelper.ExecuteDataSet(sqlSearch); if (Util.HasMoreRow(dsSearch)) { foreach (DataRow dr in dsSearch.Tables[0].Rows) { CustomerInfo oCustomer = new CustomerInfo(); this.map(oCustomer, dr); new Icson.DBAccess.Basic.CustomerDac().Insert(oCustomer); } } //insert sequence string sqlMaxSysNo = @"select max(sysno) as sysno from customer"; DataSet dsMaxSysNo = SqlHelper.ExecuteDataSet(sqlMaxSysNo); int n = 0; while (n < Util.TrimIntNull(dsMaxSysNo.Tables[0].Rows[0][0])) { n = SequenceDac.GetInstance().Create("Customer_Sequence"); } //insert Guest string sqlInsertGuest = @"INSERT INTO Customer ( SysNo,CustomerID, Pwd,CustomerName, Status, DwellAreaSysNo, ReceiveAreaSysNo,TotalScore, ValidScore,EmailStatus ) VALUES ( -100,'�ο�','','�ο�',0, 0, 0, 0,0,0 )"; new ProductSaleTrendDac().Exec(sqlInsertGuest); scope.Complete(); } }
public Hashtable GetCustomerByEmail(string email) { string sql = "select * from customer where email = " + Util.ToSqlString(email); DataSet ds = SqlHelper.ExecuteDataSet(sql); if (!Util.HasMoreRow(ds)) return null; Hashtable ht = new Hashtable(5); foreach (DataRow dr in ds.Tables[0].Rows) { CustomerInfo oItem = new CustomerInfo(); map(oItem, dr); ht.Add(oItem.SysNo, oItem); } return ht; }
/// <summary> /// SendMail to customer when a rma request order is created successfully /// </summary> /// <param name="sysno"></param> /// <returns></returns> public void SendMail(RMARequestInfo rmaInfo) { //get mail information string mailaddress; string mailsubject; string mailbodyinfo; string requestId; int sosysno; string strSOID; string requestInfo; string allRequestInfo = null; CustomerInfo oCustomer = new CustomerInfo(); oCustomer = CustomerManager.GetInstance().Load(rmaInfo.CustomerSysNo); if (Util.TrimNull(oCustomer.Email) == AppConst.StringNull) return; mailaddress = oCustomer.Email; requestId = rmaInfo.RequestID.ToString(); sosysno = Util.TrimIntNull(rmaInfo.SOSysNo); strSOID = GetSOIDFromSOMaster(sosysno); mailsubject = "���ѳɹ����뷵��" + requestId + " "; mailbodyinfo = @"<span style='font-size:12.0pt;font-family:����Ҧ��'>��ORS�̳����û���<br> <br> ���ã� <br> <br> ���ѳɹ�������������RMA��������@requestID������������Ʒʱ��������Ӧ��Ʒ�ķ�Ʊ����ӡ����Ч����ͬʱ��֤��Ʒ����������ԭ���İ�װ��û��ֲᣬ�������ɳ����ṩ��һ�и����������Ʒijһ���ֶ�ʧ������ORS�̳ǵı������������ȫ���з�Ʊ������֮ǰ������������Ʒ�ͽ����ҽ��б��ޡ�ORS�̳������е��û����ĸ�����Ʊ�������ķ��ã����ڲ�Ʒ��ȫ����ɵı�������ORS�̳������е����Ρ� <br><br> RMA ��������ϸĿ¼<br> <br> �����ţ� SO @SOID��<br> @allRequestInfo <br> ����ѡ���ޣ���ORS�̳���ɱ����̺���ԭ�����ĵ�ַ���������� �����ĵ�ַ�б䶯���뼰ʱ�����ǵĿͷ����� 400-820-1878 ȡ����ϵ���·�����ַ�����ַδ��ʱ�ĸ��¶����µ�����Ⱥ����ORS�̳����Ų�����<br> <br> ������ʱ�Ľ����������ʾ���ͨ����*��������ʽ����ORS�̳�����������ͨ��������**��ORS�̳Ǹ������ǻ����յ������Ի��ֵ���ʽ���ʼķ��ô�������ORS�̳������ʻ��С�<br> * ��ָƽ�ʰ�����ʽ�����ǿ�ݰ�����EMS������ͻ������������䷽ʽ�����˷��ɿͻ��Լ�����<br> ** �������ʾ��ʷѣ���������װ�ѡ� �Һŷѡ����۷ѣ�����Ҫ�ṩ�ʾַ�Ʊ���վݲ�����ΪORS�̳dzе��˷ѵ�ƾ֤�� ��Ʒά�ú������ǽ����サ���ͻ���<br> <br> ORS�̳����յ����ķ�������,ORS�̳������ϸ��չ�������������д����������Ҫ������ϵORS�̳����ͷ����� 400-820-1878 ��һ������ ����8��30 �� ����17��30�� <br> <br> <br> лл֧�֣�<br> <br> <br> �й�ORS�̳���<br><br></span>"; DataSet registerInfo = RMARequestManager.GetInstance().GetRegisterByRequest(Util.TrimIntNull(rmaInfo.SysNo)); foreach (DataRow row in registerInfo.Tables[0].Rows) { requestInfo = @"��Ʒ�ţ� @ProductId ��@ProductName��<br> ���������ࣺ@RequestType<br> ����ԭ��/����������@reason<br> "; string requesttypeDesc = AppEnum.GetRMARequestType(row["RequestType"]); requestInfo = requestInfo.Replace("@ProductId", row["ProductId"].ToString()).Replace("@ProductName", row["ProductName"].ToString()).Replace("@RequestType", requesttypeDesc.ToString()).Replace("@reason", row["CustomerDesc"].ToString()); allRequestInfo = allRequestInfo + requestInfo; } mailbodyinfo = mailbodyinfo.Replace("@requestID", requestId); mailbodyinfo = mailbodyinfo.Replace("@SOID", strSOID); mailbodyinfo = mailbodyinfo.Replace("@allRequestInfo", allRequestInfo.ToString()); //send mail EmailInfo oMail = new EmailInfo(); oMail.MailAddress = mailaddress; oMail.MailSubject = mailsubject; oMail.MailBody = mailbodyinfo; oMail.Status = (int)AppEnum.TriStatus.Origin; //EmailManager.GetInstance().InsertEmail(oMail); }
/// <summary> /// RMA Revert���͵�����ʱ��Mail��Customer /// </summary> /// <returns></returns> public void SendMail(Hashtable ht) { //get mail information string mailaddress; string mailsubject; string mailbodyinfo; RMARevertInfo revertInfo = Load(Util.TrimIntNull(ht["SysNo"])); string strAllProduct = null; string strProductInfo = null; string strPackageID = ht["PackageID"].ToString(); CustomerInfo oCustomer = new CustomerInfo(); oCustomer = CustomerManager.GetInstance().Load(revertInfo.CustomerSysNo); if (Util.TrimNull(oCustomer.Email) == AppConst.StringNull) return; mailaddress = oCustomer.Email.ToString(); mailsubject = @"������ķ�����Ʒ�Ѿ�����"; mailbodyinfo = @"<span style='font-size:12.0pt;font-family:����Ҧ��'>��ORS�̳����û��� <br> ���ã� <br> ����ORS�̳�������������·�����Ʒ��<br> @allProduct �Ѿ�������ɣ�ORS�̳�����������ͨ��ݰ����������ķ���������ͨ��ݵ��˵�����@PackageID����������ͨ��ݵ���վ<a href='http://www.sto.cn' target='_blank'>www.sto.cn</a>��ѯ������������������������µ���ͨ��˾021-39206666��ȡ��Ϣ��������Ҫ������ϵORS�̳����ͷ�����400-820-1878�� <br> ��л����ORS�̳������лл֧�֣� <br> �й�ORS�̳���</span>"; DataSet dsProductInfo = RMARevertManager.GetInstance().GetProductByRevert(Util.TrimIntNull(ht["SysNo"])); foreach (DataRow row in dsProductInfo.Tables[0].Rows) { strProductInfo += "��Ʒ��:" + row["ProductID"].ToString() + "(" + row["ProductName"].ToString() + ")" + "<br>"; } strAllProduct = strProductInfo; mailbodyinfo = mailbodyinfo.Replace("@allProduct", strAllProduct); mailbodyinfo = mailbodyinfo.Replace("@PackageID", strPackageID); //send mail EmailInfo oMail = new EmailInfo(); oMail.MailAddress = mailaddress; oMail.MailSubject = mailsubject; oMail.MailBody = mailbodyinfo; oMail.Status = (int)AppEnum.TriStatus.Origin; EmailManager.GetInstance().InsertEmail(oMail); }
public int Insert(CustomerInfo oParam) { string sql = @"INSERT INTO Customer ( SysNo,CustomerID, Pwd, Status, CustomerName, Gender, Email, Phone, CellPhone, Fax, DwellAreaSysNo, DwellAddress, DwellZip, ReceiveName, ReceiveContact, ReceivePhone, ReceiveCellPhone, ReceiveFax, ReceiveAreaSysNo, ReceiveAddress, ReceiveZip, TotalScore, ValidScore, CardNo, Note, EmailStatus, RegisterTime, LastLoginIP, LastLoginTime, CustomerRank, IsManualRank, CustomerType, TotalFreeShipFee,ValidFreeShipFee,RefCustomerSysNo ) VALUES ( @SysNo,@CustomerID, @Pwd, @Status, @CustomerName, @Gender, @Email, @Phone, @CellPhone, @Fax, @DwellAreaSysNo, @DwellAddress, @DwellZip, @ReceiveName, @ReceiveContact, @ReceivePhone, @ReceiveCellPhone, @ReceiveFax, @ReceiveAreaSysNo, @ReceiveAddress, @ReceiveZip, @TotalScore, @ValidScore, @CardNo, @Note, @EmailStatus, @RegisterTime, @LastLoginIP, @LastLoginTime, @CustomerRank, @IsManualRank, @CustomerType, @TotalFreeShipFee,@ValidFreeShipFee,@RefCustomerSysNo )"; SqlCommand cmd = new SqlCommand(sql); SqlParameter paramSysNo = new SqlParameter("@SysNo", SqlDbType.Int, 4); SqlParameter paramCustomerID = new SqlParameter("@CustomerID", SqlDbType.NVarChar, 50); SqlParameter paramPwd = new SqlParameter("@Pwd", SqlDbType.NVarChar, 50); SqlParameter paramStatus = new SqlParameter("@Status", SqlDbType.Int, 4); SqlParameter paramCustomerName = new SqlParameter("@CustomerName", SqlDbType.NVarChar, 50); SqlParameter paramGender = new SqlParameter("@Gender", SqlDbType.Int, 4); SqlParameter paramEmail = new SqlParameter("@Email", SqlDbType.NVarChar, 50); SqlParameter paramPhone = new SqlParameter("@Phone", SqlDbType.NVarChar, 50); SqlParameter paramCellPhone = new SqlParameter("@CellPhone", SqlDbType.NVarChar, 50); SqlParameter paramFax = new SqlParameter("@Fax", SqlDbType.NVarChar, 50); SqlParameter paramDwellAreaSysNo = new SqlParameter("@DwellAreaSysNo", SqlDbType.Int, 4); SqlParameter paramDwellAddress = new SqlParameter("@DwellAddress", SqlDbType.NVarChar, 200); SqlParameter paramDwellZip = new SqlParameter("@DwellZip", SqlDbType.NVarChar, 50); SqlParameter paramReceiveName = new SqlParameter("@ReceiveName", SqlDbType.NVarChar, 50); SqlParameter paramReceiveContact = new SqlParameter("@ReceiveContact", SqlDbType.NVarChar, 50); SqlParameter paramReceivePhone = new SqlParameter("@ReceivePhone", SqlDbType.NVarChar, 50); SqlParameter paramReceiveCellPhone = new SqlParameter("@ReceiveCellPhone", SqlDbType.NVarChar, 50); SqlParameter paramReceiveFax = new SqlParameter("@ReceiveFax", SqlDbType.NVarChar, 50); SqlParameter paramReceiveAreaSysNo = new SqlParameter("@ReceiveAreaSysNo", SqlDbType.Int, 4); SqlParameter paramReceiveAddress = new SqlParameter("@ReceiveAddress", SqlDbType.NVarChar, 200); SqlParameter paramReceiveZip = new SqlParameter("@ReceiveZip", SqlDbType.NVarChar, 50); SqlParameter paramTotalScore = new SqlParameter("@TotalScore", SqlDbType.Int, 4); SqlParameter paramValidScore = new SqlParameter("@ValidScore", SqlDbType.Int, 4); SqlParameter paramCardNo = new SqlParameter("@CardNo", SqlDbType.NVarChar, 50); SqlParameter paramNote = new SqlParameter("@Note", SqlDbType.NVarChar, 500); SqlParameter paramEmailStatus = new SqlParameter("@EmailStatus", SqlDbType.Int, 4); SqlParameter paramRegisterTime = new SqlParameter("@RegisterTime", SqlDbType.DateTime); SqlParameter paramLastLoginIP = new SqlParameter("@LastLoginIP", SqlDbType.NVarChar, 50); SqlParameter paramLastLoginTime = new SqlParameter("@LastLoginTime", SqlDbType.DateTime); SqlParameter paramCustomerRank = new SqlParameter("@CustomerRank", SqlDbType.Int, 4); SqlParameter paramIsManualRank = new SqlParameter("@IsManualRank", SqlDbType.Int, 4); SqlParameter paramCustomerType = new SqlParameter("@CustomerType", SqlDbType.Int, 4); SqlParameter paramTotalFreeShipFee = new SqlParameter("@TotalFreeShipFee", SqlDbType.Decimal, 9); SqlParameter paramValidFreeShipFee = new SqlParameter("@ValidFreeShipFee", SqlDbType.Decimal, 9); SqlParameter paramRefCustomerSysNo = new SqlParameter("@RefCustomerSysNo", SqlDbType.Int, 4); if (oParam.SysNo != AppConst.IntNull) paramSysNo.Value = oParam.SysNo; else paramSysNo.Value = System.DBNull.Value; if (oParam.CustomerID != AppConst.StringNull) paramCustomerID.Value = oParam.CustomerID; else paramCustomerID.Value = System.DBNull.Value; if (oParam.Pwd != AppConst.StringNull) paramPwd.Value = oParam.Pwd; else paramPwd.Value = System.DBNull.Value; if (oParam.Status != AppConst.IntNull) paramStatus.Value = oParam.Status; else paramStatus.Value = System.DBNull.Value; if (oParam.CustomerName != AppConst.StringNull) paramCustomerName.Value = oParam.CustomerName; else paramCustomerName.Value = System.DBNull.Value; if (oParam.Gender != AppConst.IntNull) paramGender.Value = oParam.Gender; else paramGender.Value = System.DBNull.Value; if (oParam.Email != AppConst.StringNull) paramEmail.Value = oParam.Email; else paramEmail.Value = System.DBNull.Value; if (oParam.Phone != AppConst.StringNull) paramPhone.Value = oParam.Phone; else paramPhone.Value = System.DBNull.Value; if (oParam.CellPhone != AppConst.StringNull) paramCellPhone.Value = oParam.CellPhone; else paramCellPhone.Value = System.DBNull.Value; if (oParam.Fax != AppConst.StringNull) paramFax.Value = oParam.Fax; else paramFax.Value = System.DBNull.Value; paramDwellAreaSysNo.Value = oParam.DwellAreaSysNo; if (oParam.DwellAddress != AppConst.StringNull) paramDwellAddress.Value = oParam.DwellAddress; else paramDwellAddress.Value = System.DBNull.Value; if (oParam.DwellZip != AppConst.StringNull) paramDwellZip.Value = oParam.DwellZip; else paramDwellZip.Value = System.DBNull.Value; if (oParam.ReceiveName != AppConst.StringNull) paramReceiveName.Value = oParam.ReceiveName; else paramReceiveName.Value = System.DBNull.Value; if (oParam.ReceiveContact != AppConst.StringNull) paramReceiveContact.Value = oParam.ReceiveContact; else paramReceiveContact.Value = System.DBNull.Value; if (oParam.ReceivePhone != AppConst.StringNull) paramReceivePhone.Value = oParam.ReceivePhone; else paramReceivePhone.Value = System.DBNull.Value; if (oParam.ReceiveCellPhone != AppConst.StringNull) paramReceiveCellPhone.Value = oParam.ReceiveCellPhone; else paramReceiveCellPhone.Value = System.DBNull.Value; if (oParam.ReceiveFax != AppConst.StringNull) paramReceiveFax.Value = oParam.ReceiveFax; else paramReceiveFax.Value = System.DBNull.Value; paramReceiveAreaSysNo.Value = oParam.ReceiveAreaSysNo; if (oParam.ReceiveAddress != AppConst.StringNull) paramReceiveAddress.Value = oParam.ReceiveAddress; else paramReceiveAddress.Value = System.DBNull.Value; if (oParam.ReceiveZip != AppConst.StringNull) paramReceiveZip.Value = oParam.ReceiveZip; else paramReceiveZip.Value = System.DBNull.Value; if (oParam.TotalScore != AppConst.IntNull) paramTotalScore.Value = oParam.TotalScore; else paramTotalScore.Value = System.DBNull.Value; if (oParam.ValidScore != AppConst.IntNull) paramValidScore.Value = oParam.ValidScore; else paramValidScore.Value = System.DBNull.Value; if (oParam.CardNo != AppConst.StringNull) paramCardNo.Value = oParam.CardNo; else paramCardNo.Value = System.DBNull.Value; if (oParam.Note != AppConst.StringNull) paramNote.Value = oParam.Note; else paramNote.Value = System.DBNull.Value; if (oParam.EmailStatus != AppConst.IntNull) paramEmailStatus.Value = oParam.EmailStatus; else paramEmailStatus.Value = System.DBNull.Value; if (oParam.RegisterTime != AppConst.DateTimeNull) paramRegisterTime.Value = oParam.RegisterTime; else paramRegisterTime.Value = System.DBNull.Value; if (oParam.LastLoginIP != AppConst.StringNull) paramLastLoginIP.Value = oParam.LastLoginIP; else paramLastLoginIP.Value = System.DBNull.Value; if (oParam.LastLoginTime != AppConst.DateTimeNull) paramLastLoginTime.Value = oParam.LastLoginTime; else paramLastLoginTime.Value = System.DBNull.Value; if (oParam.CustomerRank != AppConst.IntNull) paramCustomerRank.Value = oParam.CustomerRank; else paramCustomerRank.Value = System.DBNull.Value; if (oParam.IsManualRank != AppConst.IntNull) paramIsManualRank.Value = oParam.IsManualRank; else paramIsManualRank.Value = System.DBNull.Value; if (oParam.CustomerType != AppConst.IntNull) paramCustomerType.Value = oParam.CustomerType; else paramCustomerType.Value = System.DBNull.Value; if (oParam.TotalFreeShipFee != AppConst.DecimalNull) paramTotalFreeShipFee.Value = oParam.TotalFreeShipFee; else paramTotalFreeShipFee.Value = System.DBNull.Value; if (oParam.ValidFreeShipFee != AppConst.DecimalNull) paramValidFreeShipFee.Value = oParam.ValidFreeShipFee; else paramValidFreeShipFee.Value = System.DBNull.Value; if (oParam.RefCustomerSysNo != AppConst.IntNull) paramRefCustomerSysNo.Value = oParam.RefCustomerSysNo; else paramRefCustomerSysNo.Value = System.DBNull.Value; cmd.Parameters.Add(paramSysNo); cmd.Parameters.Add(paramCustomerID); cmd.Parameters.Add(paramPwd); cmd.Parameters.Add(paramStatus); cmd.Parameters.Add(paramCustomerName); cmd.Parameters.Add(paramGender); cmd.Parameters.Add(paramEmail); cmd.Parameters.Add(paramPhone); cmd.Parameters.Add(paramCellPhone); cmd.Parameters.Add(paramFax); cmd.Parameters.Add(paramDwellAreaSysNo); cmd.Parameters.Add(paramDwellAddress); cmd.Parameters.Add(paramDwellZip); cmd.Parameters.Add(paramReceiveName); cmd.Parameters.Add(paramReceiveContact); cmd.Parameters.Add(paramReceivePhone); cmd.Parameters.Add(paramReceiveCellPhone); cmd.Parameters.Add(paramReceiveFax); cmd.Parameters.Add(paramReceiveAreaSysNo); cmd.Parameters.Add(paramReceiveAddress); cmd.Parameters.Add(paramReceiveZip); cmd.Parameters.Add(paramTotalScore); cmd.Parameters.Add(paramValidScore); cmd.Parameters.Add(paramCardNo); cmd.Parameters.Add(paramNote); cmd.Parameters.Add(paramEmailStatus); cmd.Parameters.Add(paramRegisterTime); cmd.Parameters.Add(paramLastLoginIP); cmd.Parameters.Add(paramLastLoginTime); cmd.Parameters.Add(paramCustomerRank); cmd.Parameters.Add(paramIsManualRank); cmd.Parameters.Add(paramCustomerType); cmd.Parameters.Add(paramTotalFreeShipFee); cmd.Parameters.Add(paramValidFreeShipFee); cmd.Parameters.Add(paramRefCustomerSysNo); return SqlHelper.ExecuteNonQuery(cmd); }