Ejemplo n.º 1
0
        protected void Save_Btn_Click(object sender, EventArgs e)
        {
            M_UserInfo     mu     = buser.GetLogin();
            M_Design_Album aumMod = new M_Design_Album();

            if (Mid > 0)
            {
                aumMod = aumBll.SelReturnModel(Mid);
            }
            aumMod.AlbumName = AlbumName_T.Text.Trim();
            //albumMod.AlbumDesc = AlbumDesc_T.Text;
            aumMod.UseTlp = DataConverter.CLng(UseTlp_Hid.Value);
            aumMod.Music  = Request.Form["music_rad"];
            aumMod.Photos = Photos_Hid.Value.Trim('|');
            if (string.IsNullOrEmpty(aumMod.Photos))
            {
                function.WriteErrMsg("未指定相册图片");
            }
            if (aumMod.ID > 0)
            {
                aumBll.UpdateByID(aumMod);
            }
            else
            {
                aumMod.UserID = mu.UserID;
                aumMod.ID     = aumBll.Insert(aumMod);
            }
            Response.Redirect("mbview.aspx?id=" + aumMod.ID);
        }
Ejemplo n.º 2
0
 private void MyBind()
 {
     if (Mid > 0)
     {
         M_Design_Album aumMod = aumBll.SelReturnModel(Mid);
         AlbumName_T.Text = aumMod.AlbumName;
         Photos_Hid.Value = aumMod.Photos;
         UseTlp_Hid.Value = aumMod.UseTlp.ToString();
         function.Script(this, "setMusic('" + aumMod.Music + "');");
     }
     Music_RPT.DataSource = resBll.Search("", "", "music");
     Music_RPT.DataBind();
 }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         M_Design_Album albumMod = albumBll.SelReturnModel(Mid);
         M_UserInfo     mu       = buser.GetSelect(albumMod.UserID);
         string         username = mu.UserName;
         appMod = appBll.SelModelByUid(mu.UserID, "wechat");
         if (appMod != null)
         {
             wxMod = wxBll.SelForOpenid(1, appMod.OpenID);
             if (wxMod != null)
             {
                 username = wxMod.Name;
             }
         }
         albumMod.AlbumName += "-来自[" + username + "]的动力逐浪微相册";
         string html = SafeSC.ReadFileStr("/design/album/tlps/" + albumMod.UseTlp + "/photo.html");
         html = html.Replace("\"{album}\"", JsonConvert.SerializeObject(albumMod));
         Response.Clear(); Response.Write(html); Response.End();
     }
 }