protected override void ExecItemSearch() { List <string> FieldText = new List <string>(); List <string> FieldName = new List <string>(); List <GRFieldType> FieldType = new List <GRFieldType>(); string s = ""; for (int i = ReportStartIndex; i <= Report.DetailGrid.Columns.Count; i++) { if (!Report.DetailGrid.Columns[i].TitleCell.FreeCell) { s = Report.DetailGrid.Columns[i].TitleCell.Text; if (Report.DetailGrid.Columns[i].TitleCell.SupCell != null) { s = Report.DetailGrid.Columns[i].TitleCell.SupCell.Text + s; } FieldText.Add(s); s = Report.DetailGrid.Columns[i].ContentCell.DataField; FieldName.Add(s); FieldType.Add(Report.FieldByName(s).FieldType); } } frmPubFind frm = new frmPubFind(this.Text + "[" + CurrentTool + "]", FindSQL, FindOrderBy, FindKeyWord, FieldText, FieldName, FieldType, FindShowTime); if (frm.ShowDialog() == DialogResult.OK) { QuerySQL = frm.QuerySQL; ExecItemRefresh(); } }
private void ItemSearch_Click(object sender, EventArgs e) { List <string> FieldText = new List <string>(); List <string> FieldName = new List <string>(); List <GRFieldType> FieldType = new List <GRFieldType>(); FieldName.Add("CardStatusName"); FieldName.Add("CardTypeName"); FieldName.Add("EmpNo"); FieldName.Add("EmpName"); FieldName.Add("DepartID"); FieldName.Add("DepartName"); for (int i = 0; i < FieldName.Count; i++) { FieldText.Add(Pub.GetResText(formCode, FieldName[i], "")); FieldType.Add(GRFieldType.grftString); } frmPubFind frm = new frmPubFind(this.Text + "[" + ItemSearch.Text + "]", OriginSQL, Pub.GetSQL(DBCode.DB_001003, new string[] { "302" }), formCode, FieldText, FieldName, FieldType, false); if (frm.ShowDialog() == DialogResult.OK) { QuerySQL = frm.QuerySQL; LoadData(); } }
protected override void ExecItemSearch() { List <string> FieldText = new List <string>(); List <string> FieldName = new List <string>(); List <GRFieldType> FieldType = new List <GRFieldType>(); string s = ""; string FindKeyWord = formCode; if (tabControl1.SelectedIndex == 0) { for (int i = 1; i <= Report.DetailGrid.Columns.Count; i++) { if (Report.DetailGrid.Columns[i].TitleCell.FreeCell) { continue; } s = Report.DetailGrid.Columns[i].TitleCell.Text; if (Report.DetailGrid.Columns[i].TitleCell.SupCell != null) { s = Report.DetailGrid.Columns[i].TitleCell.SupCell.Text + s; } FieldText.Add(s); s = Report.DetailGrid.Columns[i].ContentCell.DataField; FieldName.Add(s); FieldType.Add(Report.FieldByName(s).FieldType); } frmPubFind frm = new frmPubFind(this.Text + "[" + CurrentTool + "]", FindSQL, FindOrderBy, FindKeyWord, FieldText, FieldName, FieldType, false); if (frm.ShowDialog() == DialogResult.OK) { QuerySQL = frm.QuerySQL; ExecItemRefresh(); } } else { FindKeyWord += "History"; for (int i = 1; i <= Report1.DetailGrid.Columns.Count - 1; i++) { if (Report1.DetailGrid.Columns[i].TitleCell.FreeCell) { continue; } s = Report1.DetailGrid.Columns[i].TitleCell.Text; if (Report1.DetailGrid.Columns[i].TitleCell.SupCell != null) { s = Report1.DetailGrid.Columns[i].TitleCell.SupCell.Text + s; } FieldText.Add(s); s = Report1.DetailGrid.Columns[i].ContentCell.DataField; FieldName.Add(s); FieldType.Add(Report1.FieldByName(s).FieldType); } frmPubFind frm = new frmPubFind(this.Text + "[" + CurrentTool + "]", FindSQL1, FindOrderBy, FindKeyWord, FieldText, FieldName, FieldType, false); if (frm.ShowDialog() == DialogResult.OK) { QuerySQL1 = frm.QuerySQL; ExecItemRefresh(); } } }