Пример #1
0
        private bool SaverTodb(List <JuncSheetData> list)
        {
            if (list == null || list.Count <= 0)
            {
                return(false);
            }

            QuickInsert qicm = new QuickInsert();
            JuncRev     rev  = new JuncRev();

            rev.ListJunc    = new List <CJuncInfo>();
            rev.ListJuncExt = new List <CJuncExtInfo>();

            foreach (JuncSheetData data in list)
            {
                CJuncInfo    info    = new CJuncInfo();
                CJuncExtInfo extinfo = new CJuncExtInfo();

                extinfo.Lane_Way   = data.RoadName;
                info.JuncName      = data.JuncName;
                info.Junc_Category = GetCategory(data.JuncCategory);
                info.Junc_Type     = GetType(data.JuncType);
                info.Y_Coor        = data.Latitude;
                info.X_Coor        = data.Longitude;
                info.Surface_Ele   = data.Height;
                info.Junc_Style    = GetStyle(data.JuncStyle);

                info.Depth          = data.Depth;
                info.Junc_Darkjoint = data.JuncDarkjoint;
                info.Sewage_Line    = data.SewageLine;
                info.Junc_Error     = data.JuncError;

                info.CCTV_CheckCode = data.CCTV_CheckCode;
                info.DataSource     = GetDataSource(data.DataSource);
                info.Record_Date    = data.DataTime;

                info.ReportDept = data.RecordDept;
                info.ReportDate = data.RecordTime;

                for (int i = 0; i < 8; i++)
                {
                    info.Dis[i] = data.Dis[i];
                }

                info.FullData  = data.DataFull;
                info.LoseReson = data.LoseReson;

                extinfo.Remark = data.Remark;
                rev.ListJunc.Add(info);
                rev.ListJuncExt.Add(extinfo);
            }
            qicm.SetReceiver(rev);
            qicm.Execute();

            return(true);
        }
Пример #2
0
        private bool SaverTodb(List <USSheetData> list)
        {
            if (list == null || list.Count <= 0)
            {
                return(false);
            }

            QuickInsert icm = new QuickInsert();
            PipeRev     rev = new PipeRev();

            LoadCmd lcmd = new LoadCmd();

            lcmd.SetReceiver(rev);
            lcmd.Execute();
            string pname = "";

            try
            {
                foreach (USSheetData data in list)
                {
                    CUSInfo info = new CUSInfo();

                    info.PipeID     = GetPipeID(data.PipeName, rev.ListPipe);
                    info.JobID      = data.JobID;
                    info.DetectDate = data.CheckDate;

                    info.DetectDep     = data.CheckDept;
                    info.Detect_Person = data.CheckPerson;
                    info.Contacts      = data.CheckContact;

                    info.Detect_Method = GetCheckMethod(data.CheckMethod);
                    info.Detect_Dir    = GetCheckDir(data.CheckDirect);

                    info.Pipe_Stop = data.Pipe_Stop;

                    info.Func_Defect = GetFuncDef(data.Func_Defect);
                    info.Func_Class  = GetClass(data.Func_Class);

                    info.Strcut_Defect = GetStructDef(data.Struct_Defect);
                    info.Struct_Class  = GetClass(data.Struct_Class);

                    if (IsDouble(data.Repire_Index))
                    {
                        info.Repair_Index = Convert.ToDouble(data.Repire_Index);
                    }
                    else
                    {
                        info.Repair_Index = 0;
                    }

                    if (IsDouble(data.Matain_Index))
                    {
                        info.Matain_Index = Convert.ToDouble(data.Matain_Index);
                    }
                    else
                    {
                        info.Matain_Index = 0;
                    }

                    info.Problem        = data.Problem;
                    info.Video_Filename = data.Video_Filename;


                    info.ReportDept = data.RecordDept;
                    info.ReportDate = data.RecordTime;

                    info.DataIsFull = data.DataFull;
                    info.LoseReason = data.LoseReson;

                    info.Remark = data.Remark;
                    rev.ListUS.Add(info);

                    pname = data.PipeName;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("PipeName : {0} in exception{1}", pname, e.Message);
            }
            rev.ListPipe.Clear();
            rev.ListPipeExt.Clear();

            icm.SetReceiver(rev);
            icm.Execute();
            return(true);
        }
Пример #3
0
        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);
        }
