摘要: 存储部分: create proc proc_GetUserID @UserName nvarchar(50),@ID int output as begin set @ID = (select ID from UserAccount where UserName = @UserName) end 阅读全文
posted @ 2020-03-17 09:36 向前追起 阅读(285) 评论(0) 推荐(0) 编辑
摘要: private int WeekOfYear(string date) { DateTime curDay = Convert.ToDateTime(date); int firstdayofweek = Convert.ToInt32(Convert.ToDateTime(curDay.Year. 阅读全文
posted @ 2020-03-14 16:35 向前追起 阅读(409) 评论(0) 推荐(0) 编辑
摘要: 获得列名 select name from syscolumns where id=object_id('ds_field') 或 select col_name(object_id('table'),1) from sysobjects where name='table' --读取库中的所有表名 阅读全文
posted @ 2020-03-14 16:31 向前追起 阅读(1526) 评论(0) 推荐(0) 编辑
摘要: //自适应列宽this.dgvBaoming.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells; //平铺均分列宽 this.dgvBaoming.AutoSizeColumnsMo 阅读全文
posted @ 2020-03-14 08:38 向前追起 阅读(1524) 评论(0) 推荐(0) 编辑
摘要: 1、添加下拉框的值: comboBoxEdit1.Properties.Items.Add("12"); 2、获取选中下拉框的值: 控件事件SelectedIndexChanged下,添加comboBoxEdit1.SelectedIndex.ToString(); 3、获取选中下拉框的值: com 阅读全文
posted @ 2020-03-12 14:11 向前追起 阅读(1380) 评论(0) 推荐(0) 编辑
摘要: SQLHelper.cs 通用类 /// <summary> /// 执行一条返回结果集的SqlCommand命令,通过专用的连接字符串。 /// 使用参数数组提供参数 /// </summary> /// <remarks> /// 使用示例: /// SqlDataReader r = Exec 阅读全文
posted @ 2020-03-11 10:12 向前追起 阅读(285) 评论(0) 推荐(0) 编辑
摘要: string[] str = new string[dataGridView1.Rows.Count]; int Sum = 0; for(int i=0;i<dataGridView1.Rows.Count;i++) { if(dataGridView1.Rows[i].Selected==tru 阅读全文
posted @ 2019-12-11 14:07 向前追起 阅读(556) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 //获取日期+时间 DateTime.Now.ToString(); // 2008-9-4 20:02:10 DateTim 阅读全文
posted @ 2019-12-06 21:23 向前追起 阅读(186) 评论(0) 推荐(0) 编辑
摘要: for (int i = 0; i < dataWonoDefectList.RowCount; i++) { if (dataWonoDefectList.Rows[i].Cells[1].Value.ToString() == "") //判断第一列行等于空值执行隐藏操作 { dataWonoD 阅读全文
posted @ 2019-10-16 11:07 向前追起 阅读(2690) 评论(0) 推荐(0) 编辑
摘要: int width=this.panel1.Width; //宽度int height=this.panel1.Height;//高度 阅读全文
posted @ 2019-08-12 14:09 向前追起 阅读(1452) 评论(1) 推荐(0) 编辑