void _tableview_DetailsRowEnvent(string id)
        {
            string dept_id;
            //string item_id;
            //string object_id;
            string flag_tier;

            int selectrow = int.Parse(id);

            dept_id = current_table.Rows[selectrow - 1][1].ToString();
            //item_id = current_table.Rows[selectrow - 1][3].ToString();
            //object_id = current_table.Rows[selectrow - 1][5].ToString();
            flag_tier = current_table.Rows[selectrow - 1][11].ToString();

            if (flag_tier == "4")
            {
                UcWarningdetails daydetails = new UcWarningdetails(dbOperation, dept_id, ItemId, ObjectId);
                daydetails.SetValue(Grid.RowProperty, 0);
                daydetails.SetValue(Grid.RowSpanProperty, 2);

                grid_info.Children.Add(daydetails);
            }
            else
            {
                UcWarningCountry daydetails = new UcWarningCountry(dbOperation, dept_id, ItemId, ObjectId);
                daydetails.SetValue(Grid.RowProperty, 0);
                daydetails.SetValue(Grid.RowSpanProperty, 2);

                grid_info.Children.Add(daydetails);
            }
        }
Exemple #2
0
        void _tableview_DetailsRowEnvent(string id)
        {
            string dept_id;
            //string item_id;
            //string object_id;
            string flag_tier;

            int selectrow = int.Parse(id);

            dept_id = current_table.Rows[selectrow - 1][1].ToString();
            //item_id = current_table.Rows[selectrow - 1][3].ToString();
            //object_id = current_table.Rows[selectrow - 1][5].ToString();
            flag_tier = current_table.Rows[selectrow - 1][11].ToString();

            if (flag_tier == "4")
            {
                switch (DeptType)
                {
                case "0": UcWarningdetailsProduce daydetails = new UcWarningdetailsProduce(dept_id, ItemId, ObjectId);
                    daydetails.SetValue(Grid.RowProperty, 0);
                    daydetails.SetValue(Grid.RowSpanProperty, 2);
                    grid_info.Children.Add(daydetails);
                    break;

                case "1": UcWarningdetailsFishery daydetails_fishery = new UcWarningdetailsFishery(dept_id, ItemId, ObjectId);
                    daydetails_fishery.SetValue(Grid.RowProperty, 0);
                    daydetails_fishery.SetValue(Grid.RowSpanProperty, 2);
                    grid_info.Children.Add(daydetails_fishery);
                    break;

                case "2": UcWarningdetailsAnimal daydetails_animal = new UcWarningdetailsAnimal(dept_id, ItemId, ObjectId);
                    daydetails_animal.SetValue(Grid.RowProperty, 0);
                    daydetails_animal.SetValue(Grid.RowSpanProperty, 2);
                    grid_info.Children.Add(daydetails_animal);
                    break;

                default: break;
                }
            }
            else
            {
                UcWarningCountry daydetails = new UcWarningCountry(dept_id, ItemId, ObjectId, DeptType);
                daydetails.SetValue(Grid.RowProperty, 0);
                daydetails.SetValue(Grid.RowSpanProperty, 2);

                grid_info.Children.Add(daydetails);
            }
        }
        void _tableview_DetailsRowEnvent(string id)
        {
            string dept_id;
            //string item_id;
            //string object_id;
            string flag_tier;

            int selectrow = int.Parse(id);

            dept_id = current_table.Rows[selectrow - 1][1].ToString();
            //item_id = current_table.Rows[selectrow - 1][3].ToString();
            //object_id = current_table.Rows[selectrow - 1][5].ToString();
            flag_tier = current_table.Rows[selectrow - 1][11].ToString();

            if (flag_tier == "4")
            {
                UcWarningdetails daydetails = new UcWarningdetails(dbOperation, dept_id, ItemId, ObjectId);
                daydetails.SetValue(Grid.RowProperty, 0);
                daydetails.SetValue(Grid.RowSpanProperty, 2);

                grid_info.Children.Add(daydetails);
            }
            else
            {
                UcWarningCountry daydetails = new UcWarningCountry(dbOperation, dept_id, ItemId, ObjectId);
                daydetails.SetValue(Grid.RowProperty, 0);
                daydetails.SetValue(Grid.RowSpanProperty, 2);

                grid_info.Children.Add(daydetails);
            } 
        }