public SysNewDetectProduceQuery()
        {
            InitializeComponent();
            ProvinceCityTable = PubClass.ProvinceCityTable;
            DataRow[] rows = ProvinceCityTable.Select("pid = '0001'");

            //画面初始化-检测单列表画面
            dtpStartDate.SelectedDate = DateTime.Now.AddDays(-1);
            dtpEndDate.SelectedDate   = DateTime.Now;
            ComboboxTool.InitComboboxSource(_source_company1, operationContract.ExecuteProUserCompany(userId, ""), "cxtj");
            ComboboxTool.InitComboboxSource(_detect_station, operationContract.ExecuteProDetUser(userId), "cxtj");
            ComboboxTool.InitComboboxSource(_detect_item1, operationContract.GetComboDetItemProduce(), "cxtj");
            ComboboxTool.InitComboboxSource(_detect_object1, operationContract.GetComboDetObjectProduce(), "cxtj");
            ComboboxTool.InitComboboxSource(_detect_result1, operationContract.GetComboDetResult(), "cxtj");
            ComboboxTool.InitComboboxSource(_detect_person1, operationContract.ExecuteProDetUser(userId), "cxtj");
            ComboboxTool.InitComboboxSource(_detect_method, operationContract.GetComboDetReagentProduce(), "cxtj");
            ComboboxTool.InitComboboxSource(_detect_type, operationContract.GetComboDetSource(), "cxtj");

            ComboboxTool.InitComboboxSource(_province1, rows, "cxtj");
            _province1.SelectionChanged += new SelectionChangedEventHandler(_province1_SelectionChanged);
            //20150707检测师改为连动(受监测站点影响)
            _detect_station.SelectionChanged += new SelectionChangedEventHandler(_detect_station_SelectionChanged);

            SetColumns();
        }
예제 #2
0
        public SysNewDetectProduce()
        {
            InitializeComponent();
            ProvinceCityTable = PubClass.ProvinceCityTable;
            DataTable table = operationContract.GetDeptProvinceCity(deptid);

            DataRow[] rows;
            if (table.Rows.Count == 0)
            {
                rows = ProvinceCityTable.Select("pid = '0001'");
            }
            else
            {
                rows = table.Select();
            }

            //获取样品编号
            SampleNoTable = operationContract.GetComboSampleNo("p", userId);

            //画面初始化-新增检测单画面
            ComboboxTool.InitComboboxSource(_province, rows, "lr");
            _province.SelectionChanged += new SelectionChangedEventHandler(_province_SelectionChanged);

            //查找登录者部门所属的省份
            string proviceid = operationContract.GetProvince(deptid);
            int    i         = 1;

            foreach (DataRow row in rows)
            {
                if (row["cityId"].ToString() == proviceid)
                {
                    _province.SelectedIndex = i;
                }
                i = i + 1;
            }

            ComboboxTool.InitComboboxSource(_source_company, operationContract.GetComboUserCompany(userId), "lr");
            _source_company.SelectionChanged += new SelectionChangedEventHandler(_source_company_SelectionChanged);
            ComboboxTool.InitComboboxSource(_sample_no, SampleNoTable, "lr");
            _sample_no.SelectionChanged += new SelectionChangedEventHandler(_sample_no_SelectionChanged);
            ComboboxTool.InitComboboxSource(_detect_object, operationContract.GetComboDetObjectProduce(), "lr");
            ComboboxTool.InitComboboxSource(_detect_item, operationContract.GetComboDetItemProduce(), "lr");
            _detect_item.SelectionChanged += new SelectionChangedEventHandler(_detect_item_SelectionChanged);
            ComboboxTool.InitComboboxSource(_detect_method, operationContract.GetComboDetReagentProduce(), "lr");
            ComboboxTool.InitComboboxSource(_detect_result, operationContract.GetComboDetResult(), "lr");
            _entering_datetime.Text = string.Format("{0:g}", System.DateTime.Now);
            _detect_person.Text     = PubClass.userInfo.ShowName;
            _detect_site.Text       = sysSetContract.GetDeptName(PubClass.userInfo.DepartmentID);
        }
