public RainPipe(String name, String info, IConcreteShape start, IConcreteShape end) : base(name, info, start, end) { if (pipeInfo == null) { pipeInfo = new CPipeInfo(); pipeInfo.Pipe_Category = (int)PIPETYPE.PIPE_RAIN; } }
WasteCover FindEndWJunc(CPipeInfo cp) { WasteCover c = null; c = WasterCoverList.Find(cc => cc.juncInfo.ID == cp.Out_JunID); return c; }
RainCover FindEndRJunc(CPipeInfo cp) { RainCover c = null; c = RainCoverList.Find(cc => cc.juncInfo.ID == cp.Out_JunID); return c; }
RainCover FindStartRJunc(CPipeInfo cp) { RainCover c = null; c = RainCoverList.Find(cc => cc.juncInfo.ID == cp.In_JunID); return c; }
public WastePipe(IConcreteShape start, IConcreteShape end) : base(start, end) { if (pipeInfo == null) { pipeInfo = new CPipeInfo(); pipeInfo.Pipe_Category = (int)PIPETYPE.PIPE_WASTE; } }
private ObservableCollection<Mesage> GetData(int id) { var Datas = new ObservableCollection<Mesage>(); TPipeInfo tpipeinfo = new TPipeInfo(App._dbpath, App.PassWord); TPipeExtInfo tpipeextinfo = new TPipeExtInfo(App._dbpath, App.PassWord); mPipeInfo = tpipeinfo.Sel_PipeInfoByid(id); mPipeExtInfo = tpipeextinfo.Sel_PipeExtInfoByPipeId(id); if (mPipeInfo == null||mPipeExtInfo==null) { MessageBox.Show("读取管道数据失败"); return null; } 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; }
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; }
protected int InsterDb(Pipe pipe , Cover injunc , Cover outjunc) { CPipeInfo pipeInfo = new CPipeInfo(); CPipeExtInfo pipeExtInfo = new CPipeExtInfo(); CUSInfo UsInfo = new CUSInfo(); pipeInfo.PipeName = pipe.Name; pipeInfo.In_JunID = injunc.juncInfo.ID; pipeInfo.Out_JunID = outjunc.juncInfo.ID; pipeInfo.Pipe_Category = pipe.pipeInfo.Pipe_Category; UsInfo.Struct_Class = 0; TPipeInfo tpipeinfo = new TPipeInfo(App._dbpath, App.PassWord); TPipeExtInfo tpipextinfo = new TPipeExtInfo(App._dbpath, App.PassWord); TUSInfo tusinfo = new TUSInfo(App._dbpath, App.PassWord); tpipeinfo.Insert_PipeInfo(ref pipeInfo); pipeExtInfo.PipeID = pipeInfo.ID; tpipextinfo.Insert_PipeExtInfo(ref pipeExtInfo); UsInfo.PipeID = pipeInfo.ID; tusinfo.Insert_USInfo(ref UsInfo); return pipeInfo.ID; }
private bool SaverTodb(List<PipeSheetData> list) { //get the juncinfo. then if (list == null || list.Count <= 0) return false; QuickInsert icm = new QuickInsert(); PipeRev rev = new PipeRev(); rev.ListPipe = new List<CPipeInfo>(); rev.ListPipeExt = new List<CPipeExtInfo>(); LoadCmd lcmd = new LoadCmd(); JuncRev junrev = new JuncRev(); lcmd.SetReceiver(junrev); lcmd.Execute(); string pname = ""; try { foreach (PipeSheetData data in list) { CPipeInfo info = new CPipeInfo(); CPipeExtInfo extinfo = new CPipeExtInfo(); extinfo.Lane_Way = data.RoadName; info.PipeName = data.PipeName; info.Pipe_Category = GetCategory(data.PipeCategory); info.Pipe_Len = 0;//default int inid = CheckID(data.InCode, junrev.ListJunc); int outid = CheckID(data.OutCode, junrev.ListJunc); info.In_JunID = inid; info.Out_JunID = outid; info.In_UpEle = data.In_UpEle; info.In_BottomEle = data.In_BottomEle; info.Out_UpEle = data.Out_UpEle; info.Out_BottomEle = data.Out_UpEle; info.Shape_Data1 = data.In_R; info.Shape_Data2 = data.Out_R; info.ShapeType = GetShapeType(data.ShapeType); info.ShapeData = data.ShapeData; info.Material = Getmaterial(data.Matrial); info.Roughness = data.Roughness; info.DataSource = GetDataSource(data.DataSource); info.Record_Date = data.DataTime; info.ReportDept = data.RecordDept; info.ReportDate = data.RecordTime; extinfo.DataIsFull = data.DataFull; extinfo.LoseReason = data.LoseReson; extinfo.Remark = data.Remark; rev.ListPipe.Add(info); rev.ListPipeExt.Add(extinfo); pname = data.PipeName; } } catch(Exception e) { Console.WriteLine("PipeName : {0} in exception{1}",pname,e.Message); } icm.SetReceiver(rev); icm.Execute(); return true; }