Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack) return;
        var bl = new View_Members_Br();
        var md = bl.GetSingle(int.Parse(Request.QueryString["member_id"]));
        ViewState["company"] = md.CompanyName;
        ViewState["trueName"] = md.TrueName;
        ViewState["Gender"] = md.Gender;
        ViewState["qq"] = md.QQ;
        
        var ud = Session["UserData"] as UserData;
        if (UserData.ChkObjNull(UserData.ObjType.会员信息)) {
            var myinfo = bl.GetSingle(ud.Member.ID);
            string email = myinfo.Email;
            if (email.Contains("@")) {
                ViewState["email_1"] = email.Split('@')[0];
                ViewState["email_2"] = email.Split('@')[1];
            }
            ViewState["mycompany"] = myinfo.CompanyName;
            string[] phone = myinfo.Phone.Split('-');
            ViewState["phone_1"] = phone[0];
            ViewState["phone_2"] =phone.Length>1?phone[1]:"";
            ViewState["mobile"] = myinfo.Mobile;
            

        }
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            return;
        }
        var bl = new View_Members_Br();
        var md = bl.GetSingle(int.Parse(Request.QueryString["member_id"]));

        ViewState["company"]  = md.CompanyName;
        ViewState["trueName"] = md.TrueName;
        ViewState["Gender"]   = md.Gender;
        ViewState["qq"]       = md.QQ;

        var ud = Session["UserData"] as UserData;

        if (UserData.ChkObjNull(UserData.ObjType.会员信息))
        {
            var    myinfo = bl.GetSingle(ud.Member.ID);
            string email  = myinfo.Email;
            if (email.Contains("@"))
            {
                ViewState["email_1"] = email.Split('@')[0];
                ViewState["email_2"] = email.Split('@')[1];
            }
            ViewState["mycompany"] = myinfo.CompanyName;
            string[] phone = myinfo.Phone.Split('-');
            ViewState["phone_1"] = phone[0];
            ViewState["phone_2"] = phone.Length > 1?phone[1]:"";
            ViewState["mobile"]  = myinfo.Mobile;
        }
    }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     var bl = new View_Members_Br();
     var md=bl.GetSingle(Request.Url);
     ViewState["qq"] = md.QQ;
     ViewState["memberid"] = md.ID;
 }
Exemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var bl = new View_Members_Br();
        var md = bl.GetSingle(Request.Url);

        ViewState["qq"]       = md.QQ;
        ViewState["memberid"] = md.ID;
    }
Exemplo n.º 5
0
    protected override void OnPreLoad(EventArgs e)
    {
        var vmbbl = new View_Members_Br();

        _vMember = vmbbl.GetSingle(Request.Url);
        if (_vMember == null)
        {
            Response.Write("<br>   该商铺不存在或已被删除。");
            Response.End();
        }

        //装修数据
        _ShopConfig = DS_ShopConfig_Br.GetSingle(_vMember.ID, true);
        //if (!object.Equals(_ShopConfig,null)&&!object.Equals(this.Page.Header, null))
        //{
        //    var lctr = new LiteralControl();
        //    lctr.Text = "<style type=\"text/css\">";
        //    if (!string.IsNullOrEmpty(_ShopConfig.SignImg))
        //        lctr.Text += ".Head{background-image:url(" + _ShopConfig.SignImg + ");}\n";
        //    if (!string.IsNullOrEmpty(_ShopConfig.MenuBg))
        //        lctr.Text += ".HeaderMenuBar{background-image:url(" + _ShopConfig.MenuBg + ");}\n";
        //    if (!string.IsNullOrEmpty(_ShopConfig.NormalMenu))
        //        lctr.Text += ".HeaderMenuBar ul li{background-image:url(" + _ShopConfig.NormalMenu + ");}\n";
        //    if (!string.IsNullOrEmpty(_ShopConfig.SelectedMenu))
        //        lctr.Text += ".HeaderMenuBar ul li:hover{background-image:url(" + _ShopConfig.SelectedMenu + ");}\n";
        //    if (!string.IsNullOrEmpty(_ShopConfig.SelectedMenu))
        //        lctr.Text += ".HeaderMenuBar ul li.Check{background-image:url(" + _ShopConfig.SelectedMenu + ");}\n";
        //    if (!string.IsNullOrEmpty(_ShopConfig.NmColor))
        //        lctr.Text += ".HeaderMenuBar ul li a:link,.HeaderMenuBar ul li a:visited{color:" + _ShopConfig.NmColor + ";}\n";
        //    if (!string.IsNullOrEmpty(_ShopConfig.SelmColor))
        //        lctr.Text += ".HeaderMenuBar ul li:hover a,.HeaderMenuBar ul li a:hover,.HeaderMenuBar ul li.Check a:link,.HeaderMenuBar ul li.Check a:visited{color:" + _ShopConfig.SelmColor + ";}\n";
        //    if (!string.IsNullOrEmpty(_ShopConfig.ComNameCss))
        //        lctr.Text += ".Head h1{" + _ShopConfig.ComNameCss + "}\n";
        //    lctr.Text += "</style>";
        //    this.Page.Header.Controls.Add(lctr);
        //}
    }
