public IHttpActionResult GetGroupDevices(string gorupId) { try { //User Info var login = GetUserInfo(); //查詢參數 var opt = new QueryOption { Relation = true, Plan = new QueryPlan() { Join = "Detail" } }; var condition = new GroupService { GROUP_SN = gorupId }; var bll = GenericBusinessFactory.CreateInstance <GroupService>(); var output = bll.GetList(opt, login, condition); return(Ok(output)); } catch (Exception ex) { return(Content(HttpStatusCode.InternalServerError, ex.Message)); } }
/// <summary> /// 儲存 /// </summary> /// <param name="repair">維修登記資訊</param> private Repair Save(Repair repair) { var login = GetUserInfo(); var bll = GenericBusinessFactory.CreateInstance <Repair>(); return((bll as Repair_BLL).Save(repair, login)); }
/// <summary> /// 數學所參數設定取得 /// </summary> /// <returns></returns> private ConfigParams GetConfigParams() { var bll = GenericBusinessFactory.CreateInstance <ConfigParams>(); var condition = new ConfigParams { SYSTEM_NAME = "MATH_SETTING", PARAMETER_NAME = "PORT_NOTIFICATION" }; return(bll.Get(new QueryOption(), new UserLogin(), condition)); }
public IHttpActionResult GetUser() { try { //User Info var login = GetUserInfo(); //查詢參數 var opt = new QueryOption { Relation = true, User = true }; var bll = GenericBusinessFactory.CreateInstance <User>(); var output = bll.Get(opt, login, null); return(Ok(output)); } catch (Exception ex) { return(Content(HttpStatusCode.InternalServerError, ex.Message)); } }
/// <summary> /// 監控項目資訊取得 /// </summary> /// <param name="deviceSn">設備編號</param> /// <param name="targetName">監控項目名稱</param> /// <returns></returns> protected virtual Target GetTarget(string deviceSn, string targetName) { var bll = GenericBusinessFactory.CreateInstance <Target>(); return((bll as Target_BLL).GetTarget(_detector, deviceSn, targetName)); }
/// <summary> /// 設備取得 /// </summary> /// <param name="deviceId">設備識別碼</param> /// <param name="deviceType">設備類型</param> /// <returns></returns> protected virtual Device GetDevice(string deviceId) { var bll = GenericBusinessFactory.CreateInstance <Device>(); return((bll as Device_BLL).GetDevice(deviceId, _deviceType)); }
/// <summary> /// 多筆儲存 /// </summary> protected virtual void SaveList() { var bll = GenericBusinessFactory.CreateInstance <Monitor>(); (bll as Monitor_BLL).SaveList(Monitors); }
/// <summary> /// 通知記錄取得 /// </summary> /// <param name="monitor">監控資訊</param> /// <param name="condition">通知條件</param> /// <returns></returns> protected virtual Notification GetNotificationRecord(Monitor monitor, NotificationCondition condition) { var bll = GenericBusinessFactory.CreateInstance <Notification>(); return((bll as Notification_BLL).GetRecord(monitor, condition)); }
/// <summary> /// 通知條件取得 /// </summary> /// <param name="deviceSn">設備編號</param> /// <returns></returns> protected virtual NotificationCondition GetNotificationCondition(string deviceSn) { var bll = GenericBusinessFactory.CreateInstance <NotificationCondition>(); return((bll as NotificationCondition_BLL).GetNotificationCondition(deviceSn)); }
/// <summary> /// 前次監控訊息取得 /// </summary> /// <param name="monitor">當前監控訊息</param> /// <returns></returns> protected virtual Monitor GetPreviousMonitor(Monitor monitor) { var bll = GenericBusinessFactory.CreateInstance <Monitor>(); return((bll as Monitor_BLL).GetPreviousMonitor(monitor)); }
/// <summary> /// 通知待檢查監控資訊清單 /// </summary> /// <returns></returns> protected virtual List <Monitor> GetMonitors() { var bll = GenericBusinessFactory.CreateInstance <Monitor>(); return((bll as Monitor_BLL).GetNotificationMonitors()); }
protected List <GroupDevice> GetGroups() { var bll = GenericBusinessFactory.CreateInstance <GroupDevice>(); return((bll as GroupDevice_BLL).GetGroups(Notification.DEVICE_SN)); }
private CameraSetting GetCameraSetting() { var bll = GenericBusinessFactory.CreateInstance <CameraSetting>(); return(bll.Get(new QueryOption(), new UserLogin())); }
private Device GetDevice() { var bll = GenericBusinessFactory.CreateInstance <Device>(); return((bll as Device_BLL).GetDevice(_repair.DEVICE_SN)); }
/// <summary> /// 通知儲存 /// </summary> /// <param name="data">實體資料</param> private void Save(List <Notification> data) { var bll = GenericBusinessFactory.CreateInstance <Notification>(); data.ForEach(x => (bll as Notification_BLL).Update(x)); }
/// <summary> /// 待通知清單取得 /// </summary> /// <returns></returns> private List <Notification> GetNotifications() { var bll = GenericBusinessFactory.CreateInstance <Notification>(); return((bll as Notification_BLL).GetPendingNotifications()); }