| | |
| | | // |
| | | // dateTimePicker2 |
| | | // |
| | | this.dateTimePicker2.CustomFormat = "yyyy-MM-dd "; |
| | | this.dateTimePicker2.CustomFormat = "yyyy-MM-dd HH:mm:ss"; |
| | | this.dateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Custom; |
| | | this.dateTimePicker2.Location = new System.Drawing.Point(463, 24); |
| | | this.dateTimePicker2.Location = new System.Drawing.Point(396, 27); |
| | | this.dateTimePicker2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); |
| | | this.dateTimePicker2.Name = "dateTimePicker2"; |
| | | this.dateTimePicker2.Size = new System.Drawing.Size(189, 25); |
| | | this.dateTimePicker2.Size = new System.Drawing.Size(204, 25); |
| | | this.dateTimePicker2.TabIndex = 33; |
| | | // |
| | | // dateTimePicker1 |
| | | // |
| | | this.dateTimePicker1.CustomFormat = "yyyy-MM-dd "; |
| | | this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss"; |
| | | this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom; |
| | | this.dateTimePicker1.Location = new System.Drawing.Point(245, 24); |
| | | this.dateTimePicker1.Location = new System.Drawing.Point(170, 27); |
| | | this.dateTimePicker1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); |
| | | this.dateTimePicker1.Name = "dateTimePicker1"; |
| | | this.dateTimePicker1.Size = new System.Drawing.Size(189, 25); |
| | | this.dateTimePicker1.Size = new System.Drawing.Size(199, 25); |
| | | this.dateTimePicker1.TabIndex = 32; |
| | | // |
| | | // label9 |
| | | // |
| | | this.label9.AutoSize = true; |
| | | this.label9.Location = new System.Drawing.Point(441, 31); |
| | | this.label9.Location = new System.Drawing.Point(376, 34); |
| | | this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label9.Name = "label9"; |
| | | this.label9.Size = new System.Drawing.Size(15, 15); |
| | |
| | | // label11 |
| | | // |
| | | this.label11.AutoSize = true; |
| | | this.label11.Location = new System.Drawing.Point(133, 29); |
| | | this.label11.Location = new System.Drawing.Point(58, 34); |
| | | this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label11.Name = "label11"; |
| | | this.label11.Size = new System.Drawing.Size(105, 15); |
| | |
| | | return; |
| | | } |
| | | StringBuilder strBuilder = new StringBuilder(); |
| | | strBuilder.Append(" and a.HDate>'" + dateTimePicker1.Text + "' and a.HDate<'" + dateTimePicker2.Text + " 23:59:59' "); |
| | | strBuilder.Append(" and a.HDate>'" + dateTimePicker1.Text + "' and a.HDate<'" + dateTimePicker2.Text + "' "); |
| | | if (!string.IsNullOrEmpty(textBox1.Text)) |
| | | strBuilder.Append(" and c.HName like '%" + textBox1.Text + "%' "); |
| | | if (!string.IsNullOrEmpty(textBox2.Text)) |
| | |
| | | // |
| | | // dateTimePicker2 |
| | | // |
| | | this.dateTimePicker2.CustomFormat = "yyyy-MM-dd "; |
| | | this.dateTimePicker2.CustomFormat = "yyyy-MM-dd HH:mm:ss"; |
| | | this.dateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Custom; |
| | | this.dateTimePicker2.Location = new System.Drawing.Point(323, 29); |
| | | this.dateTimePicker2.Location = new System.Drawing.Point(337, 29); |
| | | this.dateTimePicker2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); |
| | | this.dateTimePicker2.Name = "dateTimePicker2"; |
| | | this.dateTimePicker2.Size = new System.Drawing.Size(189, 25); |
| | | this.dateTimePicker2.Size = new System.Drawing.Size(200, 25); |
| | | this.dateTimePicker2.TabIndex = 33; |
| | | // |
| | | // dateTimePicker1 |
| | | // |
| | | this.dateTimePicker1.CustomFormat = "yyyy-MM-dd "; |
| | | this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss"; |
| | | this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom; |
| | | this.dateTimePicker1.Location = new System.Drawing.Point(105, 29); |
| | | this.dateTimePicker1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); |
| | | this.dateTimePicker1.Name = "dateTimePicker1"; |
| | | this.dateTimePicker1.Size = new System.Drawing.Size(189, 25); |
| | | this.dateTimePicker1.Size = new System.Drawing.Size(203, 25); |
| | | this.dateTimePicker1.TabIndex = 32; |
| | | // |
| | | // label9 |
| | | // |
| | | this.label9.AutoSize = true; |
| | | this.label9.Location = new System.Drawing.Point(301, 35); |
| | | this.label9.Location = new System.Drawing.Point(315, 36); |
| | | this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label9.Name = "label9"; |
| | | this.label9.Size = new System.Drawing.Size(15, 15); |
| | |
| | | // |
| | | // dateTimePicker2 |
| | | // |
| | | this.dateTimePicker2.CustomFormat = "yyyy-MM-dd "; |
| | | this.dateTimePicker2.CustomFormat = "yyyy-MM-dd HH:mm:ss"; |
| | | this.dateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Custom; |
| | | this.dateTimePicker2.Location = new System.Drawing.Point(338, 29); |
| | | this.dateTimePicker2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); |
| | | this.dateTimePicker2.Name = "dateTimePicker2"; |
| | | this.dateTimePicker2.Size = new System.Drawing.Size(189, 25); |
| | | this.dateTimePicker2.Size = new System.Drawing.Size(203, 25); |
| | | this.dateTimePicker2.TabIndex = 33; |
| | | // |
| | | // dateTimePicker1 |
| | | // |
| | | this.dateTimePicker1.CustomFormat = "yyyy-MM-dd "; |
| | | this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss"; |
| | | this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom; |
| | | this.dateTimePicker1.Location = new System.Drawing.Point(120, 29); |
| | | this.dateTimePicker1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); |
| | | this.dateTimePicker1.Name = "dateTimePicker1"; |
| | | this.dateTimePicker1.Size = new System.Drawing.Size(189, 25); |
| | | this.dateTimePicker1.Size = new System.Drawing.Size(199, 25); |
| | | this.dateTimePicker1.TabIndex = 32; |
| | | // |
| | | // label9 |
| | | // |
| | | this.label9.AutoSize = true; |
| | | this.label9.Location = new System.Drawing.Point(316, 36); |
| | | this.label9.Location = new System.Drawing.Point(326, 36); |
| | | this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); |
| | | this.label9.Name = "label9"; |
| | | this.label9.Size = new System.Drawing.Size(15, 15); |
| | |
| | | |
| | | private void grdMain_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) |
| | | { |
| | | |
| | | if (e.RowIndex < grdMain.Rows.Count) |
| | | { |
| | | DataGridViewRow dgrSingle = grdMain.Rows[e.RowIndex]; |
| | | try |
| | | { |
| | | var rowIndex = DBUtility.Xt_BaseBillFun.Fun_GetCol("订åé¢è®¡äº¤è´§æ¶é´", grdMain); |
| | | if (dgrSingle.Cells[rowIndex].Value == null) |
| | | return; |
| | | var pusTimeStr = dgrSingle.Cells[rowIndex].Value.ToString().Trim();//è·åæ°é |
| | | if (string.IsNullOrEmpty(pusTimeStr)) |
| | | return; |
| | | if (DateTime.Parse(pusTimeStr) < DateTime.Now) |
| | | { |
| | | // 设置åå
æ ¼çèæ¯è² |
| | | dgrSingle.DefaultCellStyle.BackColor = Color.FromArgb(255, 128, 128); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |