public void AddTargetApps(dynamic param) { try { TargetAppsRepo rp = new TargetAppsRepo(); TargetApps ta = new TargetApps(); ta.Name = param.FilterParameter.Name.ToString(); ta.TargetUrl = param.FilterParameter.TargetUrl.ToString(); ta.TimeInterval = Convert.ToInt32(param.FilterParameter.TimeInterval.ToString()); ta.IntervalType = param.FilterParameter.IntervalType.ToString(); ta.UserLoginID = Convert.ToInt32(param.FilterParameter.UserLoginID.ToString()); if (!string.IsNullOrEmpty(ta.Name) && !string.IsNullOrEmpty(ta.TargetUrl) && !string.IsNullOrEmpty(ta.TimeInterval.ToString()) && !string.IsNullOrEmpty(ta.IntervalType) && !string.IsNullOrEmpty(ta.UserLoginID.ToString())) { rp.Insert(ta); } } catch (Exception ex) { DBLogger loger = new DBLogger(Convert.ToInt32(param.FilterParameter.UserLoginID)); loger.LogMessage = "Apı => AddTargetApps => Exception : " + ex.Message; LogManager lm = new LogManager(loger); lm.LogMe(); } }
public void DeleteTargetAppsByID(dynamic param) { try { TargetAppsRepo rp = new TargetAppsRepo(); int ID = Convert.ToInt32(param.FilterParameter.ID); rp.DeleteByID(ID); } catch (Exception ex) { DBLogger loger = new DBLogger(Convert.ToInt32(param.FilterParameter.UserLoginID)); loger.LogMessage = "Apı => DeleteTargetAppsByID => Exception : " + ex.Message; LogManager lm = new LogManager(loger); lm.LogMe(); } }
public List <TargetApps> GetTargetAppList(dynamic param) { List <TargetApps> _TargetApps = new List <TargetApps>(); try { TargetAppsRepo rp = new TargetAppsRepo(); _TargetApps = rp.GetAll().Where(p => p.UserLoginID == Convert.ToInt32(param.FilterParameter.UserLoginID)).ToList(); } catch (Exception ex) { DBLogger loger = new DBLogger(Convert.ToInt32(param.FilterParameter.UserLoginID)); loger.LogMessage = "Apı => GetTargetAppList => Exception : " + ex.Message; LogManager lm = new LogManager(loger); lm.LogMe(); } return(_TargetApps); }
public void UpdateTargetApps(dynamic param) { try { TargetAppsRepo rp = new TargetAppsRepo(); TargetApps ta = new TargetApps(); ta.ID = Convert.ToInt32(param.FilterParameter.ID.ToString()); ta.Name = param.FilterParameter.Name.ToString(); ta.TargetUrl = param.FilterParameter.TargetUrl.ToString(); ta.TimeInterval = Convert.ToInt32(param.FilterParameter.TimeInterval.ToString()); ta.IntervalType = param.FilterParameter.IntervalType.ToString(); ta.UserLoginID = Convert.ToInt32(param.FilterParameter.UserLoginID.ToString()); rp.Update(ta); } catch (Exception ex) { DBLogger loger = new DBLogger(Convert.ToInt32(param.FilterParameter.UserLoginID)); loger.LogMessage = "Apı => UpdateTargetApps => Exception : " + ex.Message; LogManager lm = new LogManager(loger); lm.LogMe(); } }