protected void SosyalMedyaLink(AnalitikBilisimSite.Model.Entities.Contact contact, Common common)
 {
     try
     {
         Facebook = contact.Facebook;
     }
     catch (Exception)
     {
         Facebook = "#";
     }
     try
     {
         Twitter = contact.Twitter;
     }
     catch (Exception)
     {
         Twitter = "#";
     }
     try
     {
         Youtube = contact.Youtube;
     }
     catch (Exception)
     {
         Youtube = "#";
     }
     try
     {
         Google = contact.Google;
     }
     catch (Exception)
     {
         Google = "#";
     }
     try
     {
         Linkedin = contact.Linkedin;
     }
     catch (Exception)
     {
         Linkedin = "#";
     }
     try
     {
         Instagram = contact.Instagram;
     }
     catch (Exception)
     {
         Instagram = "#";
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                int contactID = (from c in db.Contact select c.ID).FirstOrDefault();
                AnalitikBilisimSite.Model.Entities.Contact contact = _contactService.Get(contactID);

                string phone = contact.Phone;
                for (int i = 0; i < phone.Length * 2; i++)
                {
                    if (i == 4 || i == 8 || i == 11)
                    {
                        phone = phone.Insert(i, " ");
                    }
                }

                lblPhone.Text   = phone;
                lblMail.Text    = contact.Email;
                lblAddress.Text = contact.Address;
                Map             = contact.GoogleMap;

                lblContactTitle.Text = Localization.İletişimPage;
                lblAddressTitle.Text = Localization.Adres;
                lblPhoneTitle.Text   = Localization.Telefon;
                lblMailTitle.Text    = Localization.Mail;
                Name    = Localization.İsim;
                Subject = Localization.Konu;
                Message = Localization.Mesaj;
                txtName.Attributes.Add("placeholder", Name);
                txtMail.Attributes.Add("placeholder", Localization.Mail);
                txtSubject.Attributes.Add("placeholder", Subject);
                txtMessage.Attributes.Add("placeholder", Message);
                btnMessage.Text  = Localization.MesajGonder;
                lblUyari.Visible = false;
            }
            catch (Exception)
            {
                throw;
            }
            ((MasterPage)this.Master).ContactMenu = "menu-active";
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    int contactID = (from con in db.Contact select con.ID).FirstOrDefault();
                    int commonID  = (from com in db.Common select com.ID).FirstOrDefault();

                    AnalitikBilisimSite.Model.Entities.Contact contact = _contactService.Get(contactID);
                    AnalitikBilisimSite.Model.Entities.Common  common  = _commonService.Get(commonID);

                    SosyalMedyaLink(contact, common);

                    ImgLogo.ImageUrl      = common.Logo;
                    lblFooterAddress.Text = contact.Address;
                    lblFooterMail.Text    = contact.Email;
                    lblFooterPhone.Text   = contact.Phone;

                    KayanHaber = KayanYaziHaber();

                    ImgEnglish.ImageUrl = (from l in db.Language
                                           where l.Code == "en-EN" && l.IsActive == true
                                           select l.Logo).FirstOrDefault();
                    ImgTurkish.ImageUrl = (from l in db.Language
                                           where l.Code == "tr-TR" && l.IsActive == true
                                           select l.Logo).FirstOrDefault();
                    DropDownMenu();

                    lblAnasayfa.Text            = Localization.Anasayfa;
                    lblHakkimizda.Text          = Localization.Hakkımızda;
                    lblHizmetlerimiz.Text       = Localization.Hizmetlerimiz;
                    lblCozumlerimiz.Text        = Localization.Çözümlerimiz;
                    lblHaberler.Text            = Localization.Haberler;
                    lblReferanslar.Text         = Localization.Referanslar;
                    lblIletişim.Text            = Localization.İletişim;
                    lblFooterWriting.Text       = Localization.FooterYazı;
                    lblFooterAnasayfa.Text      = Localization.Anasayfa;
                    lblFooterHakkimizda.Text    = Localization.Hakkımızda;
                    lblFooterHizmetlerimiz.Text = Localization.Hizmetlerimiz;
                    lblFooterCozumlerimiz.Text  = Localization.Çözümlerimiz;
                    lblFooterHaberler.Text      = Localization.Haberler;
                    lblIletişim.Text            = Localization.İletişim;
                    lblAddress.Text             = Localization.Adres;
                    lblPhone.Text           = Localization.Telefon;
                    lblMail.Text            = Localization.Mail;
                    lblFooterNewsTitle.Text = Localization.FooterHaber;
                    lblContactTitle.Text    = Localization.İletişim;

                    if ((Language)Session["dil"] != null)
                    {
                        Language language = (Language)Session["dil"];
                        if (language.Code == "tr-TR")
                        {
                            Localization.Culture = new System.Globalization.CultureInfo("");
                        }
                        else
                        {
                            Localization.Culture = new System.Globalization.CultureInfo("en-US");
                        }
                    }
                    else
                    {
                        Localization.Culture = new System.Globalization.CultureInfo("");
                    }
                }
                catch (Exception)
                {
                    throw;
                }
            }
        }