摘要: winform中使用BindingSource绑定到dataGridView数据源,并进行增删改操作。 private BindingSource usersbinding;//定义数据源 //查询记录事件 List data = BLL.UserList();//获取对象集合 List data 阅读全文
posted @ 2024-08-24 09:42 BengBaLaHei 阅读(157) 评论(0) 推荐(0)
摘要: 当在唯一索引对应的列插入重复值时,会触发此异常。 检查插入的数据 1.是否与表中已存在的数据重复 select a.* from table1 a,table b where2 a.id = b.id 2.检查插入的数据本身是不是有重复的 select a.* from table1 a,table 阅读全文
posted @ 2022-06-30 10:41 BengBaLaHei 阅读(223) 评论(0) 推荐(0)
摘要: 最近客户有个需求,输出一个日期,这个日期是在打印日期的基础上后延15天,并且自动跳过周末。 写一个函数进行调用 create or replace function F_GET_RQ(DyRq varchar2) return date -- select F_GET_RQ('2022-06-29' 阅读全文
posted @ 2022-06-30 10:28 BengBaLaHei 阅读(502) 评论(0) 推荐(0)
摘要: public class FtpHelper { static string ftpServerIP = "ftp://127.0.0.1:2120"; static string ftpUserID = "admin"; static string ftpPassword = "password" 阅读全文
posted @ 2021-05-08 17:56 BengBaLaHei 阅读(422) 评论(0) 推荐(0)
摘要: 使用C#模拟表单提交文件和参数,代码如下 string serviceUrl = string.Format("http://" + IP + "/api/wj.kc?act=UploadFile"); HttpWebRequest myRequest = (HttpWebRequest)WebRe 阅读全文
posted @ 2021-04-30 11:55 BengBaLaHei 阅读(187) 评论(1) 推荐(0)
摘要: log4net发布版本无法写入日志 logger.cs中加入 log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo("smsexplain.exe.config")); 转自https://blog.csdn.net/dili 阅读全文
posted @ 2021-04-29 11:48 BengBaLaHei 阅读(111) 评论(0) 推荐(0)
摘要: 1、设置FullRowSelect 为true 2、添加SelectedIndexChanged事件 3、添加代码 阅读全文
posted @ 2021-04-26 18:33 BengBaLaHei 阅读(554) 评论(0) 推荐(0)
摘要: sqlserver 中 select * from yonghuxx t where t.yonghuh= (case when :yonghuh='' then t.yonghuh else :yonghuh end); oracle 中 select * from yonghuxx t wher 阅读全文
posted @ 2021-01-21 17:07 BengBaLaHei 阅读(529) 评论(0) 推荐(0)
摘要: 首先得到年头年尾日期 select to_date('2020-01-01', 'yyyy-mm-dd') into v_start from dual; select to_date('2020-12-31', 'yyyy-mm-dd') into v_end from dual; 循环 WHIL 阅读全文
posted @ 2021-01-21 17:00 BengBaLaHei 阅读(109) 评论(0) 推荐(0)