예제 #3
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);
        }
예제 #4
0
        public SysReviewInfoProduce()
        {
            InitializeComponent();
            //初始化查询条件
            reportDate_kssj.SelectedDate = DateTime.Now.AddDays(-1);
            reportDate_jssj.SelectedDate = DateTime.Now;
            //检测单位
            ComboboxTool.InitComboboxSource(_detect_dept, operationContract.ExecuteProUserDept(PubClass.userInfo.ID), "cxtj");
            //检测项目
            ComboboxTool.InitComboboxSource(_detect_item, operationContract.GetComboDetItemProduce(), "cxtj");

            MyColumns.Add("orderid", new MyColumn("orderid", "检测单编号")
            {
                BShow = true, Width = 8
            });
            MyColumns.Add("detecttypename", new MyColumn("detecttypename", "信息来源")
            {
                BShow = true, Width = 8
            });
            MyColumns.Add("detectdate", new MyColumn("detectdate", "检测时间")
            {
                BShow = true, Width = 18
            });
            MyColumns.Add("partname", new MyColumn("partname", "检测单位")
            {
                BShow = true, Width = 16
            });
            MyColumns.Add("itemname", new MyColumn("itemname", "检测项目")
            {
                BShow = true, Width = 10
            });
            MyColumns.Add("objectname", new MyColumn("objectname", "样品名称")
            {
                BShow = true, Width = 8
            });
            MyColumns.Add("reagentname", new MyColumn("reagentname", "检测方法")
            {
                BShow = true, Width = 10
            });
            MyColumns.Add("detectvalue", new MyColumn("detectvalue", "检测值")
            {
                BShow = true, Width = 8
            });
            MyColumns.Add("resultname", new MyColumn("resultname", "检测结果")
            {
                BShow = true, Width = 8
            });
            MyColumns.Add("detectusername", new MyColumn("detectusername", "检测师")
            {
                BShow = true, Width = 10
            });
            MyColumns.Add("areaname", new MyColumn("areaname", "来源产地")
            {
                BShow = false
            });
            MyColumns.Add("companyname", new MyColumn("companyname", "被检单位")
            {
                BShow = true, Width = 16
            });
            MyColumns.Add("reviewflagname", new MyColumn("reviewflagname", "是否复核")
            {
                BShow = false
            });
            MyColumns.Add("sum_num", new MyColumn("sum_num", "总行数")
            {
                BShow = false
            });

            _tableview.MyColumns       = MyColumns;
            _tableview.BShowState      = true;
            _tableview.StateRowEnvent += new UcTableOperableView_NoTitle.StateRowEventHandler(_tableview_StateRowEnvent);
        }
예제 #5
0
        public SysReviewLog(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.ExecuteProCxtj(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;
            }

            MyColumns.Add("orderid", new MyColumn("orderid", "检测单编号")
            {
                BShow = true, Width = 10
            });
            MyColumns.Add("itemname", new MyColumn("itemname", "检测项目")
            {
                BShow = true, Width = 14
            });
            MyColumns.Add("reviewdate", new MyColumn("reviewdate", "复核检测时间")
            {
                BShow = true, Width = 18
            });
            MyColumns.Add("reviewreagentname", new MyColumn("reviewreagentname", "复核检测方法")
            {
                BShow = true, Width = 14
            });
            MyColumns.Add("reviewresultname", new MyColumn("reviewresultname", "复核检测结果")
            {
                BShow = true, Width = 14
            });
            MyColumns.Add("reviewusername", new MyColumn("reviewusername", "复核检测师")
            {
                BShow = true, Width = 14
            });
            MyColumns.Add("reviewreason", new MyColumn("reviewreason", "复核原因说明")
            {
                BShow = true, Width = 22
            });
            MyColumns.Add("sum_num", new MyColumn("sum_num", "总行数")
            {
                BShow = false
            });

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