Exemplo n.º 6
0
    protected override void OnPreLoad(EventArgs e)
    {
        var vmbbl = new View_Members_Br();
        _vMember = vmbbl.GetSingle(Request.Url);
        if (_vMember == null)
        {
            Response.Write("<br>   该商铺不存在或已被删除。");
            Response.End();
        }

        //装修数据
        _ShopConfig = DS_ShopConfig_Br.GetSingle(_vMember.ID, true);
        //if (!object.Equals(_ShopConfig,null)&&!object.Equals(this.Page.Header, null))
        //{
        //    var lctr = new LiteralControl();
        //    lctr.Text = "<style type=\"text/css\">";
        //    if (!string.IsNullOrEmpty(_ShopConfig.SignImg))
        //        lctr.Text += ".Head{background-image:url(" + _ShopConfig.SignImg + ");}\n";
        //    if (!string.IsNullOrEmpty(_ShopConfig.MenuBg))
        //        lctr.Text += ".HeaderMenuBar{background-image:url(" + _ShopConfig.MenuBg + ");}\n";
        //    if (!string.IsNullOrEmpty(_ShopConfig.NormalMenu))
        //        lctr.Text += ".HeaderMenuBar ul li{background-image:url(" + _ShopConfig.NormalMenu + ");}\n";
        //    if (!string.IsNullOrEmpty(_ShopConfig.SelectedMenu))
        //        lctr.Text += ".HeaderMenuBar ul li:hover{background-image:url(" + _ShopConfig.SelectedMenu + ");}\n";
        //    if (!string.IsNullOrEmpty(_ShopConfig.SelectedMenu))
        //        lctr.Text += ".HeaderMenuBar ul li.Check{background-image:url(" + _ShopConfig.SelectedMenu + ");}\n";
        //    if (!string.IsNullOrEmpty(_ShopConfig.NmColor))
        //        lctr.Text += ".HeaderMenuBar ul li a:link,.HeaderMenuBar ul li a:visited{color:" + _ShopConfig.NmColor + ";}\n";
        //    if (!string.IsNullOrEmpty(_ShopConfig.SelmColor))
        //        lctr.Text += ".HeaderMenuBar ul li:hover a,.HeaderMenuBar ul li a:hover,.HeaderMenuBar ul li.Check a:link,.HeaderMenuBar ul li.Check a:visited{color:" + _ShopConfig.SelmColor + ";}\n";
        //    if (!string.IsNullOrEmpty(_ShopConfig.ComNameCss))
        //        lctr.Text += ".Head h1{" + _ShopConfig.ComNameCss + "}\n";
        //    lctr.Text += "</style>";
        //    this.Page.Header.Controls.Add(lctr);
        //}
    }
