Example #1
0
        void SetLogo(byte[] CompanyLogo, string LogoName)
        {
            AdminManagerSP ManagerObj = new AdminManagerSP();

            if (!ManagerObj.SaveCompanyLogo(CURRENT_USER.CompanyID, CURRENT_USER.UserId, CompanyLogo, LogoName))
            {
                Utils.ShowAlert(this, ManagerObj.GetLastError());
            }
            else
            {
                string base64ImageData = Convert.ToBase64String(CompanyLogo, 0, CompanyLogo.Length);
                img_Logo.ImageUrl = "data:image/png;base64," + base64ImageData;
            }
        }
Example #2
0
        /// <summary>
        /// Created by: Anoop
        ///         On: Jan 13th, 2017
        ///Description: To remove company logo for a HHA
        /// </summary>
        protected void btn_Remove_Click(object sender, EventArgs e)
        {
            try
            {
                bool           isSuccess; byte[] CompanyLogo = null;;
                AdminManagerSP ManagerObj = new AdminManagerSP();
                isSuccess = ManagerObj.SaveCompanyLogo(CURRENT_USER.CompanyID, CURRENT_USER.UserId, CompanyLogo, "");

                if (isSuccess == true)
                {
                    Utils.ShowAlert(this, "Company Logo Removed Successfully.");
                }
                else
                {
                    Utils.ShowAlert(this, "There is no logo present for the company");
                }
            }
            catch (Exception ee)
            {
                Utils.Write(ee);
            }
        }