示例#1
0
 /// <summary>
 /// 加载所有指令档案
 /// </summary>
 /// <returns></returns>
 public static IList <CmdInfo> Load_Cmd()
 {
     try
     {
         IDbOperator     dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         DataTable       dtResult   = dbOperator.LoadDatas("Load_Cmd");
         IList <CmdInfo> CmdInfos   = ConnectConfigTool.TableToEntity <CmdInfo>(dtResult);
         return(CmdInfos);
     }
     catch (Exception ex)
     { throw ex; }
 }
示例#2
0
 /// <summary>
 /// 加载调度程序里配置信息
 /// </summary>
 /// <returns></returns>
 public static IList <DispatchAssembly> Load_DisptchAssembly()
 {
     try
     {
         IDbOperator dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         DataTable   dtResult   = dbOperator.LoadDatas("Load_DisptchAssembly");
         IList <DispatchAssembly> DispatchAssems = ConnectConfigTool.TableToEntity <DispatchAssembly>(dtResult);
         return(DispatchAssems);
     }
     catch (Exception ex)
     { throw ex; }
 }
示例#3
0
 /// <summary>
 /// 加载用户可操作按钮
 /// </summary>
 public static IList <SysOprButtonToCategory> LoadUserOprBtn(string UserID)
 {
     try
     {
         IDbOperator dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         Hashtable   hs         = new Hashtable();
         hs["UserID"] = UserID;
         DataTable dt = dbOperator.LoadDatas("QueryUserOperButttons", hs);
         return(ConnectConfigTool.TableToEntity <SysOprButtonToCategory>(dt));
     }
     catch (Exception ex)
     { throw ex; }
 }
示例#4
0
 /// <summary>
 /// 根据呼叫器ID加载呼叫器配置明细
 /// </summary>
 /// <param name="CallBoxID"></param>
 /// <returns></returns>
 public static IList <CallBoxDetail> LoadCallBoxDetails(int CallBoxID)
 {
     try
     {
         IDbOperator dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         Hashtable   dic        = new Hashtable();
         dic["CallBoxID"] = CallBoxID;
         DataTable dt = dbOperator.LoadDatas("LoadCallBoxDetails", dic);
         return(ConnectConfigTool.TableToEntity <CallBoxDetail>(dt));
     }
     catch (Exception ex)
     { throw ex; }
 }
示例#5
0
 /// <summary>
 /// 匹配线段配置
 /// </summary>
 /// <returns></returns>
 public static IList <RouteFragmentConfigInfo> Load_RouteFragment()
 {
     try
     {
         IDbOperator dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         Hashtable   hs         = new Hashtable();
         DataTable   dtResult   = dbOperator.LoadDatas("Load_RouteFragment");
         IList <RouteFragmentConfigInfo> RouteFragmens = ConnectConfigTool.TableToEntity <RouteFragmentConfigInfo>(dtResult);
         return(RouteFragmens);
     }
     catch (Exception ex)
     { throw ex; }
 }
示例#6
0
 /// <summary>
 /// 加载所有的车辆信息
 /// </summary>
 /// <returns></returns>
 public static IList <CarInfo> LoadCarShap()
 {
     try
     {
         IDbOperator     dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         Hashtable       hs         = new Hashtable();
         DataTable       dt         = dbOperator.LoadDatas("LoadAGVAchive", hs);
         IList <CarInfo> Cars       = ConnectConfigTool.TableToEntity <CarInfo>(dt);
         return(Cars);
     }
     catch (Exception ex)
     { throw ex; }
 }
示例#7
0
 /// <summary>
 /// 加载所有的地标
 /// </summary>
 /// <returns></returns>
 public static IList <LandMarkShap> LoadLandShaps()
 {
     try
     {
         IDbOperator          dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         Hashtable            hs         = new Hashtable();
         DataTable            dt         = dbOperator.LoadDatas("getLandMarks", hs);
         IList <LandMarkShap> lands      = ConnectConfigTool.TableToEntity <LandMarkShap>(dt);
         return(lands);
     }
     catch (Exception ex)
     { throw ex; }
 }