Exemplo n.º 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //设置左边菜单
        var mst = this.Master as Member_Manage_MasterPage;

        mst.SetMenuTitle("公司资料", "基本资料");

        //保存事件
        Button1.Click += new EventHandler(Button1_Click);

        if (IsPostBack)
        {
            return;
        }
        var btbl = new DS_BusType_Br();

        Repeater1.DataSource = btbl.Query("", "px");//企业类型
        Repeater1.DataBind();

        ViewState["yearest"] = "<option value=''>-请选择-</option>";
        for (int i = 1970; i <= 2012; i++)
        {
            ViewState["yearest"] = ViewState["yearest"].ToString() + "<option value='" + i + "'>" + i + "</option>";
        }
        var  ud = _userData;
        var  bl = new View_Members_Br();
        var  md = bl.GetSingle(ud.Member.ID);
        bool b  = false;

        ViewState["companyName"]    = md.CompanyName;
        ViewState["BusType"]        = md.BusinessType;
        ViewState["BusModel"]       = md.BusinessModel;
        ViewState["RegCapital"]     = md.RegisteredCapital;
        ViewState["CapitalType"]    = md.CapitalType;
        ViewState["YearEst"]        = md.YearEstablished;
        ViewState["regArea"]        = md.RegistrationArea;
        ViewState["busArea"]        = md.BusinessAddress;
        ViewState["companyAddress"] = md.Province;
        ViewState["ZipCode"]        = md.ZipCode;
        ViewState["phone"]          = md.Phone.TrimEnd('-');
        ViewState["mapNid"]         = md.MapNid;
        if (!string.IsNullOrEmpty(md.OfferService))
        {
            int i = 0;
            foreach (string s in md.OfferService.Split(','))
            {
                if (i > 4 && !string.IsNullOrEmpty(s))
                {
                    ViewState["os"] = true;
                }
                ViewState["oserver" + i++] = s;
            }
        }
        if (!string.IsNullOrEmpty(md.BuyService))
        {
            int i = 0;
            foreach (string s in md.BuyService.Split(','))
            {
                if (i > 4 && !string.IsNullOrEmpty(s))
                {
                    ViewState["ob"] = true;
                }
                ViewState["buypro" + i++] = s;
            }
        }
        ViewState["buypro"]   = md.BuyService;
        ViewState["MainIndu"] = md.MainIndustry;
        ViewState["profile"]  = md.Profile;
    }
Exemplo n.º 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //设置左边菜单
        var mst = this.Master as Member_Manage_MasterPage;
        mst.SetMenuTitle("公司资料", "基本资料");

        //保存事件
        Button1.Click+=new EventHandler(Button1_Click);

        if (IsPostBack) return;
        var btbl = new DS_BusType_Br();
        Repeater1.DataSource = btbl.Query("","px");//企业类型
        Repeater1.DataBind();

        ViewState["yearest"] = "<option value=''>-请选择-</option>";
        for (int i = 1970; i <= 2012; i++)
        {
            ViewState["yearest"] = ViewState["yearest"].ToString() + "<option value='" + i + "'>" + i + "</option>";
        }
        var ud = _userData;
        var bl = new View_Members_Br();
        var md = bl.GetSingle(ud.Member.ID);
        bool b = false;
        ViewState["companyName"] = md.CompanyName;
        ViewState["BusType"] = md.BusinessType;
        ViewState["BusModel"] = md.BusinessModel;
        ViewState["RegCapital"] = md.RegisteredCapital;
        ViewState["CapitalType"] = md.CapitalType;
        ViewState["YearEst"] = md.YearEstablished;
        ViewState["regArea"] = md.RegistrationArea;
        ViewState["busArea"] = md.BusinessAddress;
        ViewState["companyAddress"] = md.Province;
        ViewState["ZipCode"] = md.ZipCode;
        ViewState["phone"] = md.Phone.TrimEnd('-');
        ViewState["mapNid"] = md.MapNid;
        if (!string.IsNullOrEmpty(md.OfferService)) {
            int i=0;
            foreach (string  s in md.OfferService.Split(','))
            {
                if (i > 4&&!string.IsNullOrEmpty(s)) {
                    ViewState["os"] = true;
                }
                ViewState["oserver" + i++] = s;
            }
        }
        if (!string.IsNullOrEmpty(md.BuyService))
        {
            int i = 0;
            foreach (string s in md.BuyService.Split(','))
            {
                if (i > 4 && !string.IsNullOrEmpty(s))
                {
                    ViewState["ob"] = true;
                }
                ViewState["buypro" + i++] = s;
            }
        }
        ViewState["buypro"] = md.BuyService;
        ViewState["MainIndu"] = md.MainIndustry;
        ViewState["profile"] = md.Profile;
    }