Exemplo n.º 1
0
        public void StartLoadAboutDetail()
        {
            string tag = "[ucAbout][StartLoadAboutDetail]";

            var result = AboutsDAL.Get();

            if (result.Code < 0)
            {
                lbError.InnerText = result.ErrorMessage;
                lbError.Visible   = true;
                return;
            }

            lbError.Visible = false;
            try
            {
                AboutBOL about = new AboutBOL(result.Data.Tables[0].Rows[0]);
                hfId.Value         = about.Id.ToString();
                tbxNameVN.Text     = about.Name_VN;
                tbxNameEN.Text     = about.Name_EN;
                tbxAddress.Text    = about.Address_VN;
                tbxAddressEN.Text  = about.Address_EN;
                tbxFax.Text        = about.Fax;
                tbxPhone.Text      = about.Phone;
                tbxEmail.Text      = about.Email;
                tbxGoogleCode.Text = about.GoogleMaps;
            }
            catch (Exception ex)
            {
                LogHelpers.WriteException(tag, ex.ToString());
                //---
                lbError.InnerText = ex.Message;
                lbError.Visible   = true;
            }
        }
Exemplo n.º 2
0
        private void GetLogo()
        {
            ResultBOL <DataSet> result = AboutsDAL.Get();

            if (result.Code < 0)
            {
                _log.Error(result.ErrorMessage);
            }
            else if (result.Data != null && result.Data.Tables.Count > 0 && result.Data.Tables[0].Rows.Count > 0)
            {
                AboutBOL about = new AboutBOL(result.Data.Tables[0].Rows[0]);
                if (!string.IsNullOrEmpty(about.ImageLink))
                {
                    this.imgLogo.Src = "~/" + Path.Combine(Utilities.GetDirectory("ImagesDir"), about.ImageLink);
                }
            }
        }
Exemplo n.º 3
0
        public void StartLoadAboutDetail()
        {
            string tag = "[ucAbout][StartLoadAboutDetail]";

            var result = AboutsDAL.Get();

            if (result.Code < 0)
            {
                lbError.InnerText = result.ErrorMessage;
                lbError.Visible   = true;
                return;
            }

            lbError.Visible = false;
            try
            {
                AboutBOL about = new AboutBOL(result.Data.Tables[0].Rows[0]);
                hfId.Value         = about.Id.ToString();
                tbxNameVN.Text     = about.Name_VN;
                tbxNameEN.Text     = about.Name_EN;
                tbxAddress.Text    = about.Address_VN;
                tbxAddressEN.Text  = about.Address_EN;
                tbxFax.Text        = about.Fax;
                tbxPhone.Text      = about.Phone;
                tbxEmail.Text      = about.Email;
                tbxWebSite.Text    = about.WebSite;
                tbxGoogleCode.Text = about.GoogleMaps;
                if (!string.IsNullOrEmpty(about.ImageLink))
                {
                    imgImage.ImageUrl = "~/" + Path.Combine(Utilities.GetDirectory("ImagesDir"), about.ImageLink);
                }
            }
            catch (Exception ex)
            {
                LogHelpers.WriteException(tag, ex.ToString());
                //---
                lbError.InnerText = ex.Message;
                lbError.Visible   = true;
            }
        }