protected void Button1_Click(object sender, EventArgs e) { try { bool isSave = false; if (FileUpload1.HasFile) { FileUpload1.SaveAs(Server.MapPath("/Images/") + FileUpload1.FileName.Replace(' ', '_')); isSave = true; } else { Response.Write("Dosya Yükleme Hatası"); } if (isSave) { var mission = new Mission() { Description = txtIcerik.Content, ImageUrl = FileUpload1.FileName.Replace(' ', '_'), Title = txtBaslik.Text }; _companyBusiness = new CompanyBusiness(); _companyBusiness.UpdateMissionInformation(mission); lblInfo.Text = "İşlem Bşarılı Bir Şekilde Gerçekleşti"; } } catch (Exception exception) { lblInfo.Text = "Hata Olustu. Hata : " + exception.Message; } }
public Company_Company() { _companyBusiness= new CompanyBusiness(); }