コード例 #1
0
        void GetLogo()
        {
            byte[]         CompanyLogo = null;
            AdminManagerSP ManagerObj  = new AdminManagerSP();

            if (!ManagerObj.GetCompanyLogo(CURRENT_USER.CompanyID, CURRENT_USER.UserId, out CompanyLogo))
            {
                Utils.ShowAlert(this, ManagerObj.GetLastError());
            }
            else
            {
                if (CompanyLogo != null)
                {
                    string base64ImageData = Convert.ToBase64String(CompanyLogo, 0, CompanyLogo.Length);
                    img_Logo.ImageUrl = "data:image/png;base64," + base64ImageData;
                }
                else
                {
                    img_Logo.Visible = false;
                }
            }
        }