Exemplo n.º 1
0
        private ObservableCollection<JuncMesage> GetData(int id)
        {
            var Datas = new ObservableCollection<JuncMesage>();

            SelectCmd scmd = new SelectCmd();
            JuncRev rev = new JuncRev();

            rev.ID = id;
            scmd.SetReceiver(rev);
            scmd.Execute();
            if (rev.ListJunc == null || rev.ListJunc.Count <= 0)
                return null;
            mJunc = rev.ListJunc.ElementAt(0);
            mJuncext = rev.ListJuncExt.ElementAt(0);

            Datas.Add(new JuncMesage { ItemName = "井盖名称", ValueName = mJunc.JuncName });
            Datas.Add(new JuncMesage { ItemName = "道路名称", ValueName = mJuncext.Lane_Way });
            Datas.Add(new JuncMesage { ItemName = "经度", ValueName = Convert.ToString(mJunc.X_Coor) });
            Datas.Add(new JuncMesage { ItemName = "纬度", ValueName = Convert.ToString(mJunc.Y_Coor) });
            Datas.Add(new JuncMesage { ItemName = "检查井类别", ValueName = GetCategoryName(mJunc.Junc_Category) });
            Datas.Add(new JuncMesage { ItemName = "检查井类型", ValueName = GetType(mJunc.Junc_Type) });
            Datas.Add(new JuncMesage { ItemName = "检查井形式", ValueName = GetStyle(mJunc.Junc_Style) });
            Datas.Add(new JuncMesage { ItemName = "井深", ValueName = GetDepth(mJunc.Depth) });

            Datas.Add(new JuncMesage { ItemName = "井盖所处的地面高程", ValueName = GetDepth(mJunc.Surface_Ele) });
            Datas.Add(new JuncMesage { ItemName = "数据来源", ValueName = GetDataSource(mJunc.DataSource) });
            Datas.Add(new JuncMesage { ItemName = "数据填报单位", ValueName = mJunc.ReportDept });
            Datas.Add(new JuncMesage { ItemName = "数据填报时间", ValueName = Convert.ToString(mJunc.Record_Date) });
            Datas.Add(new JuncMesage { ItemName = "管道是否暗接", ValueName = bool2str(mJunc.Junc_Darkjoint) });

            Datas.Add(new JuncMesage { ItemName = "污水是否直排", ValueName = bool2str(mJunc.Sewage_Line) });
            Datas.Add(new JuncMesage { ItemName = "井盖错误", ValueName = bool2str(mJunc.Junc_Error) });
            Datas.Add(new JuncMesage { ItemName = "CCTV检测编号", ValueName = mJunc.CCTV_CheckCode });
            Datas.Add(new JuncMesage { ItemName = "数据是否完整", ValueName = bool2str(mJunc.FullData) });
            Datas.Add(new JuncMesage { ItemName = "数据缺失原因", ValueName = mJunc.LoseReson });

            Datas.Add(new JuncMesage { ItemName = "A上游井口至管顶距离", ValueName = GetDepth(mJunc.Dis[0]) });
            Datas.Add(new JuncMesage { ItemName = "A上游井口至管底距离", ValueName = GetDepth(mJunc.Dis[1]) });
            Datas.Add(new JuncMesage { ItemName = "A下游井口至管顶距离", ValueName = GetDepth(mJunc.Dis[2]) });
            Datas.Add(new JuncMesage { ItemName = "A下游井口至管底距离", ValueName = GetDepth(mJunc.Dis[3]) });
            Datas.Add(new JuncMesage { ItemName = "B上游井口至管顶距离", ValueName = GetDepth(mJunc.Dis[4]) });
            Datas.Add(new JuncMesage { ItemName = "B上游井口至管底距离", ValueName = GetDepth(mJunc.Dis[5]) });
            Datas.Add(new JuncMesage { ItemName = "B下游井口至管顶距离", ValueName = GetDepth(mJunc.Dis[6]) });
            Datas.Add(new JuncMesage { ItemName = "B下游井口至管底距离", ValueName = GetDepth(mJunc.Dis[7]) });

            Datas.Add(new JuncMesage { ItemName = "备注", ValueName = mJuncext.Remark });


            return Datas;
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
//             CUser user = (CUser)(Assembly.Load(filepath).CreateInstance(filepath + ".DBClass." + "CUser"));
//             if (user != null)
//             {
//                 System.Console.WriteLine(user.ToString());
//                 System.Console.ReadLine();
//             }

            InsertCmd icmd = new InsertCmd();
            LoadCmd lcmd = new LoadCmd();
            SelectCmd scmd = new SelectCmd();
            UpdateCmd ucmd = new UpdateCmd();
            DeleteCmd dcmd = new DeleteCmd();
            ClearCmd ccmd = new ClearCmd();

#region test TUser
             
//             UserRev userrev = new UserRev();
//             CUser u = new CUser();
//             u.UserName = "******";
//             u.UserType = 1;
//             u.PassWord = "******";
//             List<CUser> listuser = new List<CUser>();
//             listuser.Add(u);
//             userrev.ListUser = listuser;
//             icmd.SetReceiver(userrev);
//             icmd.Execute();

//             lcmd.SetReceiver(userrev);
//             lcmd.Execute();
//             System.Console.WriteLine("Element number:{0}", userrev.ListUser.Count);

//             userrev.UserName = "******";
//             scmd.SetReceiver(userrev);
//             scmd.Execute();
//             System.Console.WriteLine("Element number:{0}", userrev.ListUser.Count);

//             userrev.ListUser.ElementAt(0).PassWord = "******";
//             ucmd.SetReceiver(userrev);
//             ucmd.Execute();

//             dcmd.SetReceiver(userrev);
//             dcmd.Execute();

//             ccmd.SetReceiver(userrev);
//             ccmd.Execute();
 
#endregion

#region test TSystemBase

            SystemRev sysrev = new SystemRev();

//             CSystemBase sysbase = new CSystemBase();
//             sysbase.SystemID = "2014722002";
//             sysbase.SysName = "test system name";
//             List<CSystemBase> list = new List<CSystemBase>();
//             list.Add(sysbase);
//             sysrev.SysList = list;
//             icmd.SetReceiver(sysrev);
//             icmd.Execute();

//             lcmd.SetReceiver(sysrev);
//             lcmd.Execute();
//             System.Console.WriteLine(sysrev.SysList.Count);
// 
//             dcmd.SetReceiver(sysrev);
//             dcmd.Execute();
#endregion

#region test PumpRev
            PumpRev prev = new PumpRev();
//             CPumpStationInfo pump = new CPumpStationInfo();
//             pump.PumpName = "testpum";
//             List<CPumpStationInfo> list = new List<CPumpStationInfo>();
//             list.Add(pump);
//             prev.ListPump = list;
//             icmd.SetReceiver(prev);
//             icmd.Execute();

//             lcmd.SetReceiver(prev);
//             lcmd.Execute();
//             System.Console.WriteLine(prev.ListPump.Count);

//             prev.PumpName = "testpum";
//             scmd.SetReceiver(prev);
//             scmd.Execute();
//             System.Console.WriteLine(prev.ListPump.Count);

//             prev.ListPump.ElementAt(0).PumpName = "Newname";
//             ucmd.SetReceiver(prev);
//             ucmd.Execute();

//             dcmd.SetReceiver(prev);
//             dcmd.Execute();

//             ccmd.SetReceiver(prev);
//             ccmd.Execute();

#endregion

#region test OutFallinfo
            OutFallRev orev = new OutFallRev();
//             COutFallInfo outfall = new COutFallInfo();
//             COutFallExtInfo outext = new COutFallExtInfo();
//             List<COutFallInfo> listoutfall = new List<COutFallInfo>();
//             List<COutFallExtInfo> listoutext = new List<COutFallExtInfo>();
//             outfall.Category = 1;
//             outfall.SystemID = "2014722001";
//             listoutfall.Add(outfall);
//             outext.OutFallName = "outfallname";
//             listoutext.Add(outext);
//             orev.OutList = listoutfall;
//             orev.OutExtList = listoutext;
//             icmd.SetReceiver(orev);
//             icmd.Execute();

//             lcmd.SetReceiver(orev);
//             lcmd.Execute();
//             System.Console.WriteLine("OutList Number: {0},OutlistExt NUmber : {1}",orev.OutList.Count,orev.OutExtList.Count);

//             orev.OutExtList.ElementAt(0).OutFallName = "New Name";
//             orev.OutList.ElementAt(0).ReportDept = "adasda";
//             ucmd.SetReceiver(orev);
//             ucmd.Execute();
//             dcmd.SetReceiver(orev);
//             dcmd.Execute();
            
#endregion

#region test junction
            JuncRev jrev = new JuncRev();
            //lcmd.SetReceiver(jrev);
            //lcmd.Execute();
            //Console.WriteLine(jrev.ListJunc.Count);
            //CJuncInfo junc = new CJuncInfo();
            //CJuncExtInfo junext = new CJuncExtInfo();
            //List<CJuncInfo> listjunc = new List<CJuncInfo>();
            //List<CJuncExtInfo> listjuncext = new List<CJuncExtInfo>();
            //junc.Junc_Style = 1;
            //junc.X_Coor = 119.1232443;
            //junc.Y_Coor = 21.123023123;
            //junext.Lane_Way = "way name";
            //listjuncext.Add(junext);
            //listjunc.Add(junc);
            //listjuncext.Add(junext);
            //jrev.ListJunc = listjunc;
            //icmd.SetReceiver(jrev);
            //icmd.Execute();

            jrev.JuncName = "ShiN-W1 / LongQ-W1";
            
            scmd.SetReceiver(jrev);
            scmd.Execute();
            System.Console.WriteLine(jrev.ListJunc.Count);

            //jrev.ListJunc.ElementAt(0).SystemID = "2102323";
            //jrev.ListJuncExt.ElementAt(0).Junc_Class = 2;
            //ucmd.SetReceiver(jrev);
            //ucmd.Execute();
            //dcmd.SetReceiver(jrev);
            //dcmd.Execute();
            //ccmd.SetReceiver(jrev);
            //ccmd.Execute();
#endregion

#region test pipe
            PipeRev piperev = new PipeRev();

//             lcmd.SetReceiver(piperev);
//             lcmd.Execute();
//             System.Console.WriteLine(piperev.ListPipe.Count);
//             CPipeInfo pipe = new CPipeInfo();
//             pipe.PipeName = "Y2-Y3";
//             List<CPipeInfo> listpipe = new List<CPipeInfo>();
//             listpipe.Add(pipe);
//             piperev.ListPipe = listpipe;
//             icmd.SetReceiver(piperev);
//             icmd.Execute();

            //piperev.PipeName = "Y1-Y2";
            //scmd.SetReceiver(piperev);
            //scmd.Execute();
            //System.Console.WriteLine(piperev.ListPipe.Count);
            //System.Console.WriteLine(piperev.ListPipeExt.Count);
            //System.Console.WriteLine(piperev.ListUS.Count);
            //System.Console.WriteLine(piperev.ListLog.Count);
            //System.Console.WriteLine(piperev.ListVideo.Count);

//             ucmd.SetReceiver(piperev);
//             ucmd.Execute();
            //piperev.ListLog.Clear();
            //piperev.ListPipeExt.Clear();
            //dcmd.SetReceiver(piperev);
            //dcmd.Execute();
#endregion

            System.Console.WriteLine("Done");
            System.Console.ReadLine();
        }
