void button1_Click(object sender, EventArgs e) { JStrInfoBU bu1 = new JStrInfoBU(); List <SearchField> condition = new List <SearchField>(); condition.Add(new SearchField("StrID", "基本硬座费率")); Dictionary <String, object> data1 = new Dictionary <string, object>(); data1["StrText"] = this.Fee1.Text; bu1.UpdateData(condition, data1); condition.Clear(); condition.Add(new SearchField("StrID", "空调费率")); data1["StrText"] = this.Fee2.Text; bu1.UpdateData(condition, data1); condition.Clear(); condition.Add(new SearchField("StrID", "保险费率")); data1["StrText"] = this.Fee3.Text; bu1.UpdateData(condition, data1); condition.Clear(); condition.Add(new SearchField("StrID", "卧铺订票费")); data1["StrText"] = this.Fee4.Text; bu1.UpdateData(condition, data1); TrainProfile.SetData(); WebFrame.Util.JAjax.Alert("提示:更新数据操作成功!"); }
void button1_Click(object sender, EventArgs e) { try { double d1 = double.Parse(this.Fee1.Text); if (d1 <= 1.0) { JStrInfoBU bu1 = new JStrInfoBU(); List <SearchField> condition = new List <SearchField>(); condition.Add(new SearchField("StrID", "检修费率系数")); Dictionary <String, object> data1 = new Dictionary <string, object>(); data1["StrText"] = this.Fee1.Text; bu1.UpdateData(condition, data1); BusinessRule.TrainProfile.SetData(); WebFrame.Util.JAjax.Alert("提示:更新数据操作成功!"); } else { WebFrame.Util.JAjax.Alert("提示:此数据不能大于1!"); } } catch (Exception err) { WebFrame.Util.JAjax.Alert("提示:数据类型错误,请重新输入!"); } }
//更新轮渡费单价表 void JButton6_Click(object sender, EventArgs e) { JStrInfoBU bu1 = new JStrInfoBU(); List <SearchField> condition = new List <SearchField>(); condition.Add(new SearchField("StrID", "空调客车轮渡费")); Dictionary <String, object> data1 = new Dictionary <string, object>(); data1["StrText"] = this.ShipFee1.Text; bu1.UpdateData(condition, data1); condition.Clear(); condition.Add(new SearchField("StrID", "非空调客车轮渡费")); data1["StrText"] = this.ShipFee2.Text; bu1.UpdateData(condition, data1); BusinessRule.TrainProfile.SetData(); WebFrame.Util.JAjax.Alert("提示:更新数据操作成功!"); }