void button1_Click(object sender, EventArgs e) { WebFrame.Data.JTable tab1 = new WebFrame.Data.JTable("PERSONGZ"); System.Collections.Generic.List <WebFrame.Data.SearchField> condition = new System.Collections.Generic.List <WebFrame.Data.SearchField>(); System.Collections.Generic.Dictionary <String, object> data1 = new System.Collections.Generic.Dictionary <string, object>(); int i = 10; String[] arr1 = "Qtfy".Split(','); foreach (RepeaterItem item in this.Repeater1.Items) { condition.Clear(); condition.Add(new WebFrame.Data.SearchField("num", i + "", WebFrame.SearchFieldType.NumericType)); data1.Clear(); foreach (String m in arr1) { TextBox t1 = item.FindControl(m) as TextBox; if (t1 != null) { data1[m] = t1.Text; } } tab1.EditData(data1, condition); i++; } tab1.Close(); BusinessRule.PersonGZProfile.SetData(); WebFrame.Util.JAjax.Alert("提示:更新数据操作成功!"); }
private void BindData() { String trainkind = Request.QueryString["kind"]; WebFrame.Data.JTable tab1 = new WebFrame.Data.JTable("NewTrain"); tab1.OrderBy = "trainname"; System.Collections.Generic.List <WebFrame.Data.SearchField> list1 = new List <WebFrame.Data.SearchField>(); list1.Add(new WebFrame.Data.SearchField("TrainType", trainkind)); System.Data.DataSet ds1 = tab1.SearchData(list1, -1, "trainname"); tab1.Close(); this.repeater1.DataSource = ds1; this.repeater1.DataBind(); }
void button2_Click(object sender, EventArgs e) { WebFrame.Data.JTable tab1 = new WebFrame.Data.JTable("A2A3FEE"); System.Collections.Generic.List <WebFrame.Data.SearchField> condition = new System.Collections.Generic.List <WebFrame.Data.SearchField>(); System.Collections.Generic.Dictionary <String, object> data1 = new System.Collections.Generic.Dictionary <string, object>(); int i = 1; String[] arr1 = "A2Fee,A3Fee".Split(','); foreach (RepeaterItem item in this.Repeater2.Items) { condition.Clear(); condition.Add(new WebFrame.Data.SearchField("num", i + "", WebFrame.SearchFieldType.NumericType)); data1.Clear(); foreach (String m in arr1) { TextBox t1 = item.FindControl(m) as TextBox; if (t1 != null) { if (t1.Text.Trim() != String.Empty) { data1[m] = t1.Text; } else { data1[m] = "0"; } } } tab1.EditData(data1, condition); i++; } tab1.Close(); BusinessRule.CheXianProfile.SetData(); BusinessRule.RiChangFeeProfile.SetData(); BusinessRule.A2A3FeeProfile.SetData(); WebFrame.Util.JAjax.Alert("提示:更新数据操作成功!"); }