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") { UcYearReportDetails daydetails = new UcYearReportDetails(dbOperation, Kssj, Jssj, dept_id, ItemId, ResultId, ObjectId); daydetails.SetValue(Grid.RowProperty, 0); daydetails.SetValue(Grid.RowSpanProperty, 2); grid_info.Children.Add(daydetails); } else { UcYearReportCountry daydetails = new UcYearReportCountry(dbOperation, Kssj, Jssj, dept_id, ItemId, ResultId, ObjectId); 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") { switch (DeptType) { case "0": UcYearReportDetailsProduce daydetails = new UcYearReportDetailsProduce(Kssj, Jssj, dept_id, ItemId, ResultId, ObjectId); daydetails.SetValue(Grid.RowProperty, 0); daydetails.SetValue(Grid.RowSpanProperty, 2); grid_info.Children.Add(daydetails); break; case "1": UcYearReportDetailsFishery daydetails_fishery = new UcYearReportDetailsFishery(Kssj, Jssj, dept_id, ItemId, ResultId, ObjectId); daydetails_fishery.SetValue(Grid.RowProperty, 0); daydetails_fishery.SetValue(Grid.RowSpanProperty, 2); grid_info.Children.Add(daydetails_fishery); break; case "2": UcYearReportDetailsAnimal daydetails_animal = new UcYearReportDetailsAnimal(Kssj, Jssj, dept_id, ItemId, ResultId, ObjectId); daydetails_animal.SetValue(Grid.RowProperty, 0); daydetails_animal.SetValue(Grid.RowSpanProperty, 2); grid_info.Children.Add(daydetails_animal); break; default: break; } } else { UcYearReportCountry daydetails = new UcYearReportCountry(Kssj, Jssj, dept_id, ItemId, ResultId, 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 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": UcYearReportDetailsSc daydetails = new UcYearReportDetailsSc(dbOperation, Kssj, Jssj, dept_id, ItemId, ResultId, ObjectId); 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 { UcYearReportCountry daydetails = new UcYearReportCountry(dbOperation, Kssj, Jssj, dept_id, ItemId, ResultId, ObjectId,DeptType); daydetails.SetValue(Grid.RowProperty, 0); daydetails.SetValue(Grid.RowSpanProperty, 2); grid_info.Children.Add(daydetails); } }