Ejemplo n.º 1
0
 public void SaveBanner(FormCollection form, string fileName, ResultObject result_object)
 {
     this.Model.page_id   = Convert.ToInt32(form.GetValue("page_id").AttemptedValue);
     this.Model.banner_id = Convert.ToInt32(form.GetValue("banner_id").AttemptedValue);
     if (form.GetValue("header_text") != null)
     {
         this.Model.headertext = string.IsNullOrEmpty(form.GetValue("header_text").AttemptedValue) ? "" : form.GetValue("header_text").AttemptedValue;
     }
     if (form.GetValue("sub_text") != null)
     {
         this.Model.subtext = string.IsNullOrEmpty(form.GetValue("sub_text").AttemptedValue) ? "" : form.GetValue("sub_text").AttemptedValue;
     }
     this.Model.image_url    = fileName;
     result_object.ipAddress = Dns.GetHostByName(Dns.GetHostName()).AddressList[0].ToString();
     _pageAction_BL.SaveBanner(this.Model, result_object);
 }