Beispiel #1
0
        public SysWarningReport(string depttype)
        {
            InitializeComponent();

            this.dept_type = depttype;
            user_flag_tier = PubClass.userInfo.FlagTier;

            //初始化查询条件
            reportDate_kssj.SelectedDate = DateTime.Now.AddDays(-1);
            reportDate_jssj.SelectedDate = DateTime.Now;
            ComboboxTool.InitComboboxSource(_detect_dept, operationContract.ExecuteProCxtjAll(PubClass.userInfo.ID), "cxtj");
            //检测项目
            switch (dept_type)
            {
            case "0": ComboboxTool.InitComboboxSource(_detect_item, operationContract.GetComboDetItemProduce(), "cxtj");
                break;

            case "1": ComboboxTool.InitComboboxSource(_detect_item, operationContract.GetComboDetItemFishery(), "cxtj");
                break;

            case "2": ComboboxTool.InitComboboxSource(_detect_item, operationContract.GetComboDetItemAnimal(), "cxtj");
                break;

            default: break;
            }
            //检测环节
            //ComboboxTool.InitComboboxSource(_detect_huanjie, "SELECT typeID,typeName FROM t_dept_type WHERE openFlag = '1'", "cxtj");
            //复核状态
            DataTable table_detect_result = new DataTable();

            table_detect_result.Columns.Add("id", Type.GetType("System.String"));
            table_detect_result.Columns.Add("name", Type.GetType("System.String"));
            table_detect_result.Rows.Add(new object[] { "0", "未复核" });
            table_detect_result.Rows.Add(new object[] { "1", "已复核" });
            ComboboxTool.InitComboboxSource(_review_flag, table_detect_result, "cxtj");


            _tableview.BShowDetails      = true;
            _tableview.DetailsRowEnvent += new UcTableOperableView_NoPages.DetailsRowEventHandler(_tableview_DetailsRowEnvent);
        }