예제 #1
0
 //添加域名
 protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
 {
     if (Session["User"] != null)
     {
         oepr = (Operator)Session["User"];
         if (WebSiteManager.GetWebSiteByDomainName(this.txtDomainName.Text) != null)
         {
             ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script>alert('域名存在');</script>");
             return;
         }
         LiveSupport.BLL.NewWebSite  nwst= new LiveSupport.BLL.NewWebSite();
         LiveSupport.BLL.Banner bnr = new LiveSupport.BLL.Banner();
         bnr.State = LiveSupport.BLL.WebSiteManager.WebSite_Default;
         bnr.Offline = "offline0.JPG";
         bnr.Online = "online0.JPG";
         LiveSupport.BLL.Invite ivt = new LiveSupport.BLL.Invite();
         ivt.State = LiveSupport.BLL.WebSiteManager.WebSite_Default;
         ivt.Bgimg = "invite_bg0.gif";
         ivt.Noimg = "btn_no0.jpg";
         ivt.Okimg = "btn_ok0.jpg";
         LiveSupport.BLL.ChatPage cpg = new LiveSupport.BLL.ChatPage();
         cpg.State = LiveSupport.BLL.WebSiteManager.WebSite_Default;
         cpg.ChatPageBGImg = "chat_bg0.gif";
         cpg.ChatPageRightImg = "right_column_0.jpg";
         cpg.LeavePageTopImg = "topmove1.gif";
         nwst.banners = bnr;
         nwst.invites = ivt;
         nwst.chatpage = cpg;
         nwst.accountId = oepr.Account.AccountId;
         nwst.icoLocation = "0";
         nwst.domainName = this.txtDomainName.Text;
         if (WebSiteManager.AddNewWebSite(nwst))
         {
             Response.Redirect("GetCode.aspx?domain=" + this.txtDomainName.Text);
         }
     }
     else
     {
         Response.Redirect("../Default.aspx");
     }
 }
예제 #2
0
 //添加域名
 protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
 {
     if (Session["User"] != null)
     {
         oepr = (Operator)Session["User"];
         if (WebSiteManager.GetWebSiteByDomainName(this.txtDomainName.Text) != null)
         {
             ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script>alert('域名存在');</script>");
             return;
         }
         LiveSupport.BLL.NewWebSite nwst = new LiveSupport.BLL.NewWebSite();
         LiveSupport.BLL.Banner     bnr  = new LiveSupport.BLL.Banner();
         bnr.State   = LiveSupport.BLL.WebSiteManager.WebSite_Default;
         bnr.Offline = "offline0.JPG";
         bnr.Online  = "online0.JPG";
         LiveSupport.BLL.Invite ivt = new LiveSupport.BLL.Invite();
         ivt.State = LiveSupport.BLL.WebSiteManager.WebSite_Default;
         ivt.Bgimg = "invite_bg0.gif";
         ivt.Noimg = "btn_no0.jpg";
         ivt.Okimg = "btn_ok0.jpg";
         LiveSupport.BLL.ChatPage cpg = new LiveSupport.BLL.ChatPage();
         cpg.State            = LiveSupport.BLL.WebSiteManager.WebSite_Default;
         cpg.ChatPageBGImg    = "chat_bg0.gif";
         cpg.ChatPageRightImg = "right_column_0.jpg";
         cpg.LeavePageTopImg  = "topmove1.gif";
         nwst.banners         = bnr;
         nwst.invites         = ivt;
         nwst.chatpage        = cpg;
         nwst.accountId       = oepr.Account.AccountId;
         nwst.icoLocation     = "0";
         nwst.domainName      = this.txtDomainName.Text;
         if (WebSiteManager.AddNewWebSite(nwst))
         {
             Response.Redirect("GetCode.aspx?domain=" + this.txtDomainName.Text);
         }
     }
     else
     {
         Response.Redirect("../Default.aspx");
     }
 }
예제 #3
0
 //取一行数据
 public static NewWebSite GetNewWebSiteByDomainName(string domainName)
 {
     WebSite website=Provider.GetModel(domainName);
     if (website == null)
     {
         return null;
     }
     NewWebSite nwbt = new NewWebSite();
     string[] bannerStyle = website.IconStyle.Split('|');
     Banner ban = new Banner();
     if (newWebSiteState(bannerStyle[0])&&bannerStyle.Length==IconStyleLength)
     {
         ban.State = bannerStyle[0];
         ban.Online = bannerStyle[1];
         ban.Offline = bannerStyle[2];
     }
     nwbt.banners = ban;
     Invite ivt = new Invite();
     string[] invateStyle = website.InviteStyle.Split('|');
     if (newWebSiteState(invateStyle[0])&&invateStyle.Length==InviteStyleLength)
     {
         ivt.State = invateStyle[0];
         ivt.Bgimg = invateStyle[1];
         ivt.Okimg = invateStyle[2];
         ivt.Noimg = invateStyle[3];
     }
     nwbt.invites = ivt;
     ChatPage cpe = new ChatPage();
     string[] chatPageStyle = website.ChatStyle.Split('|');
     if (newWebSiteState(chatPageStyle[0])&&chatPageStyle.Length==ChatStyleLength)
     {
         cpe.State = chatPageStyle[0];
         cpe.ChatPageBGImg = chatPageStyle[1];
         cpe.ChatPageRightImg = chatPageStyle[2];
         cpe.LeavePageTopImg = chatPageStyle[3];
     }
     nwbt.chatpage = cpe;
     nwbt.companyName=website.CompanyName;
     nwbt.accountId = website.RegisterId;
     nwbt.icoLocation = website.IcoLocation;
     nwbt.domainName = website.DomainName;
     return nwbt;
 }