Beispiel #1
0
        /// <summary>
        /// 修改会员账号
        /// </summary>
        /// <param name="dr"></param>
        private void modifyMemberAccount(DataRow dr)
        {
            if (dr != null)
            {
                SOSOshop.BLL.MemberAccount   ma  = new SOSOshop.BLL.MemberAccount();
                SOSOshop.Model.MemberAccount mam = new SOSOshop.Model.MemberAccount();
                object UID = ma.ExecuteScalar("select UID from MemberAccount where MobilePhone='" + dr["联系手机"].ToString() + "'");

                if (UID != null)
                {
                    int x = 0;
                    if (int.TryParse(UID.ToString(), out x))
                    {
                        mam              = ma.GetModel(x);
                        mam.MobilePhone  = dr["联系手机"].ToString();
                        mam.CompanyClass = dr["客户类型"].ToString();
                        mam.UserId       = dr["会员编号"].ToString();
                        ma.Update(mam);
                    }
                    else
                    {
                        SOSOshop.BLL.Logs.Log.LogAdminAdd("没有该会员信息" + dr["联系手机"].ToString().Trim(), 0, "", 0);
                    }
                }
                else
                {
                    addMemberAccount(dr);
                }
            }
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                SOSOshop.Model.MemberAccount a = null;
                int uid = 0; int.TryParse(Request["UID"], out uid);

                if (uid > 0)
                {
                    SOSOshop.BLL.MemberAccount bll   = new SOSOshop.BLL.MemberAccount();
                    SOSOshop.Model.MemberInfo  model = new SOSOshop.BLL.MemberInfo().GetModel(uid);
                    object obj = bll.ExecuteScalar("select top(1) Name from DrugsBase_Enterprise where ID=" + model.ParentId);

                    a = bll.GetModel(uid);
                    hfmobilePhone.Value    = a.MobilePhone;
                    hftrueName.Value       = model.TrueName;
                    hfdefaultIncName.Value = obj != null?obj.ToString() : "未设置";

                    hfmember_Class.Value = "无"; if (model.Member_Class >= 0)
                    {
                        hfmember_Class.Value = Enum.GetName(typeof(SOSOshop.Model.MemberKeyValue.Member_Class), model.Member_Class);
                    }

                    #region 实例化省市区联动

                    DataSet dsProvinces = bll.ExecuteDataSet("select isnull((select TOP(1) Name from Region where ID=" + model.Province + "),'') as a,isnull((select TOP(1) Name from Region where ID=" + model.City + "),'') as b,isnull((select TOP(1) Name from Region where ID=" + model.Borough + "),'') as c");

                    if (dsProvinces != null && dsProvinces.Tables.Count > 0 && dsProvinces.Tables[0].Rows.Count > 0)
                    {
                        hfConsigneeProvince.Value = dsProvinces.Tables[0].Rows[0][0].ToString();
                        hfConsigneeCity.Value     = dsProvinces.Tables[0].Rows[0][1].ToString();
                        hfConsigneeBorough.Value  = dsProvinces.Tables[0].Rows[0][2].ToString();
                    }

                    #endregion
                }

                if (a != null)
                {
                    this.hfUID.Value = uid.ToString();
                    //显示列表
                    Search_Click(null, null);
                }
                else
                {
                    Response.Write("<center><br><h3>未知买家!</h3>"); Response.End();
                }
            }
        }