Ejemplo n.º 1
0
        void button2_Click(object sender, EventArgs e)
        {
            WebFrame.Data.JTable tab1 = new WebFrame.Data.JTable("COMMTRAINWEIGHTPROFILE");
            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 = "Speed,YzPrice,RzPrice,SYzPrice,SRzPrice,YwPrice,RwPrice,GRw19KPrice,GRw19TPrice,CaPrice,KdPrice".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)
                    {
                        data1[m] = t1.Text;
                    }
                }
                tab1.EditData(data1, condition);
                i++;
            }
            tab1.Close();
            BusinessRule.CheXianProfile.SetData();
            WebFrame.Util.JAjax.Alert("提示:更新数据操作成功!");
        }
        private void UpdateOil()
        {
            WebFrame.Data.JTable tab1 = new WebFrame.Data.JTable("COMMTRAINWEIGHTPROFILE");
            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 = 2;

            String[] arr1 = "Oil".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)
                    {
                        data1[m] = t1.Text;
                    }
                }
                tab1.EditData(data1, condition);
                i = i + 1;
            }
            tab1.Close();
            BusinessRule.CheXianProfile.SetData();
            WebFrame.Util.JAjax.Alert("提示:更新数据操作成功!");
        }
        //Submit Data
        void button1_Click(object sender, EventArgs e)
        {
            WebFrame.Data.JTable tab1 = new WebFrame.Data.JTable("CHEXIANBIANZHU");
            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>();
            for (int i = 1; i <= 17; i++)
            {
                condition.Clear();
                condition.Add(new WebFrame.Data.SearchField("id", i + "", WebFrame.SearchFieldType.NumericType));
                data1.Clear();

                TextBox t1 = Rate1.Parent.FindControl("Rate" + i) as TextBox;
                if (t1 != null)
                {
                    data1["Rate"] = t1.Text;
                }


                TextBox t2 = Person1.Parent.FindControl("Person" + i) as TextBox;
                if (t2 != null)
                {
                    data1["Person"] = t2.Text;
                }
                tab1.EditData(data1, condition);
            }
            tab1.Close();
            ChexianBianZhuData.SetData();
            WebFrame.Util.JAjax.Alert("提示:更新数据操作成功!");
        }
        void button1_Click(object sender, EventArgs e)
        {
            WebFrame.Data.JTable tab1 = new WebFrame.Data.JTable("TRAINLINEKINDPROFILE");
            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 = 0;

            String[] arr1 = "JieChuFee,DianFee".Split(',');
            foreach (RepeaterItem item in this.Repeater1.Items)
            {
                condition.Clear();
                condition.Add(new WebFrame.Data.SearchField("LineID", 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.TrainLineKindProfile.SetData();
            WebFrame.Util.JAjax.Alert("提示:更新数据操作成功!");
        }
Ejemplo n.º 5
0
        //更新列车的定员
        void JButton2_Click(object sender, EventArgs e)
        {
            WebFrame.Data.JTable tab1 = new WebFrame.Data.JTable("HIGHTRAINPROFILE");
            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 = "PCount5,PCount4,PCount1,PCount2,PCount3".Split(',');
            foreach (RepeaterItem item in this.Repeater2.Items)
            {
                condition.Clear();
                condition.Add(new WebFrame.Data.SearchField("ID", 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();

            HighTrainProfile.SetData();
            WebFrame.Util.JAjax.Alert("提示:更新数据操作成功!");
        }