| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using CoreFS.CA06;
- namespace Core.LZMes.Client.UIE
- {
- public partial class UIE041010 : FrmBase
- {
- public UIE041010()
- {
- InitializeComponent();
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- this.DoQuery();
- break;
- case "Save":
- this.DoUpdate();
- break;
- }
- }
- private void DoQuery()
- {
- try
- {
- string areaType = "1";
- this.dataSet1.Tables[0].Clear();
- CoreClientParam ccp = new CoreClientParam();
- ccp.InvokeID = "C06010103";
- ccp.ServerName = "UIE.UIE01.UIE041010";
- ccp.MethodName = "query01";
- ccp.ServerParams = new object[] { areaType };
- ccp.SourceDataTable = this.dataSet1.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- Console.WriteLine(this.dataSet1.Tables[0].ToString());
- }
- catch (Exception EX)
- {
- MessageBox.Show(EX.ToString());
- }
- }
- private void DoUpdate()
- {
- try
- {
- string used_yn = "";
- string proc_rate = this.textBox3.Text;
- string proc_cd = this.textBox2.Text;
- if (this.checkBox1.Checked) {
- used_yn = "Y";
- }else{
- used_yn = "N";
- }
-
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "UIE.UIE01.UIE041010";
- ccp.MethodName = "update01";
- ccp.ServerParams = new object[] { proc_rate, used_yn, proc_cd };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != 0) return;
- this.ultraGrid1.Refresh();
- MessageBox.Show("修改数据成功!");
- }
- catch (Exception EX)
- {
- MessageBox.Show(EX.ToString());
- }
- }
- private void checkBox1_CheckedChanged(object sender, EventArgs e)
- {
- if (!this.checkBox1.Checked)
- {
- this.textBox1.Text = "";
- this.textBox2.Text = "";
- this.textBox3.Text = "";
- }
- }
- private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
- {
- string v_proc_rate = Convert.ToString(Common.FixDBManager.CheckNullStr(this.ultraGrid1.ActiveRow.Cells["PROC_RATE"].Value));
- string v_proc_nm = Convert.ToString(Common.FixDBManager.CheckNullStr(this.ultraGrid1.ActiveRow.Cells["PROC_NM"].Value));
- string v_proc_cd = Convert.ToString(Common.FixDBManager.CheckNullStr(this.ultraGrid1.ActiveRow.Cells["PROC_CD"].Value));
- string v_chk = Convert.ToString(Common.FixDBManager.CheckNullStr(this.ultraGrid1.ActiveRow.Cells["USED_YN"].Value));
- this.textBox3.Text = v_proc_rate;
- this.textBox1.Text = v_proc_nm;
- this.textBox2.Text = v_proc_cd;
- if (v_chk.Equals("Y"))
- {
- this.checkBox1.Checked = true;
- }
- else
- {
- this.checkBox1.Checked = false;
- }
-
- }
- }
- }
|