protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { try { int aboutID = (from a in db.About select a.ID).FirstOrDefault(); About about = _aboutService.Get(aboutID); txtBaslik.Text = about.Title; txtKucukYazi.Text = about.SmallWriting; txtBuyukYazi.Text = about.BigWriting; txtMissionTitle.Text = about.MissionTitle; txtMssionWriting.Text = about.MissionWriting; txtPlanTitle.Text = about.PlanTitle; txtPlanWriting.Text = about.PlanWriting; txtVisionTitle.Text = about.VisionTitle; txtVisionWriting.Text = about.VisionWriting; if (about.Image != "") { string Image = about.Image; string subImage = Image.Substring(9, Convert.ToInt32(Image.Length) - 9); ImgAbout.ImageUrl = subImage; lblInfo.Text = Image; } if (about.MissionImage != "") { string Image = about.MissionImage; string subImage = Image.Substring(9, Convert.ToInt32(Image.Length) - 9); ImageMission.ImageUrl = subImage; lblInfo1.Text = Image; } if (about.PlanImage != "") { string Image = about.PlanImage; string subImage = Image.Substring(9, Convert.ToInt32(Image.Length) - 9); ImagePlan.ImageUrl = subImage; lblInfo2.Text = Image; } if (about.VisionImage != "") { string Image = about.VisionImage; string subImage = Image.Substring(9, Convert.ToInt32(Image.Length) - 9); ImageVision.ImageUrl = subImage; lblInfo3.Text = Image; } //if (!about.IsActive) //{ // RadioButtonList1.Items[1].Selected = true; //} pnlAlert.Visible = false; } catch (Exception) { Uyari("Bilgiler getirilirken bir hata oluştu", false); pnlAlert.Visible = true; } } ((Master)this.Master).Path = "Hakkımızda"; ((Master)this.Master).PathLink = "AboutPage.aspx"; }
public ActionResult Edit(int id = 0) { About about = _aboutService.Get(id); if (about == null) { return(HttpNotFound()); } return(View(about)); }
protected void Doldur(int aboutID) { AnalitikBilisimSite.Model.Entities.About about = _aboutService.Get(aboutID); lblAboutTitle.Text = about.Title; lblAboutWriting.Text = about.BigWriting; lblMissionTitle.Text = about.MissionTitle; lblMissionWriting.Text = about.MissionWriting; lblPlanTitle.Text = about.PlanTitle; lblPlanWriting.Text = about.PlanWriting; lblVisionTitle.Text = about.VisionTitle; lblVisionWriting.Text = about.VisionWriting; ImgMission.ImageUrl = about.MissionImage; ImgPlan.ImageUrl = about.PlanImage; ImgVision.ImageUrl = about.VisionImage; }
public IActionResult Get() { var jsonData = aboutService.Get(); return(Ok(jsonData.Result)); }