Пример #1
0
        protected void Save_Btn_Click(object sender, EventArgs e)
        {
            if (Mid > 0)
            {
                desMod = desBll.SelReturnModel(Mid);
            }
            else
            {
                desMod = new M_Logo_Design();
            }
            desMod.Alias       = Alias_T.Text;
            desMod.LogoContent = StrHelper.CompressString(Save_Hid.Value);
            ImgHelper imghelp = new ImgHelper();

            System.Drawing.Bitmap bmp = imghelp.Base64ToImg(Base64_Hid.Value);
            //用于减小尺寸
            desMod.PreviewImg = "data:image/png;base64," + imghelp.ImgToBase64ByImage(bmp);

            if (desMod.ID > 0)
            {
                desMod.ZType = 1; desBll.UpdateByID(desMod);
            }
            else
            {
                M_AdminInfo adminMod = B_Admin.GetLogin();
                desMod.ZType   = 1;
                desMod.ZStatus = 99;
                desMod.AdminID = adminMod.AdminId;
                desMod.ID      = desBll.Insert(desMod);
            }
            SnsHelper.UpdateModel(desMod.ID
                                  , new string[] { "BackGround" }
                                  , new string[] { BKUrl_T.Text.Trim() });
            function.WriteSuccessMsg("操作成功", "DesTlpList.aspx");
        }
Пример #2
0
 protected void Save_Btn_Click(object sender, EventArgs e)
 {
     desMod             = desBll.SelReturnModel(Mid);
     desMod.LogoContent = StrHelper.CompressString(Save_Hid.Value);
     desBll.UpdateByID(desMod);
     function.WriteSuccessMsg("操作成功,已保存至服务端");
 }
Пример #3
0
 protected void Save_Btn_Click(object sender, EventArgs e)
 {
     if (Mid > 0)
     {
         desMod = desBll.SelReturnModel(Mid);
     }
     else
     {
         desMod = new M_Logo_Design();
     }
     desMod.LogoContent = StrHelper.CompressString(Save_Hid.Value);
     desMod.PreviewImg  = Base64_Hid.Value;
     if (desMod.ID > 0)
     {
         desBll.UpdateByID(desMod);
     }
     else
     {
         desMod.ZType    = 0;
         desMod.ZStatus  = 99;
         desMod.UserID   = mu.UserID;
         desMod.UserName = mu.UserName;
         desMod.ID       = desBll.Insert(desMod);
     }
     function.WriteSuccessMsg("操作成功", "Design.aspx?ID=" + desMod.ID);
 }
Пример #4
0
    protected void Save_Btn_Click(object sender, EventArgs e)
    {
        int    Mid     = DataConvert.CLng(Mid_Hid.Value);
        string content = Content_Hid.Value;

        //-------------------

        desMod             = desBll.SelReturnModel(Mid);
        desMod.LogoContent = StrHelper.CompressString(Content_Hid.Value);
        desMod.ZStatus     = 99;
        desBll.UpdateByID(desMod);
        Response.Redirect(Request.RawUrl);
    }