示例#1
0
        void _tableview_DetailsRowEnvent(string id)
        {
            string dept_id;
            string flag_tier;

            dept_id = id;
            DataRow[] rows = current_table.Select("PartId = '" + id + "'");
            flag_tier = rows[0]["flagtier"].ToString();

            if (flag_tier == "4")
            {
                UcWarningReportDetails daydetails = new UcWarningReportDetails(dbOperation, Kssj, Jssj, dept_id, ItemId, ReviewFlag);
                daydetails.SetValue(Grid.RowProperty, 0);
                daydetails.SetValue(Grid.RowSpanProperty, 2);

                grid_info.Children.Add(daydetails);
            }
            else
            {
                UcWarningReportCountry daydetails = new UcWarningReportCountry(dbOperation, Kssj, Jssj, dept_id, ItemId, ReviewFlag);
                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;

            //string dept_type;

            dept_id = id;
            DataRow[] rows = current_table.Select("PartId = '" + id + "'");
            flag_tier = rows[0]["flagtier"].ToString();
            //dept_type = rows[0]["depttype"].ToString();

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

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

                case "2": UcWarningReportDetailsAnimal daydetails_animal = new UcWarningReportDetailsAnimal(Kssj, Jssj, dept_id, ItemId, ReviewFlag);
                    daydetails_animal.SetValue(Grid.RowProperty, 0);
                    daydetails_animal.SetValue(Grid.RowSpanProperty, 2);
                    grid_info.Children.Add(daydetails_animal);
                    break;

                default: break;
                }
            }
            else
            {
                UcWarningReportCountry daydetails = new UcWarningReportCountry(Kssj, Jssj, dept_id, ItemId, ReviewFlag, 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;
            string dept_type;

            dept_id = id;
            DataRow[] rows = current_table.Select("PartId = '" + id + "'");
            flag_tier = rows[0]["flagtier"].ToString();
            dept_type = rows[0]["depttype"].ToString();

            if (flag_tier == "4")
            {
                switch (dept_type)
                {
                    case "0": UcWarningReportDetailsSc daydetails = new UcWarningReportDetailsSc(dbOperation, Kssj, Jssj, dept_id, ItemId, ReviewFlag);
                        daydetails.SetValue(Grid.RowProperty, 0);
                        daydetails.SetValue(Grid.RowSpanProperty, 2);
                        grid_info.Children.Add(daydetails);
                        break;
                    case "1":
                    case "2":
                    case "3":
                    default: break;
                }
            }
            else
            {
                UcWarningReportCountry daydetails = new UcWarningReportCountry(dbOperation, Kssj, Jssj, dept_id, ItemId, ReviewFlag,DetectHuanjie);
                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;

            dept_id = id;
            DataRow[] rows = current_table.Select("PartId = '" + id + "'");
            flag_tier = rows[0]["flagtier"].ToString();

            if (flag_tier == "4")
            {
                UcWarningReportDetails daydetails = new UcWarningReportDetails(dbOperation, Kssj, Jssj, dept_id, ItemId, ReviewFlag);
                daydetails.SetValue(Grid.RowProperty, 0);
                daydetails.SetValue(Grid.RowSpanProperty, 2);

                grid_info.Children.Add(daydetails);
            }
            else
            {
                UcWarningReportCountry daydetails = new UcWarningReportCountry(dbOperation, Kssj, Jssj, dept_id, ItemId, ReviewFlag);
                daydetails.SetValue(Grid.RowProperty, 0);
                daydetails.SetValue(Grid.RowSpanProperty, 2);

                grid_info.Children.Add(daydetails);
            } 
        }