摘要:
1、将小数截取到某位小数string str=3.1415926string str1=Math.Round(decimal.Parse(str),2) ;//str1为3.142、SQL语句操作数据库(1)向数据库中插入或更新 SqlConnection myCon = new SqlConnection(); myCon.ConnectionString = "Data Source=.;Initial Catalog=JSManager;Integrated Security=True"; myCon.Open(); SqlCommand myCmd = null;s 阅读全文
摘要:
1、打开选择文件对话框1 string path = "";2 System.Windows.Forms.OpenFileDialog fd = new OpenFileDialog();3 fd.Title = "选择文件";//选择框名称 4 fd.Filter = "xls files (*.xls)|*.xls";//选择文件的类型为Xls表格 5 if (fd.ShowDialog() == DialogResult.OK)//当点击... 阅读全文