using AIMS.OperationAanesthesia; using AIMSBLL; using AIMSDAL; using AIMSExtension; using AIMSModel; using DCSoftDotfuscate; using DevComponents.Editors; using Microsoft.Office.Interop.Excel; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Data; using System.Diagnostics; using System.Drawing; using System.Linq; using System.Reflection; using System.Text; using System.Windows.Forms; namespace AIMS.OperationAfter.UI { public partial class frmOperationCharg3 : Form { System.Data.DataTable operationApplys; public string FeeType = "麻醉"; public List upHisDrugs; public string DataGridViewPath = ""; public SysConfig exportConfig; public frmOperationCharg3() { InitializeComponent(); } private void frmOperationDruggCheck_Load(object sender, EventArgs e) { try { dtpOpeTime.Value = DateTime.Now; dtpEnd.Value = dtpOpeTime.Value; dgvOperation.AutoGenerateColumns = false; DataGridViewPath = GetControlPath(dgvDrugs); exportConfig = BSysConfig.SelectSingle(" Note='" + DataGridViewPath + "'", null, RecursiveType.None, 0); LoadSelectDate(); if (exportConfig != null) ConfigDataGridView(exportConfig); if (upHisDrugs != null && upHisDrugs.Count > 0) { dtpOpeTime.Value = upHisDrugs[0].EndTime.Value; } } catch (Exception exp) { PublicMethod.WriteLog(exp); } } public void LoadSelectDate() { string where = " "; upHisDrugs = BFeesRecordReport.Select(" FeeType='" + FeeType + "' " + where + " order by endtime desc", null); dgvOperation.DataSource = upHisDrugs; dgvOperation.ClearSelection(); } private void btnOK_Click(object sender, EventArgs e) { if (comboBoxExType.Text == "") return; if (cnoDrugName.Text == "") return; string beginTime = Convert.ToDateTime(dtpOpeTime.Value).ToString("yyyy-MM-dd 00:00:00"); string endTime = Convert.ToDateTime(dtpEnd.Value).ToString("yyyy-MM-dd 23:59:59"); string sql = string.Format(" ExecTime>='{0}' and ExecTime<'{1}'", beginTime, endTime); if (comboBoxExType.SelectedItem != null) { ComboItem chargitem = comboBoxExType.SelectedItem as ComboItem; sql += " and (FeeTypeId = '" + chargitem.Value + "' ) "; } if (cnoDrugName.SelectedItem != null) { ComboItem chargitem = cnoDrugName.SelectedItem as ComboItem; sql += " and (ChargName = '" + chargitem.Value + "' ) "; } if (FeeType != "") { sql += " and (FeeType = '" + FeeType + "' ) "; } operationApplys = BFeesRecordReport.GetUpListByWhere3(sql); dgvDrugs.DataSource = operationApplys; if (exportConfig != null) ConfigDataGridView(exportConfig); } private void toolStripButton10_Click(object sender, EventArgs e) { this.Close(); } /// /// 表格配置 /// /// /// private void tsbSettingDGV_Click(object sender, EventArgs e) { } private static string GetControlPath(Control control) { StringBuilder controlPathStringBuilder = new StringBuilder(); controlPathStringBuilder.Append(control.Name); while (control.Parent != null) { control = control.Parent; controlPathStringBuilder.Append("." + control.Name); } return controlPathStringBuilder.ToString(); } public ExportConfig dataGridViewSetting; private void ConfigDataGridView(SysConfig exportConfig) { try { dataGridViewSetting = JsonConvert.DeserializeObject(exportConfig.Value); foreach (DataGridViewColumn column in dgvDrugs.Columns) { foreach (var item in dataGridViewSetting.Exports) { if (column.Name == "Id") { column.Visible = false; } else if (column.Name == item.Name) { column.Visible = item.IsVisible; column.Width = item.Width; } } } } catch (Exception ex) { PublicMethod.WriteLog(ex); } } private void button1_Click(object sender, EventArgs e) { if (comboBoxExType.Text == "") return; if (cnoDrugName.Text == "") return; KillAllExcel(); ExprotExcel2(); } private Microsoft.Office.Interop.Excel.Application myExcel = null; private void ExprotExcel2(bool isPrint = false) { //自定义表头 string title = "查询管理数据"; if (comboBoxExType.Text == "精神I类") { title = "麻醉药品第一类精神药品使用登记簿"; } else if (comboBoxExType.Text == "精神II类") { title = "麻醉药品第二类精神药品使用登记簿"; } else if (comboBoxExType.Text == "麻醉药") { title = "麻醉药品使用登记簿"; } //是否横向 bool xlLandscape = true; if (dataGridViewSetting != null && dataGridViewSetting.Landscape == false) xlLandscape = false; //主体字体大小 int BodySize = 9; if (dataGridViewSetting != null && dataGridViewSetting.FontSize > 0) BodySize = dataGridViewSetting.FontSize; myExcel = new Microsoft.Office.Interop.Excel.Application(); this.Cursor = Cursors.WaitCursor; //保存文化环境 System.Globalization.CultureInfo CurrentCI = System.Threading.Thread.CurrentThread.CurrentCulture; System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US"); Workbook workbookData = myExcel.Workbooks.Add(Missing.Value); Worksheet xlSheet = (Microsoft.Office.Interop.Excel.Worksheet)workbookData.Worksheets[1]; xlSheet.Name = title; if (isPrint == false) myExcel.Visible = true; myExcel.Cells[1, 1] = title;//默认的就是在sheet1里面的。 string DrugName = ""; Drugs drug = BDrugs.SelectSingle(" name='" + cnoDrugName.Text + "'", null); DrugName = " 品名:" + drug.Name + " 规格:" + drug.Stand + " 单位:" + drug.Unit; myExcel.Cells[2, 1] = DrugName;//默认的就是在sheet1里面的。 int startIndex = 3; WorksheetClass wsClass = new WorksheetClass(); Dictionary Columns = new Dictionary(); //填充标题 for (int i = 0; i < dgvDrugs.Columns.Count; i++) { if (dataGridViewSetting != null) { foreach (var item in dataGridViewSetting.Exports) { if (dgvDrugs.Columns[i].Name == item.Name) { if (item.IsPrint == true) { Columns.Add(i, dgvDrugs.Columns[i].HeaderText); continue; } } } } else { if (dgvDrugs.Columns[i].Visible == true) Columns.Add(i, dgvDrugs.Columns[i].HeaderText); } } List> ColumnsStr = Columns.ToList(); for (int i = 0; i < ColumnsStr.Count; i++) { myExcel.Cells[startIndex, i + 1] = ColumnsStr[i].Value; if (dataGridViewSetting != null) { foreach (var item in dataGridViewSetting.Exports) { if (ColumnsStr[i].Value == item.Text) { xlSheet.get_Range(xlSheet.Cells[startIndex, i + 1], xlSheet.Cells[startIndex, i + 1]).ColumnWidth = item.PrintWidth;//列宽 } } } else { xlSheet.get_Range(xlSheet.Cells[startIndex, i + 1], xlSheet.Cells[startIndex, i + 1]).ColumnWidth = 5;//列宽 } } //获得数据表的值 int RowCount = dgvDrugs.Rows.Count; int colCount = ColumnsStr.Count; //设置填充单元格样式 xlSheet.get_Range(xlSheet.Cells[startIndex, 1], xlSheet.Cells[RowCount + startIndex, colCount]).Borders.LineStyle = XlLineStyle.xlContinuous;//边框的样式 object[,] objData = new object[RowCount, colCount]; //将DataTable里的值填充到对象数组中 for (int i = 0; i < RowCount; i++) { for (int j = 0; j < colCount; j++) { if (dgvDrugs.Columns[ColumnsStr[j].Key].Name == "序号" || dgvDrugs.Columns[ColumnsStr[j].Key].Name == "ApplyId") objData[i, j] = i + 1; else if (dgvDrugs.Rows[i].Cells[ColumnsStr[j].Key].Value != null) objData[i, j] = dgvDrugs.Rows[i].Cells[ColumnsStr[j].Key].Value.ToString().Trim(); } System.Windows.Forms.Application.DoEvents(); } //将对象数组的值赋值给Excel Range range = xlSheet.get_Range(xlSheet.Cells[4, 1], xlSheet.Cells[RowCount + startIndex, colCount]); range.NumberFormat = "@"; range.Value2 = objData; range.RowHeight = 19; //xlSheet.get_Range(xlSheet.Cells[2, 1], xlSheet.Cells[RowCount + 2, colCount]).Font.Size = BodySize;//字体大小 //设置主标题单元格的样式 xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).MergeCells = true;//合并单元格 xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).HorizontalAlignment = XlHAlign.xlHAlignCenter;//水平对齐方式 xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).VerticalAlignment = XlVAlign.xlVAlignCenter;//垂直对齐方式 xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).Font.Bold = true;//字体加粗 xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).Font.ColorIndex = 0;//字体颜色 //xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).Font.Italic = true;//是否斜体 xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).Font.Size = 20;//字体大小 //xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[2, colCount]).Borders.LineStyle = XlLineStyle.xlContinuous;//边框样式 xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).RowHeight = 33.75;//行高 xlSheet.get_Range(xlSheet.Cells[2, 1], xlSheet.Cells[2, colCount]).MergeCells = true;//合并单元格 //设置标题单元格样式 xlSheet.get_Range(xlSheet.Cells[2, 1], xlSheet.Cells[startIndex, colCount]).RowHeight = 21;//行高 if (xlLandscape == true) xlSheet.PageSetup.Orientation = XlPageOrientation.xlLandscape;//页面方向为横向 //复苏文化环境 System.Threading.Thread.CurrentThread.CurrentCulture = CurrentCI; try { if (isPrint == true) xlSheet.PrintOutEx(); //myExcel.Save(@"D:a.xls"); //myExcel.Quit(); this.Cursor = Cursors.Default; //MessageBox.Show("导出成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } finally { if (isPrint == true) { //释放资源 System.Runtime.InteropServices.Marshal.ReleaseComObject(xlSheet); System.Runtime.InteropServices.Marshal.ReleaseComObject(workbookData); System.Runtime.InteropServices.Marshal.ReleaseComObject(range); System.Runtime.InteropServices.Marshal.ReleaseComObject(myExcel); GC.Collect(); range = null; xlSheet = null; workbookData = null; myExcel = null; KillAllExcel(); } } } private void KillAllExcel() { List excelProcess = GetExcelProcesses(); for (int i = 0; i < excelProcess.Count; i++) { excelProcess[i].Kill(); } } private List GetExcelProcesses() { Process[] processes = Process.GetProcesses(); List excelProcesses = new List(); for (int i = 0; i < processes.Length; i++) { if (processes[i].ProcessName.ToUpper() == "EXCEL") excelProcesses.Add(processes[i]); } return excelProcesses; } private void cboRoom_SelectedIndexChanged(object sender, EventArgs e) { System.Data.DataTable table = BFeesRecordReport.GetDrugByType(comboBoxExType.Text); cnoDrugName.Items.Clear(); for (int i = 0; i < table.Rows.Count; i++) { ComboItem item = new ComboItem(); item.Text = table.Rows[i][0].ToString(); item.Value = table.Rows[i][0].ToString(); cnoDrugName.Items.Add(item); } } public int OpeID = 0; private void dgvOperation_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dgvOperation.SelectedRows.Count > 0) { OpeID = Convert.ToInt32(dgvOperation.SelectedRows[0].Cells[0].Value.ToString()); } if (OpeID == 0) { return; } FeesRecordReport upHis = BFeesRecordReport.SelectSingle(OpeID); cboRoom.Text = upHis.ExecDepartmentName; FeeType = upHis.FeeType; if (upHis.FeeType == "麻醉") rdoMz.Checked = true; else rdoHs.Checked = true; comboBoxExType.Text = upHis.ChargType; cnoDrugName.Text = upHis.PageType; dtpOpeTime.Value = upHis.StartTime.Value; dtpEnd.Value = upHis.EndTime.Value; btnOK_Click(null, null); } private void voidableRadioButton2_CheckedChanged(object sender, EventArgs e) { if (rdoMz.Checked == true) { FeeType = "麻醉"; } else { FeeType = "护士"; } LoadSelectDate(); } private void btnSave_Click(object sender, EventArgs e) { if (comboBoxExType.Text == "") return; if (cnoDrugName.Text == "") return; FeesRecordReport upHisDrugOrdersSDYSelect = new FeesRecordReport(); DateTime beginTime = Convert.ToDateTime(dtpOpeTime.Value); DateTime endTime = Convert.ToDateTime(dtpEnd.Value); upHisDrugOrdersSDYSelect.StartTime = beginTime; upHisDrugOrdersSDYSelect.EndTime = endTime; upHisDrugOrdersSDYSelect.FeeType = FeeType; upHisDrugOrdersSDYSelect.ChargType = comboBoxExType.Text; upHisDrugOrdersSDYSelect.PageType = cnoDrugName.Text; upHisDrugOrdersSDYSelect.OperatorId = PublicMethod.OperatorId; upHisDrugOrdersSDYSelect.OperatorTime = DateTime.Now; BFeesRecordReport.Insert(upHisDrugOrdersSDYSelect); foreach (DataGridViewRow item in dgvDrugs.Rows) { string feerid = item.Cells[0].EditedFormattedValue.ToString(); FeesRecord report = BFeesRecord.SelectSingle(Convert.ToInt32(feerid)); report.InsureNO = item.Cells[6].EditedFormattedValue.ToString(); report.Extend5 = item.Cells[12].EditedFormattedValue.ToString(); report.Conclusion = item.Cells[10].EditedFormattedValue.ToString(); report.IsInsure = item.Cells[9].EditedFormattedValue.ToString(); //report.LimitDrug = item.Cells[2].EditedFormattedValue.ToString(); BFeesRecord.Update(report); } MessageBox.Show("保存成功!", "系统提示"); LoadSelectDate(); } private void dgvDrugs_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { //隔行换色 this.dgvDrugs.RowsDefaultCellStyle.BackColor = Color.White;//设置背景为白色 this.dgvDrugs.AlternatingRowsDefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(222)))), (((int)(((byte)242)))));//青色 } private void btnDelete_Click(object sender, EventArgs e) { if (OpeID == 0) { return; } FeesRecordReport upHis = BFeesRecordReport.SelectSingle(OpeID); BFeesRecordReport.Delete(upHis); MessageBox.Show("删除成功!", "系统提示"); OpeID = 0; dgvDrugs.DataSource = null; LoadSelectDate(); } private void dgvDrugs_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { DialogResult dialog = MessageBox.Show("是否批量填写数据?", "系统提示", MessageBoxButtons.YesNo); if (dialog == DialogResult.Yes) { string batchNo = dgvDrugs.Rows[e.RowIndex].Cells[e.ColumnIndex].EditedFormattedValue.ToString(); for (int i = 0; i < dgvDrugs.Rows.Count; i++) { dgvDrugs.Rows[i].Cells[e.ColumnIndex].Value = batchNo; } } } private void toolStripButton2_Click(object sender, EventArgs e) { frmExportConfig formDataGridViewConfig = new frmExportConfig(dgvDrugs, exportConfig, DataGridViewPath, this.Text); if (formDataGridViewConfig.ShowDialog() == DialogResult.OK) { exportConfig = formDataGridViewConfig.exportConfig; ConfigDataGridView(formDataGridViewConfig.exportConfig); } } private void toolStripButton3_Click(object sender, EventArgs e) { KillAllExcel(); if (dgvDrugs.Rows.Count <= 0) return; List groupedList = new List(); foreach (DataGridViewRow item in dgvDrugs.Rows) { groupedList.Add(item); } int n = 21; List> groupedLists = new List>(); for (int i = 0; i < groupedList.Count; i += n) { List group = groupedList.GetRange(i, Math.Min(n, groupedList.Count - i)); groupedLists.Add(group); } foreach (List item in groupedLists) { ExprotExcel3(item, true); } } private void ExprotExcel3(List itemlist, bool isPrint = false) { //自定义表头 string title = "麻醉、精一药品注射剂使用、及残余液处理登记表"; //是否横向 bool xlLandscape = true; if (dataGridViewSetting != null && dataGridViewSetting.Landscape == false) xlLandscape = false; //主体字体大小 int BodySize = 9; if (dataGridViewSetting != null && dataGridViewSetting.FontSize > 0) BodySize = dataGridViewSetting.FontSize; myExcel = new Microsoft.Office.Interop.Excel.Application(); this.Cursor = Cursors.WaitCursor; //保存文化环境 System.Globalization.CultureInfo CurrentCI = System.Threading.Thread.CurrentThread.CurrentCulture; System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US"); Workbook workbookData = myExcel.Workbooks.Add(Missing.Value); Worksheet xlSheet = (Microsoft.Office.Interop.Excel.Worksheet)workbookData.Worksheets[1]; xlSheet.Name = title; if (isPrint == false) myExcel.Visible = true; myExcel.Cells[1, 1] = title;//默认的就是在sheet1里面的。 string DrugName = "科室:麻醉科"; myExcel.Cells[2, 1] = DrugName;//默认的就是在sheet1里面的。 int startIndex = 3; WorksheetClass wsClass = new WorksheetClass(); Dictionary Columns = new Dictionary(); //填充标题 for (int i = 0; i < dgvDrugs.Columns.Count; i++) { if (dataGridViewSetting != null) { foreach (var item in dataGridViewSetting.Exports) { if (dgvDrugs.Columns[i].Name == item.Name) { if (item.IsPrint == true) { Columns.Add(i, dgvDrugs.Columns[i].HeaderText); continue; } } } } else { if (dgvDrugs.Columns[i].Visible == true) Columns.Add(i, dgvDrugs.Columns[i].HeaderText); } } List> ColumnsStr = Columns.ToList(); for (int i = 0; i < ColumnsStr.Count; i++) { myExcel.Cells[startIndex, i + 1] = ColumnsStr[i].Value; if (dataGridViewSetting != null) { foreach (var item in dataGridViewSetting.Exports) { if (ColumnsStr[i].Value == item.Text) { xlSheet.get_Range(xlSheet.Cells[startIndex, i + 1], xlSheet.Cells[startIndex, i + 1]).ColumnWidth = item.PrintWidth;//列宽 } } } else { xlSheet.get_Range(xlSheet.Cells[startIndex, i + 1], xlSheet.Cells[startIndex, i + 1]).ColumnWidth = 5;//列宽 } } //获得数据表的值 int RowCount = itemlist.Count; int colCount = ColumnsStr.Count; //设置填充单元格样式 xlSheet.get_Range(xlSheet.Cells[startIndex, 1], xlSheet.Cells[RowCount + startIndex, colCount]).Borders.LineStyle = XlLineStyle.xlContinuous;//边框的样式 object[,] objData = new object[RowCount, colCount]; //将DataTable里的值填充到对象数组中 for (int i = 0; i < RowCount; i++) { for (int j = 0; j < colCount; j++) { if (dgvDrugs.Columns[ColumnsStr[j].Key].Name == "序号" || dgvDrugs.Columns[ColumnsStr[j].Key].Name == "ApplyId") objData[i, j] = i + 1; else if (itemlist[i].Cells[ColumnsStr[j].Key].Value != null) objData[i, j] = itemlist[i].Cells[ColumnsStr[j].Key].Value.ToString().Trim(); } System.Windows.Forms.Application.DoEvents(); } //将对象数组的值赋值给Excel Range range = xlSheet.get_Range(xlSheet.Cells[4, 1], xlSheet.Cells[RowCount + startIndex, colCount]); range.NumberFormat = "@"; range.Value2 = objData; range.RowHeight = 19; //xlSheet.get_Range(xlSheet.Cells[2, 1], xlSheet.Cells[RowCount + 2, colCount]).Font.Size = BodySize;//字体大小 //设置主标题单元格的样式 xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).MergeCells = true;//合并单元格 xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).HorizontalAlignment = XlHAlign.xlHAlignCenter;//水平对齐方式 xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).VerticalAlignment = XlVAlign.xlVAlignCenter;//垂直对齐方式 xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).Font.Bold = true;//字体加粗 xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).Font.ColorIndex = 0;//字体颜色 //xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).Font.Italic = true;//是否斜体 xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).Font.Size = 20;//字体大小 //xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[2, colCount]).Borders.LineStyle = XlLineStyle.xlContinuous;//边框样式 xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).RowHeight = 33.75;//行高 xlSheet.get_Range(xlSheet.Cells[2, 1], xlSheet.Cells[2, colCount]).MergeCells = true;//合并单元格 //设置标题单元格样式 xlSheet.get_Range(xlSheet.Cells[2, 1], xlSheet.Cells[startIndex, colCount]).RowHeight = 21;//行高 if (xlLandscape == true) xlSheet.PageSetup.Orientation = XlPageOrientation.xlLandscape;//页面方向为横向 //复苏文化环境 System.Threading.Thread.CurrentThread.CurrentCulture = CurrentCI; try { if (isPrint == true) xlSheet.PrintOutEx(); //myExcel.Save(@"D:a.xls"); //myExcel.Quit(); this.Cursor = Cursors.Default; //MessageBox.Show("导出成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } finally { if (isPrint == true) { //释放资源 System.Runtime.InteropServices.Marshal.ReleaseComObject(xlSheet); System.Runtime.InteropServices.Marshal.ReleaseComObject(workbookData); System.Runtime.InteropServices.Marshal.ReleaseComObject(range); System.Runtime.InteropServices.Marshal.ReleaseComObject(myExcel); GC.Collect(); range = null; xlSheet = null; workbookData = null; myExcel = null; KillAllExcel(); } } } private void toolStripButton4_Click(object sender, EventArgs e) { if (comboBoxExType.Text == "") return; if (cnoDrugName.Text == "") return; string beginTime = Convert.ToDateTime(dtpOpeTime.Value).ToString("yyyy-MM-dd 00:00:00"); string endTime = Convert.ToDateTime(dtpEnd.Value).ToString("yyyy-MM-dd 23:59:59"); string sql = string.Format(" ExecTime>='{0}' and ExecTime<'{1}'", beginTime, endTime); if (comboBoxExType.SelectedItem != null) { ComboItem chargitem = comboBoxExType.SelectedItem as ComboItem; sql += " and (FeeTypeId = '" + chargitem.Value + "' ) "; } if (cnoDrugName.SelectedItem != null) { ComboItem chargitem = cnoDrugName.SelectedItem as ComboItem; sql += " and (ChargName = '" + chargitem.Value + "' ) "; } if (FeeType != "") { sql += " and (FeeType = '" + FeeType + "' ) "; } BFeesRecordReport.UpdateChargcyl(sql); btnOK_Click(null, null); } } }