Esempio n. 1
0
        public ActionResult Manage([Bind(Include = "GeoTreeID,GeoName,GeoParentID,ImagePath")] GeoTree item, System.Web.HttpPostedFileBase UploadedFile)
        {
            item.ImagePath = SaveImage(new PetaPoco.Sql("Select ImagePath from GeoTree where GeoTreeId=@0", item.GeoTreeID), "GeoTree", item.GeoTreeID, UploadedFile);

            //Now save the new file
            return(base.BaseSave <GeoTree>(item, true, "Index", new { GeoId = item.GeoParentID }));
        }
Esempio n. 2
0
 public ActionResult AddGeo([Bind(Include = "GeoParentId,GeoName")] GeoTree item)
 {
     if (item.GeoParentID == 0)
     {
         item.GeoParentID = null;
     }
     return(base.BaseSave <GeoTree>(item, false, "Index", new { GeoId = item.GeoParentID }));
 }
Esempio n. 3
0
 public GeoShapeMappingDescriptor <T> Tree(GeoTree geoTree)
 {
     this._Mapping.Tree = geoTree;
     return(this);
 }
Esempio n. 4
0
 public GeoShapePropertyDescriptor <T> Tree(GeoTree tree) => Assign(a => a.Tree = tree);