| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Drawing;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace Core.LZMes.Client.UIF
- {
- public partial class UIF042010_CTL : UserControl
- {
- public UIF042010_CTL()
- {
- InitializeComponent();
- }
- private string _Condition = "";
- public string Condition
- {
- get
- {
- _Condition = "";
- if (this.chk_SZ.Checked)
- {
- _Condition += " AND INSTR(C.C_PRODNM_CD,'" + this.chk_SZ.Text + "')>0";
- }
- string Appearance = "";
- if (this.chk_FA.Checked)
- Appearance += "'" + this.chk_FA.Text + "',";
- if(this.chk_FB.Checked)
- Appearance += "'" + this.chk_FB.Text + "',";
- if (this.chk_FC.Checked)
- Appearance += "'" + this.chk_FC.Text + "',";
- if (this.chk_FD.Checked)
- Appearance += "'" + this.chk_FD.Text + "',";
- if(Appearance.Length>0)
- {
- Appearance = Appearance.Substring(0,Appearance.Length-1);
- _Condition += " AND C.C_EXTSHAPE_REQ IN(" + Appearance + ")";
- }
- string[] height = mtx_height.Text.Split('~');
- string min_height = height[0].Replace(" ","");
- min_height = min_height == "." ? "0" : min_height;
- string max_height = height[1].Replace(" ", "");
- max_height = max_height == "." ? "99" : max_height;
- _Condition += " AND C.C_ORD_THK BETWEEN " + min_height + " AND " + max_height;
- string[] width = mtx_Width.Text.Split('~');
- string min_width = width[0].Replace(" ","").Length == 0 ? "0" : width[0];
- string max_width = width[1].Replace(" ","").Length == 0 ? "1500" : width[1];
- _Condition += " AND C.C_ORD_WTH BETWEEN " + min_width + " AND " + max_width;
- string[] senddate = mtx_SendDate.Text.Split('~');
- string min_senddate = senddate[0].Replace(" ","")== "--" ? "2010-01-01" : senddate[0];
- string max_senddate = senddate[1].Replace(" ","")== "--" ? "2099-01-01" : senddate[1];
- _Condition += " AND C.DEL_TO_DATE BETWEEN TO_CHAR(TO_DATE('" + min_senddate + "','YYYY-MM-DD'),'YYYYMMDD') "
- + " AND TO_CHAR(TO_DATE('" + max_senddate + "','YYYY-MM-DD'),'YYYYMMDD') ";
- return _Condition;
- }
- }
- private void CheckBox_CheckedChanged(object sender, EventArgs e)
- {
- try
- {
- if ((sender as CheckBox).Checked)
- (sender as CheckBox).BackColor = System.Drawing.Color.LightSteelBlue;
- else
- (sender as CheckBox).BackColor = System.Drawing.Color.White;
- }
- catch (System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- }
- }
|