Exemplo n.º 3
0
        private ObservableCollection<Mesage> GetData(string pipename)
        {
            var Datas = new ObservableCollection<Mesage>();

            SelectCmd scmd = new SelectCmd();
            PipeRev pr = new PipeRev();
            pr.PipeName = pipename;
            scmd.SetReceiver(pr);
            scmd.Execute();
            if (pr.ListUS == null || pr.ListUS.Count <= 0)
                return null;

            mUSinfo = pr.ListUS.ElementAt(0);

            Datas.Add(new Mesage { ItemName = "排水管标识码", ValueName = pr.PipeName });
            Datas.Add(new Mesage { ItemName = "作业编号", ValueName = mUSinfo.JobID });
            Datas.Add(new Mesage { ItemName = "检测日期", ValueName = Convert.ToString(mUSinfo.DetectDate) });
            Datas.Add(new Mesage { ItemName = "检测单位", ValueName = mUSinfo.DetectDep });
            Datas.Add(new Mesage { ItemName = "检测操作人员", ValueName = mUSinfo.Detect_Person });
            Datas.Add(new Mesage { ItemName = "检测单位联系方式", ValueName = mUSinfo.Contacts });
            Datas.Add(new Mesage { ItemName = "检测方法", ValueName = GetCheckMethod(mUSinfo.Detect_Method) });
            Datas.Add(new Mesage { ItemName = "检测方向", ValueName = GetCheckDir(mUSinfo.Detect_Dir) });
            Datas.Add(new Mesage { ItemName = "封堵情况", ValueName = mUSinfo.Pipe_Stop });
            Datas.Add(new Mesage { ItemName = "功能性缺失", ValueName = GetFuncDef(mUSinfo.Func_Defect) });
            Datas.Add(new Mesage { ItemName = "功能性缺失等级", ValueName = GetClass(mUSinfo.Func_Class) });
            Datas.Add(new Mesage { ItemName = "结构性缺陷", ValueName = GetStructDef(mUSinfo.Strcut_Defect) });
            Datas.Add(new Mesage { ItemName = "结构性缺陷等级", ValueName = GetClass(mUSinfo.Struct_Class) });
            Datas.Add(new Mesage { ItemName = "修复指数RI", ValueName = Convert.ToString(mUSinfo.Repair_Index) });
            Datas.Add(new Mesage { ItemName = "养护指数MI", ValueName = Convert.ToString(mUSinfo.Matain_Index) });
            Datas.Add(new Mesage { ItemName = "缺陷描述", ValueName = mUSinfo.Problem });
            Datas.Add(new Mesage { ItemName = "检测影像文件的文件", ValueName = mUSinfo.Video_Filename });
            Datas.Add(new Mesage { ItemName = "数据填报单位", ValueName = Convert.ToString(mUSinfo.ReportDept) });
            Datas.Add(new Mesage { ItemName = "填报日期", ValueName = Convert.ToString(mUSinfo.ReportDate) });
            Datas.Add(new Mesage { ItemName = "数据是否完整", ValueName = bool2str(mUSinfo.DataIsFull) });
            Datas.Add(new Mesage { ItemName = "数据缺失原因", ValueName = mUSinfo.LoseReason });
            Datas.Add(new Mesage { ItemName = "备注", ValueName = mUSinfo.Remark });
            return Datas;
        }
Exemplo n.º 4
0
 private int GetJuncId(string name)
 {
     JuncRev jr = new JuncRev();
     jr.JuncName = name;
     SelectCmd scmd = new SelectCmd();
     scmd.SetReceiver(jr);
     scmd.Execute();
     CJuncInfo ji;
     if (jr.ListJunc != null && jr.ListJunc.Count >= 0)
         ji = jr.ListJunc.ElementAt(0);
     else
         throw new ExceptionProcess("找不到对应检查井");
     return ji.ID;
 }
Exemplo n.º 5
0
 private string GetJuncName(int id)
 {
     JuncRev jr = new JuncRev();
     jr.ID = id;
     SelectCmd scmd = new SelectCmd();
     scmd.SetReceiver(jr);
     scmd.Execute();
     CJuncInfo ji;
     if (jr.ListJunc != null && jr.ListJunc.Count >= 0)
         ji = jr.ListJunc.ElementAt(0);
     else
         return "";
     return ji.JuncName;
 }
Exemplo n.º 6
0
        private ObservableCollection<Mesage> GetData(string pipename)
        {
            var Datas = new ObservableCollection<Mesage>();

            SelectCmd scmd = new SelectCmd();
            PipeRev pr = new PipeRev();
            pr.PipeName = pipename;
            scmd.SetReceiver(pr);
            scmd.Execute();
            if (pr.ListPipe == null || pr.ListPipe.Count <= 0)
                return null;
            mPipeInfo  = pr.ListPipe.ElementAt(0);
            mPipeExtInfo = pr.ListPipeExt.ElementAt(0);


            Datas.Add(new Mesage { ItemName = "排水管标识码", ValueName = mPipeInfo.PipeName });
            Datas.Add(new Mesage { ItemName = "排水系统编码/路名", ValueName = mPipeExtInfo.Lane_Way });
            Datas.Add(new Mesage { ItemName = "管道类别", ValueName = GetCategoryName(mPipeInfo.Pipe_Category) });
            Datas.Add(new Mesage { ItemName = "起点编码", ValueName = GetJuncName(mPipeInfo.In_JunID) });
            Datas.Add(new Mesage { ItemName = "终点编码", ValueName = GetJuncName(mPipeInfo.Out_JunID) });
            Datas.Add(new Mesage { ItemName = "起点管顶标高", ValueName = Convert.ToString(mPipeInfo.In_UpEle) });
            Datas.Add(new Mesage { ItemName = "起点管底标高", ValueName = Convert.ToString(mPipeInfo.In_BottomEle) });
            Datas.Add(new Mesage { ItemName = "终点管顶标高", ValueName = Convert.ToString(mPipeInfo.Out_UpEle) });
            Datas.Add(new Mesage { ItemName = "终点管底标高", ValueName = Convert.ToString(mPipeInfo.Out_BottomEle) });
            Datas.Add(new Mesage { ItemName = "起点实测管径", ValueName = Convert.ToString(mPipeInfo.Shape_Data1) });
            Datas.Add(new Mesage { ItemName = "终点实测管径", ValueName = Convert.ToString(mPipeInfo.Shape_Data2) });
            Datas.Add(new Mesage { ItemName = "断面形式", ValueName = GetShapeType(mPipeInfo.ShapeType) });
            Datas.Add(new Mesage { ItemName = "断面数据", ValueName = mPipeInfo.ShapeData });
            Datas.Add(new Mesage { ItemName = "管道材质", ValueName = Getmaterial(mPipeInfo.Material) });
            Datas.Add(new Mesage { ItemName = "管顶糙率", ValueName = Convert.ToString(mPipeInfo.Roughness) });
            Datas.Add(new Mesage { ItemName = "数据来源", ValueName = GetDataSource(mPipeInfo.DataSource) });
            Datas.Add(new Mesage { ItemName = "数据获取时间", ValueName = Convert.ToString(mPipeInfo.Record_Date) });
            Datas.Add(new Mesage { ItemName = "填报单位", ValueName = mPipeInfo.ReportDept });
            Datas.Add(new Mesage { ItemName = "填报日期", ValueName = Convert.ToString(mPipeInfo.ReportDate) });
            Datas.Add(new Mesage { ItemName = "数据是否完整", ValueName = bool2str(mPipeExtInfo.DataIsFull) });
            Datas.Add(new Mesage { ItemName = "数据缺失原因", ValueName = mPipeExtInfo.LoseReason });
            Datas.Add(new Mesage { ItemName = "备注", ValueName = mPipeExtInfo.Remark });
            return Datas;
        }