diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index ece85bc..54237f9 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -43,7 +43,7 @@ DEBUG;TRACE prompt 4 - x64 + AnyCPU AllRules.ruleset @@ -121,6 +121,7 @@ 3.5 + @@ -140,7 +141,6 @@ 3.5 - diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index ece85bc..54237f9 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -43,7 +43,7 @@ DEBUG;TRACE prompt 4 - x64 + AnyCPU AllRules.ruleset @@ -121,6 +121,7 @@ 3.5 + @@ -140,7 +141,6 @@ 3.5 - diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 748ceaa..bbc1c97 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index ece85bc..54237f9 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -43,7 +43,7 @@ DEBUG;TRACE prompt 4 - x64 + AnyCPU AllRules.ruleset @@ -121,6 +121,7 @@ 3.5 + @@ -140,7 +141,6 @@ 3.5 - diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 748ceaa..bbc1c97 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmHDMAnalysis3.cs b/FrmHDMAnalysis3.cs index bef611a..bb0765b 100644 --- a/FrmHDMAnalysis3.cs +++ b/FrmHDMAnalysis3.cs @@ -213,7 +213,16 @@ string material = feature.GetFieldAsString("材质"); string diameter = feature.GetFieldAsString("管径_毫米"); - table.Rows.Add(new object[] { number, pipeType, feature.Name.ToString(), diameter, material,Convert.ToDecimal(list[i].ToString()).ToString("f2")});//list[i].ToString().Substring(0,list[i].ToString().IndexOf('.')+3) } + string value = ""; + try + {//解决有的数字太小,转换不成功的问题 + value = Convert.ToDecimal(list[i].ToString()).ToString("f2"); + } + catch (Exception e) + { + value = "0.00"; + } + table.Rows.Add(new object[] { number, pipeType, feature.Name.ToString(), diameter, material,value});//list[i].ToString().Substring(0,list[i].ToString().IndexOf('.')+3) } //chart1.Series["管线"].Points[i].Label = number;//管线的标签 chart1.Series["管线"].Points[i].LegendText = number; diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index ece85bc..54237f9 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -43,7 +43,7 @@ DEBUG;TRACE prompt 4 - x64 + AnyCPU AllRules.ruleset @@ -121,6 +121,7 @@ 3.5 + @@ -140,7 +141,6 @@ 3.5 - diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 748ceaa..bbc1c97 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmHDMAnalysis3.cs b/FrmHDMAnalysis3.cs index bef611a..bb0765b 100644 --- a/FrmHDMAnalysis3.cs +++ b/FrmHDMAnalysis3.cs @@ -213,7 +213,16 @@ string material = feature.GetFieldAsString("材质"); string diameter = feature.GetFieldAsString("管径_毫米"); - table.Rows.Add(new object[] { number, pipeType, feature.Name.ToString(), diameter, material,Convert.ToDecimal(list[i].ToString()).ToString("f2")});//list[i].ToString().Substring(0,list[i].ToString().IndexOf('.')+3) } + string value = ""; + try + {//解决有的数字太小,转换不成功的问题 + value = Convert.ToDecimal(list[i].ToString()).ToString("f2"); + } + catch (Exception e) + { + value = "0.00"; + } + table.Rows.Add(new object[] { number, pipeType, feature.Name.ToString(), diameter, material,value});//list[i].ToString().Substring(0,list[i].ToString().IndexOf('.')+3) } //chart1.Series["管线"].Points[i].Label = number;//管线的标签 chart1.Series["管线"].Points[i].LegendText = number; diff --git a/LogManager.cs b/LogManager.cs index acc8e8c..c3f9b95 100644 --- a/LogManager.cs +++ b/LogManager.cs @@ -23,14 +23,7 @@ string convertSql = "select OPERID from casic_funclist where OPERNAME = '" + convertedOper + "'"; DataTable table = OledbHelper.QueryTable(convertSql); string operId = ""; - if (table.Rows.Count > 0) - { - operId = table.Rows[0][0].ToString(); - } - else - { - operId = "0"; - } + operId = table.Rows.Count > 0 ? table.Rows[0][0].ToString() : "0"; //保存日志 //string sql = " insert into casic_loginfo values('" + now + "','" + // username + "','" + operId + "','')"; diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index ece85bc..54237f9 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -43,7 +43,7 @@ DEBUG;TRACE prompt 4 - x64 + AnyCPU AllRules.ruleset @@ -121,6 +121,7 @@ 3.5 + @@ -140,7 +141,6 @@ 3.5 - diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 748ceaa..bbc1c97 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmHDMAnalysis3.cs b/FrmHDMAnalysis3.cs index bef611a..bb0765b 100644 --- a/FrmHDMAnalysis3.cs +++ b/FrmHDMAnalysis3.cs @@ -213,7 +213,16 @@ string material = feature.GetFieldAsString("材质"); string diameter = feature.GetFieldAsString("管径_毫米"); - table.Rows.Add(new object[] { number, pipeType, feature.Name.ToString(), diameter, material,Convert.ToDecimal(list[i].ToString()).ToString("f2")});//list[i].ToString().Substring(0,list[i].ToString().IndexOf('.')+3) } + string value = ""; + try + {//解决有的数字太小,转换不成功的问题 + value = Convert.ToDecimal(list[i].ToString()).ToString("f2"); + } + catch (Exception e) + { + value = "0.00"; + } + table.Rows.Add(new object[] { number, pipeType, feature.Name.ToString(), diameter, material,value});//list[i].ToString().Substring(0,list[i].ToString().IndexOf('.')+3) } //chart1.Series["管线"].Points[i].Label = number;//管线的标签 chart1.Series["管线"].Points[i].LegendText = number; diff --git a/LogManager.cs b/LogManager.cs index acc8e8c..c3f9b95 100644 --- a/LogManager.cs +++ b/LogManager.cs @@ -23,14 +23,7 @@ string convertSql = "select OPERID from casic_funclist where OPERNAME = '" + convertedOper + "'"; DataTable table = OledbHelper.QueryTable(convertSql); string operId = ""; - if (table.Rows.Count > 0) - { - operId = table.Rows[0][0].ToString(); - } - else - { - operId = "0"; - } + operId = table.Rows.Count > 0 ? table.Rows[0][0].ToString() : "0"; //保存日志 //string sql = " insert into casic_loginfo values('" + now + "','" + // username + "','" + operId + "','')"; diff --git a/MainFrm.cs b/MainFrm.cs index e269862..ec4ff80 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3928,6 +3928,7 @@ /// private void sliderGroundTransSet1_ValueChanged(object sender, EventArgs e) { + LogManager.saveLog(Utility.userName, sliderGroundTransSet1.Text); globeControl1.Globe.GroundOpaque = 100 - sliderGroundTransSet1.Value; GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(roadLayerName);//("180fd"); if (layer != null) diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index ece85bc..54237f9 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -43,7 +43,7 @@ DEBUG;TRACE prompt 4 - x64 + AnyCPU AllRules.ruleset @@ -121,6 +121,7 @@ 3.5 + @@ -140,7 +141,6 @@ 3.5 - diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 748ceaa..bbc1c97 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmHDMAnalysis3.cs b/FrmHDMAnalysis3.cs index bef611a..bb0765b 100644 --- a/FrmHDMAnalysis3.cs +++ b/FrmHDMAnalysis3.cs @@ -213,7 +213,16 @@ string material = feature.GetFieldAsString("材质"); string diameter = feature.GetFieldAsString("管径_毫米"); - table.Rows.Add(new object[] { number, pipeType, feature.Name.ToString(), diameter, material,Convert.ToDecimal(list[i].ToString()).ToString("f2")});//list[i].ToString().Substring(0,list[i].ToString().IndexOf('.')+3) } + string value = ""; + try + {//解决有的数字太小,转换不成功的问题 + value = Convert.ToDecimal(list[i].ToString()).ToString("f2"); + } + catch (Exception e) + { + value = "0.00"; + } + table.Rows.Add(new object[] { number, pipeType, feature.Name.ToString(), diameter, material,value});//list[i].ToString().Substring(0,list[i].ToString().IndexOf('.')+3) } //chart1.Series["管线"].Points[i].Label = number;//管线的标签 chart1.Series["管线"].Points[i].LegendText = number; diff --git a/LogManager.cs b/LogManager.cs index acc8e8c..c3f9b95 100644 --- a/LogManager.cs +++ b/LogManager.cs @@ -23,14 +23,7 @@ string convertSql = "select OPERID from casic_funclist where OPERNAME = '" + convertedOper + "'"; DataTable table = OledbHelper.QueryTable(convertSql); string operId = ""; - if (table.Rows.Count > 0) - { - operId = table.Rows[0][0].ToString(); - } - else - { - operId = "0"; - } + operId = table.Rows.Count > 0 ? table.Rows[0][0].ToString() : "0"; //保存日志 //string sql = " insert into casic_loginfo values('" + now + "','" + // username + "','" + operId + "','')"; diff --git a/MainFrm.cs b/MainFrm.cs index e269862..ec4ff80 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3928,6 +3928,7 @@ /// private void sliderGroundTransSet1_ValueChanged(object sender, EventArgs e) { + LogManager.saveLog(Utility.userName, sliderGroundTransSet1.Text); globeControl1.Globe.GroundOpaque = 100 - sliderGroundTransSet1.Value; GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(roadLayerName);//("180fd"); if (layer != null) diff --git a/bin/x86/Debug/Config.xml b/bin/x86/Debug/Config.xml index 270032e..046aec8 100644 --- a/bin/x86/Debug/Config.xml +++ b/bin/x86/Debug/Config.xml @@ -17,7 +17,7 @@ http://192.168.0.203/EMSCyberpipe.msi http://192.168.0.203/EMSConfig.xml - http://192.168.0.102:8080/ctrl + http://192.168.0.203:8080/ctrl 21 diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index ece85bc..54237f9 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -43,7 +43,7 @@ DEBUG;TRACE prompt 4 - x64 + AnyCPU AllRules.ruleset @@ -121,6 +121,7 @@ 3.5 + @@ -140,7 +141,6 @@ 3.5 - diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 748ceaa..bbc1c97 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmHDMAnalysis3.cs b/FrmHDMAnalysis3.cs index bef611a..bb0765b 100644 --- a/FrmHDMAnalysis3.cs +++ b/FrmHDMAnalysis3.cs @@ -213,7 +213,16 @@ string material = feature.GetFieldAsString("材质"); string diameter = feature.GetFieldAsString("管径_毫米"); - table.Rows.Add(new object[] { number, pipeType, feature.Name.ToString(), diameter, material,Convert.ToDecimal(list[i].ToString()).ToString("f2")});//list[i].ToString().Substring(0,list[i].ToString().IndexOf('.')+3) } + string value = ""; + try + {//解决有的数字太小,转换不成功的问题 + value = Convert.ToDecimal(list[i].ToString()).ToString("f2"); + } + catch (Exception e) + { + value = "0.00"; + } + table.Rows.Add(new object[] { number, pipeType, feature.Name.ToString(), diameter, material,value});//list[i].ToString().Substring(0,list[i].ToString().IndexOf('.')+3) } //chart1.Series["管线"].Points[i].Label = number;//管线的标签 chart1.Series["管线"].Points[i].LegendText = number; diff --git a/LogManager.cs b/LogManager.cs index acc8e8c..c3f9b95 100644 --- a/LogManager.cs +++ b/LogManager.cs @@ -23,14 +23,7 @@ string convertSql = "select OPERID from casic_funclist where OPERNAME = '" + convertedOper + "'"; DataTable table = OledbHelper.QueryTable(convertSql); string operId = ""; - if (table.Rows.Count > 0) - { - operId = table.Rows[0][0].ToString(); - } - else - { - operId = "0"; - } + operId = table.Rows.Count > 0 ? table.Rows[0][0].ToString() : "0"; //保存日志 //string sql = " insert into casic_loginfo values('" + now + "','" + // username + "','" + operId + "','')"; diff --git a/MainFrm.cs b/MainFrm.cs index e269862..ec4ff80 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3928,6 +3928,7 @@ /// private void sliderGroundTransSet1_ValueChanged(object sender, EventArgs e) { + LogManager.saveLog(Utility.userName, sliderGroundTransSet1.Text); globeControl1.Globe.GroundOpaque = 100 - sliderGroundTransSet1.Value; GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(roadLayerName);//("180fd"); if (layer != null) diff --git a/bin/x86/Debug/Config.xml b/bin/x86/Debug/Config.xml index 270032e..046aec8 100644 --- a/bin/x86/Debug/Config.xml +++ b/bin/x86/Debug/Config.xml @@ -17,7 +17,7 @@ http://192.168.0.203/EMSCyberpipe.msi http://192.168.0.203/EMSConfig.xml - http://192.168.0.102:8080/ctrl + http://192.168.0.203:8080/ctrl 21 diff --git a/bin/x86/Debug/System.Data.Entity.dll b/bin/x86/Debug/System.Data.Entity.dll new file mode 100644 index 0000000..a533ad4 --- /dev/null +++ b/bin/x86/Debug/System.Data.Entity.dll Binary files differ diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index ece85bc..54237f9 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -43,7 +43,7 @@ DEBUG;TRACE prompt 4 - x64 + AnyCPU AllRules.ruleset @@ -121,6 +121,7 @@ 3.5 + @@ -140,7 +141,6 @@ 3.5 - diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 748ceaa..bbc1c97 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmHDMAnalysis3.cs b/FrmHDMAnalysis3.cs index bef611a..bb0765b 100644 --- a/FrmHDMAnalysis3.cs +++ b/FrmHDMAnalysis3.cs @@ -213,7 +213,16 @@ string material = feature.GetFieldAsString("材质"); string diameter = feature.GetFieldAsString("管径_毫米"); - table.Rows.Add(new object[] { number, pipeType, feature.Name.ToString(), diameter, material,Convert.ToDecimal(list[i].ToString()).ToString("f2")});//list[i].ToString().Substring(0,list[i].ToString().IndexOf('.')+3) } + string value = ""; + try + {//解决有的数字太小,转换不成功的问题 + value = Convert.ToDecimal(list[i].ToString()).ToString("f2"); + } + catch (Exception e) + { + value = "0.00"; + } + table.Rows.Add(new object[] { number, pipeType, feature.Name.ToString(), diameter, material,value});//list[i].ToString().Substring(0,list[i].ToString().IndexOf('.')+3) } //chart1.Series["管线"].Points[i].Label = number;//管线的标签 chart1.Series["管线"].Points[i].LegendText = number; diff --git a/LogManager.cs b/LogManager.cs index acc8e8c..c3f9b95 100644 --- a/LogManager.cs +++ b/LogManager.cs @@ -23,14 +23,7 @@ string convertSql = "select OPERID from casic_funclist where OPERNAME = '" + convertedOper + "'"; DataTable table = OledbHelper.QueryTable(convertSql); string operId = ""; - if (table.Rows.Count > 0) - { - operId = table.Rows[0][0].ToString(); - } - else - { - operId = "0"; - } + operId = table.Rows.Count > 0 ? table.Rows[0][0].ToString() : "0"; //保存日志 //string sql = " insert into casic_loginfo values('" + now + "','" + // username + "','" + operId + "','')"; diff --git a/MainFrm.cs b/MainFrm.cs index e269862..ec4ff80 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3928,6 +3928,7 @@ /// private void sliderGroundTransSet1_ValueChanged(object sender, EventArgs e) { + LogManager.saveLog(Utility.userName, sliderGroundTransSet1.Text); globeControl1.Globe.GroundOpaque = 100 - sliderGroundTransSet1.Value; GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(roadLayerName);//("180fd"); if (layer != null) diff --git a/bin/x86/Debug/Config.xml b/bin/x86/Debug/Config.xml index 270032e..046aec8 100644 --- a/bin/x86/Debug/Config.xml +++ b/bin/x86/Debug/Config.xml @@ -17,7 +17,7 @@ http://192.168.0.203/EMSCyberpipe.msi http://192.168.0.203/EMSConfig.xml - http://192.168.0.102:8080/ctrl + http://192.168.0.203:8080/ctrl 21 diff --git a/bin/x86/Debug/System.Data.Entity.dll b/bin/x86/Debug/System.Data.Entity.dll new file mode 100644 index 0000000..a533ad4 --- /dev/null +++ b/bin/x86/Debug/System.Data.Entity.dll Binary files differ diff --git a/bin/x86/Debug/System.Data.OracleClient.dll b/bin/x86/Debug/System.Data.OracleClient.dll new file mode 100644 index 0000000..a1a99f6 --- /dev/null +++ b/bin/x86/Debug/System.Data.OracleClient.dll Binary files differ diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index ece85bc..54237f9 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -43,7 +43,7 @@ DEBUG;TRACE prompt 4 - x64 + AnyCPU AllRules.ruleset @@ -121,6 +121,7 @@ 3.5 + @@ -140,7 +141,6 @@ 3.5 - diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 748ceaa..bbc1c97 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/FrmHDMAnalysis3.cs b/FrmHDMAnalysis3.cs index bef611a..bb0765b 100644 --- a/FrmHDMAnalysis3.cs +++ b/FrmHDMAnalysis3.cs @@ -213,7 +213,16 @@ string material = feature.GetFieldAsString("材质"); string diameter = feature.GetFieldAsString("管径_毫米"); - table.Rows.Add(new object[] { number, pipeType, feature.Name.ToString(), diameter, material,Convert.ToDecimal(list[i].ToString()).ToString("f2")});//list[i].ToString().Substring(0,list[i].ToString().IndexOf('.')+3) } + string value = ""; + try + {//解决有的数字太小,转换不成功的问题 + value = Convert.ToDecimal(list[i].ToString()).ToString("f2"); + } + catch (Exception e) + { + value = "0.00"; + } + table.Rows.Add(new object[] { number, pipeType, feature.Name.ToString(), diameter, material,value});//list[i].ToString().Substring(0,list[i].ToString().IndexOf('.')+3) } //chart1.Series["管线"].Points[i].Label = number;//管线的标签 chart1.Series["管线"].Points[i].LegendText = number; diff --git a/LogManager.cs b/LogManager.cs index acc8e8c..c3f9b95 100644 --- a/LogManager.cs +++ b/LogManager.cs @@ -23,14 +23,7 @@ string convertSql = "select OPERID from casic_funclist where OPERNAME = '" + convertedOper + "'"; DataTable table = OledbHelper.QueryTable(convertSql); string operId = ""; - if (table.Rows.Count > 0) - { - operId = table.Rows[0][0].ToString(); - } - else - { - operId = "0"; - } + operId = table.Rows.Count > 0 ? table.Rows[0][0].ToString() : "0"; //保存日志 //string sql = " insert into casic_loginfo values('" + now + "','" + // username + "','" + operId + "','')"; diff --git a/MainFrm.cs b/MainFrm.cs index e269862..ec4ff80 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -3928,6 +3928,7 @@ /// private void sliderGroundTransSet1_ValueChanged(object sender, EventArgs e) { + LogManager.saveLog(Utility.userName, sliderGroundTransSet1.Text); globeControl1.Globe.GroundOpaque = 100 - sliderGroundTransSet1.Value; GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(roadLayerName);//("180fd"); if (layer != null) diff --git a/bin/x86/Debug/Config.xml b/bin/x86/Debug/Config.xml index 270032e..046aec8 100644 --- a/bin/x86/Debug/Config.xml +++ b/bin/x86/Debug/Config.xml @@ -17,7 +17,7 @@ http://192.168.0.203/EMSCyberpipe.msi http://192.168.0.203/EMSConfig.xml - http://192.168.0.102:8080/ctrl + http://192.168.0.203:8080/ctrl 21 diff --git a/bin/x86/Debug/System.Data.Entity.dll b/bin/x86/Debug/System.Data.Entity.dll new file mode 100644 index 0000000..a533ad4 --- /dev/null +++ b/bin/x86/Debug/System.Data.Entity.dll Binary files differ diff --git a/bin/x86/Debug/System.Data.OracleClient.dll b/bin/x86/Debug/System.Data.OracleClient.dll new file mode 100644 index 0000000..a1a99f6 --- /dev/null +++ b/bin/x86/Debug/System.Data.OracleClient.dll Binary files differ diff --git a/bin/x86/Debug/System.Data.dll b/bin/x86/Debug/System.Data.dll new file mode 100644 index 0000000..6c657f1 --- /dev/null +++ b/bin/x86/Debug/System.Data.dll Binary files differ