Example #1
0
        //Site
        internal static SiteRow DsSiteData_newRow(SiteInputMapping elem)
        {
            SiteRow rows = _DSSiteData.Site.FindByUrl(elem.Url);

            if (rows != null)
            {
                return(rows);
            }
            rows = DsSiteData_newRow();
            FromInputSiteToRow(elem, ref rows);
            return(rows);
        }  //Site
Example #2
0
 public static bool AddSite(SiteInputMapping elem)
 {
     try
     {
         SiteRow row = DbManagement.DsSiteData_newRow(elem);
         DbManagement.LottoDs_addRow(row);
         DbManagement.SiteAllRow();
         return(true);
     }
     catch (Exception EX)
     {
         throw EX;
     }
 }
 public IActionResult AddSite([FromBody] SiteInputMapping dataAction)
 {
     try
     {
         // return JsonConvert.SerializeObject(InteractiveDB.GetAllSite());
         //          SiteInputMapping newElem = JsonConvert.DeserializeObject<SiteInputMapping>(SiteData);
         return(Ok(InteractiveDB.AddSite(dataAction)));
     }
     catch (Exception ex)
     {
         logger.LogError(ex.ToString());
         return(BadRequest(ex.ToString()));
     };//in un ambiante professionale si deve gestire meglio
 }