Пример #4
0
        private bool SaverTodb(List<USSheetData> list)
        {

            if (list == null || list.Count <= 0)
                return false;

            QuickInsert icm = new QuickInsert();
            PipeRev rev = new PipeRev();

            LoadCmd lcmd = new LoadCmd();
            lcmd.SetReceiver(rev);
            lcmd.Execute();
            string pname = "";
            try
            {
                foreach (USSheetData data in list)
                {
                    CUSInfo info = new CUSInfo();

                    info.PipeID = GetPipeID(data.PipeName , rev.ListPipe);
                    info.JobID = data.JobID;
                    info.DetectDate = data.CheckDate;

                    info.DetectDep = data.CheckDept;
                    info.Detect_Person = data.CheckPerson;
                    info.Contacts = data.CheckContact;

                    info.Detect_Method = GetCheckMethod(data.CheckMethod);
                    info.Detect_Dir = GetCheckDir(data.CheckDirect);

                    info.Pipe_Stop = data.Pipe_Stop;

                    info.Func_Defect = GetFuncDef(data.Func_Defect);
                    info.Func_Class = GetClass(data.Func_Class);

                    info.Strcut_Defect = GetStructDef(data.Struct_Defect);
                    info.Struct_Class = GetClass(data.Struct_Class);

                    if (IsDouble(data.Repire_Index))
                        info.Repair_Index = Convert.ToDouble(data.Repire_Index);
                    else
                        info.Repair_Index = 0;

                    if (IsDouble(data.Matain_Index))
                        info.Matain_Index = Convert.ToDouble(data.Matain_Index);
                    else
                        info.Matain_Index = 0;

                    info.Problem = data.Problem;
                    info.Video_Filename = data.Video_Filename;


                    info.ReportDept = data.RecordDept;
                    info.ReportDate = data.RecordTime;

                    info.DataIsFull = data.DataFull;
                    info.LoseReason = data.LoseReson;

                    info.Remark = data.Remark;
                    rev.ListUS.Add(info);

                    pname = data.PipeName;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("PipeName : {0} in exception{1}", pname, e.Message);
            }
            rev.ListPipe.Clear();
            rev.ListPipeExt.Clear();

            icm.SetReceiver(rev);
            icm.Execute();
            return true;
        }
Пример #5
0
        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;
        }
Пример #6
0
        private bool SaverTodb(List<JuncSheetData> list)
        {
            if (list == null || list.Count <= 0)
                return false;

            QuickInsert qicm = new QuickInsert();
            JuncRev rev = new JuncRev();
            rev.ListJunc = new List<CJuncInfo>();
            rev.ListJuncExt = new List<CJuncExtInfo>();

            foreach (JuncSheetData data in list)
            {
                CJuncInfo info = new CJuncInfo();
                CJuncExtInfo extinfo = new CJuncExtInfo();

                extinfo.Lane_Way = data.RoadName;
                info.JuncName = data.JuncName;
                info.Junc_Category = GetCategory(data.JuncCategory);
                info.Junc_Type = GetType(data.JuncType);
                info.Y_Coor = data.Latitude;
                info.X_Coor = data.Longitude;
                info.Surface_Ele = data.Height;
                info.Junc_Style = GetStyle(data.JuncStyle);

                info.Depth = data.Depth;
                info.Junc_Darkjoint = data.JuncDarkjoint;
                info.Sewage_Line = data.SewageLine;
                info.Junc_Error = data.JuncError;

                info.CCTV_CheckCode = data.CCTV_CheckCode;
                info.DataSource = GetDataSource(data.DataSource);
                info.Record_Date = data.DataTime;

                info.ReportDept = data.RecordDept;
                info.ReportDate = data.RecordTime;

                for (int i = 0; i < 8;i++ )
                {
                    info.Dis[i] = data.Dis[i];
                }

                    info.FullData = data.DataFull;
                info.LoseReson = data.LoseReson;

                extinfo.Remark = data.Remark;
                rev.ListJunc.Add(info);
                rev.ListJuncExt.Add(extinfo);
            }
            qicm.SetReceiver(rev);
            qicm.Execute();

            return true;
        }