public Object ViewRecord(Int64 SiteId) { SiteView vwsite = new SiteView(); try { vwsite = DAL.DALSite.SiteView(SiteId.ToString()); } catch (Exception ex) { throw; } return vwsite; }
public static SiteView SiteView(String SiteID) { try { SiteView site = new SiteView(); using (var context = new SycousCon()) { try { var parmode = new SqlParameter { ParameterName = "mode", Value = 1, Direction = ParameterDirection.Input }; var parsite = new SqlParameter { ParameterName = "SiteID", Value = SiteID, Direction = ParameterDirection.Input }; site = context.ExecuteStoreQuery<SiteView>("exec SiteDetails @mode,@SiteID", parmode, parsite).FirstOrDefault(); } catch (Exception ex) { context.Dispose(); throw; } } return site; } catch (Exception ex) { throw; } }