示例#8
0
 /// <summary>
 /// 根据任务配置明细加载其必经地标档案
 /// </summary>
 /// <returns></returns>
 public static IList <TaskConfigMustPass> LoadTaskMustPass(string TaskConditonCode, int TaskConfigDetailID)
 {
     try
     {
         IDbOperator dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         Hashtable   dic        = new Hashtable();
         dic["TaskConditonCode"]   = TaskConditonCode;
         dic["TaskConfigDetailID"] = TaskConfigDetailID;
         DataTable dt = dbOperator.LoadDatas("LoadTaskMustPass", dic);
         return(ConnectConfigTool.TableToEntity <TaskConfigMustPass>(dt));
     }
     catch (Exception ex)
     { throw ex; }
 }
示例#9
0
 public static IList <TraJunctionSegInfo> QueryJunctionSeg(int TraJunctionID)
 {
     try
     {
         IDbOperator dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         Hashtable   hs         = new Hashtable();
         hs["TraJunctionID"] = TraJunctionID;
         DataTable dt = dbOperator.LoadDatas("QueryJunctionSeg", hs);
         IList <TraJunctionSegInfo> segs = ConnectConfigTool.TableToEntity <TraJunctionSegInfo>(dt);
         return(segs);
     }
     catch (Exception e)
     { throw e; }
 }
示例#10
0
 /// <summary>
 /// 根据任务明细查询相应必经地标的动作档案信息
 /// </summary>
 /// <returns></returns>
 public static IList <TaskConfigMustPass> LoadIOActiones(string TaskConditonCode, int TaskConfigDetailID)
 {
     try
     {
         IDbOperator dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         Hashtable   hs         = new Hashtable();
         hs["TaskConditonCode"]   = TaskConditonCode;
         hs["TaskConfigDetailID"] = TaskConfigDetailID;
         DataTable dtResult = dbOperator.LoadDatas("LoadMustPassbyConditonCode");
         IList <TaskConfigMustPass> TaskConfigMustPasses = ConnectConfigTool.TableToEntity <TaskConfigMustPass>(dtResult);
         return(TaskConfigMustPasses);
     }
     catch (Exception ex)
     { throw ex; }
 }
示例#11
0
 /// <summary>
 /// 根据IO动作ID加载对应的IO动作信息
 /// </summary>
 public static DispatchTaskInfo LoadTaskByNo(string No)
 {
     try
     {
         IDbOperator dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         Hashtable   hs         = new Hashtable();
         hs["dispatchNo"] = No;
         DataTable dt = dbOperator.LoadDatas("LoadTaskByNo", hs);
         IList <DispatchTaskInfo> Tasks = ConnectConfigTool.TableToEntity <DispatchTaskInfo>(dt);
         if (Tasks != null && Tasks.Count > 0)
         {
             return(Tasks.FirstOrDefault());
         }
         else
         {
             return(null);
         }
     }
     catch (Exception e)
     { throw e; }
 }
示例#12
0
 /// <summary>
 /// 根据呼叫器ID加载呼叫器信息
 /// </summary>
 /// <param name="BoxID"></param>
 /// <returns></returns>
 public static CallBoxInfo LoadAllCallBoxByID(int BoxID)
 {
     try
     {
         IDbOperator dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         Hashtable   dic        = new Hashtable();
         dic["CallBoxID"] = BoxID;
         DataTable           dt           = dbOperator.LoadDatas("LoadCallBoxByID", dic);
         IList <CallBoxInfo> CallBoxInfos = ConnectConfigTool.TableToEntity <CallBoxInfo>(dt);
         if (CallBoxInfos == null || (CallBoxInfos != null && CallBoxInfos.Count <= 0))
         {
             return(null);
         }
         else
         {
             return(CallBoxInfos.FirstOrDefault());
         }
     }
     catch (Exception ex)
     { throw ex; }
 }
示例#13
0
 /// <summary>
 /// 根据IO动作ID加载对应的IO动作信息
 /// </summary>
 public static IOActionInfo LoadAllIOAction(int IOActionID)
 {
     try
     {
         IDbOperator dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         Hashtable   hs         = new Hashtable();
         hs["IOActionID"] = IOActionID;
         DataTable            dt         = dbOperator.LoadDatas("LoadIOActionByID");
         IList <IOActionInfo> IOActiones = ConnectConfigTool.TableToEntity <IOActionInfo>(dt);
         if (IOActiones != null && IOActiones.Count > 0)
         {
             return(IOActiones.FirstOrDefault());
         }
         else
         {
             return(null);
         }
     }
     catch (Exception e)
     { throw e; }
 }
