public ActionResult Add(ApartmentEditor ae)
 {
     if (HttpContext.Request.HttpMethod == "POST")
     {
         try
         {
             if (ae.Href2 != null)
             {
                 string path = Path.Combine(Server.MapPath("~/Content/Photos"), Path.GetFileName(ae.Href2.FileName));
                 ae.Href2.SaveAs(path);
                 ae.Href1 = "~/Content/Photos/" + Path.GetFileName(ae.Href2.FileName);
             }
             ViewBag.FileStatus = "File uploaded successfully.";
         }
         catch (Exception)
         {
             ViewBag.FileStatus = "Error while file uploading.";
         }
         if (ae.Forcheck != null && ae.Forcheck.Length == 1)
         {
             ae.NotAppliable = true;
         }
         else
         {
             ae.NotAppliable = false;
         }
         _myBll.AddApartment(ae);
         return(View());
     }
     return(View());
 }