void _tableview_DetailsRowEnvent(string id)
        {
            string dept_id;
            string flag_tier;

            DataRow[] rows = currenttable.Select("PART_NAME = '" + id + "'");
            dept_id   = rows[0]["PART_ID"].ToString();
            flag_tier = rows[0]["flagtier"].ToString();


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

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

                grid_info.Children.Add(daydetails);
            }
        }
Beispiel #2
0
        void _tableview_DetailsRowEnvent(string id)
        {
            string dept_id;
            string flag_tier;

            DataRow[] rows = currenttable.Select("PART_NAME = '" + id + "'");
            dept_id   = rows[0]["PART_ID"].ToString();
            flag_tier = rows[0]["flagtier"].ToString();


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

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

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

                default: break;
                }
            }
            else
            {
                UcMonthReportCountry daydetails = new UcMonthReportCountry(Sj, dept_id, ItemId, ResultId, 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 flag_tier;

            DataRow[] rows = currenttable.Select("PART_NAME = '" + id + "'");
            dept_id = rows[0]["PART_ID"].ToString();
            flag_tier = rows[0]["flagtier"].ToString();


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

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

                grid_info.Children.Add(daydetails);
            } 

        }