示例#14
0
 /// <summary>
 /// 根据条件加载任务明细
 /// </summary>
 /// <returns></returns>
 public static DispatchTaskDetail LoadTaskDetailByNo(string disPatchNo, int DetailID)
 {
     try
     {
         IDbOperator dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         Hashtable   dic        = new Hashtable();
         dic["dispatchNo"] = disPatchNo;
         dic["DetailID"]   = DetailID;
         DataTable dtTaskDetailInfo            = dbOperator.LoadDatas("LoadTaskDetailByNo", dic);
         IList <DispatchTaskDetail> TaskDetail = ConnectConfigTool.TableToEntity <DispatchTaskDetail>(dtTaskDetailInfo);
         if (TaskDetail != null && TaskDetail.Count > 0)
         {
             return(TaskDetail[0]);
         }
         else
         {
             return(null);
         }
     }
     catch (Exception ex)
     { throw ex; }
 }
示例#15
0
 /// <summary>
 /// 根据条件加载任务信息
 /// </summary>
 public static IList <DispatchTaskInfo> LoadDispatchTask(string Condition)
 {
     try
     {
         IDbOperator dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         Hashtable   dic        = new Hashtable();
         dic["TaskState"] = Condition;
         dic["CurrDate"]  = DateTime.Now.ToString("yyyyMMdd");
         dic["PreDate"]   = DateTime.Now.AddDays(-1).ToString("yyyyMMdd");
         DataTable dtTaskInfo           = dbOperator.LoadDatas("LoadTaskInfo", dic);
         IList <DispatchTaskInfo> Tasks = ConnectConfigTool.TableToEntity <DispatchTaskInfo>(dtTaskInfo);
         foreach (DispatchTaskInfo item in Tasks)
         {
             dic["dispatchNo"] = item.dispatchNo;
             DataTable dtTaskDetail = dbOperator.LoadDatas("LoadTaskDetail", dic);
             IList <DispatchTaskDetail> TaskDetail = ConnectConfigTool.TableToEntity <DispatchTaskDetail>(dtTaskDetail);
             item.TaskDetail = TaskDetail;
         }
         return(Tasks);
     }
     catch (Exception ex)
     { throw ex; }
 }
示例#16
0
 /// <summary>
 /// 验证用于信息
 /// </summary>
 /// <returns></returns>
 public static UserInfo LoadUserInfo(string UserID, string PassWord)
 {
     try
     {
         IDbOperator dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         Hashtable   dic        = new Hashtable();
         dic["UserID"]   = UserID;
         dic["PassWord"] = PassWord;
         DataTable dtUser = dbOperator.LoadDatas("LoadUserInfo", dic);
         UserInfo  user   = null;
         if (dtUser != null && dtUser.Rows.Count > 0)
         {
             user = ConnectConfigTool.TableToEntity <UserInfo>(dtUser)[0];
             return(user);
         }
         else
         {
             return(null);
         }
     }
     catch (Exception ex)
     { throw ex; }
 }
示例#17
0
 public static DispatchTaskDetail GetTaskDetail(string No, int id)
 {
     try
     {
         IDbOperator dbOperator = CreateDbOperator.DbOperatorInstance(ConnectConfigTool.DBase);
         Hashtable   dic        = new Hashtable();
         dic["dispatchNo"]   = No;
         dic["TaskDetailID"] = id;
         DataTable          dtDetail = dbOperator.LoadDatas("GetTaskDetail", dic);
         DispatchTaskDetail detail   = null;
         if (dtDetail != null && dtDetail.Rows.Count > 0)
         {
             detail = ConnectConfigTool.TableToEntity <DispatchTaskDetail>(dtDetail)[0];
             return(detail);
         }
         else
         {
             return(null);
         }
     }
     catch (Exception ex)
     { throw ex; }
 }