public SysNewDetectAnimalQuery()
        {
            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.GetComboDetItemAnimal(), "cxtj");

            ComboboxTool.InitComboboxSource(_detect_object1, operationContract.GetComboDetObjectAnimal(), "cxtj");
            ComboboxTool.InitComboboxSource(_detect_result1, operationContract.GetComboDetResult(), "cxtj");
            ComboboxTool.InitComboboxSource(_detect_person1, operationContract.ExecuteProDetUser(userId), "cxtj");

            ComboboxTool.InitComboboxSource(_detect_method, operationContract.GetComboDetReagentAnimal(), "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 AddReviewDetailsAnimal(int id, SysReviewInfoAnimal sysreviewinfocy)
        {
            InitializeComponent();
            this.sysreviewinfocy = sysreviewinfocy;

            orderid = id;

            string    reviewflag = operationContract.GetReviewFlag("a", id);
            DataTable table      = operationContract.ExecuteProDetect("a", id);

            //给画面上的控件赋值
            //图片地址改为从数据库中获取
            string picture_url = operationContract.GetPictureUrl();

            if (picture_url == "")
            {
                picture_url = "http://www.zrodo.com:8080/xmjc/";
            }
            _img.Source           = new BitmapImage(new Uri(picture_url + table.Rows[0][21].ToString()));
            _orderid.Text         = table.Rows[0][15].ToString();
            _areaName.Text        = table.Rows[0][8].ToString();
            _companyName.Text     = table.Rows[0][9].ToString();
            _itemName.Text        = table.Rows[0][3].ToString();
            _objectName.Text      = table.Rows[0][4].ToString();
            _reangetName.Text     = table.Rows[0][5].ToString();
            _resultName.Text      = table.Rows[0][6].ToString();
            _deptName.Text        = table.Rows[0][2].ToString();
            _detectDate.Text      = table.Rows[0][1].ToString();
            _detectUserName.Text  = table.Rows[0][7].ToString();
            _detectTypeName.Text  = table.Rows[0][0].ToString();
            _cardId.Text          = table.Rows[0][20].ToString();
            _objectLable.Text     = table.Rows[0][22].ToString();
            _objectCount.Text     = table.Rows[0][23].ToString();
            _sampleName.Text      = table.Rows[0][18].ToString();
            _sensitivityName.Text = table.Rows[0][19].ToString();
            _sampleNo.Text        = table.Rows[0][24].ToString();

            //检测结果为疑似阳性变红
            if (_resultName.Text == "疑似阳性" || _resultName.Text == "确证阳性")
            {
                _resultName.Foreground = Brushes.Red;
            }
            else
            {
                _resultName.Foreground = Brushes.Black;
            }


            _reviewUserid.Text = PubClass.userInfo.ShowName;
            _reviewDate.Text   = DateTime.Now.ToString();
            ComboboxTool.InitComboboxSource(_reviewResult, operationContract.GetComboDetResult(), "lr");
            ComboboxTool.InitComboboxSource(_reviewReagent, operationContract.GetComboDetReviewReagent("a"), "lr");
        }
示例#3
0
        public SysNewDetectFishery()
        {
            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("f", 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");
            ComboboxTool.InitComboboxSource(_sample_no, SampleNoTable, "lr");
            _sample_no.SelectionChanged += new SelectionChangedEventHandler(_sample_no_SelectionChanged);
            ComboboxTool.InitComboboxSource(_detect_sample, operationContract.GetComboDetSample("f"), "lr");
            ComboboxTool.InitComboboxSource(_detect_object, operationContract.GetComboDetObjectFishery(), "lr");
            ComboboxTool.InitComboboxSource(_detect_item, operationContract.GetComboDetItemFishery(), "lr");
            _detect_item.SelectionChanged += new SelectionChangedEventHandler(_detect_item_SelectionChanged);
            ComboboxTool.InitComboboxSource(_detect_method, operationContract.GetComboDetReagentFishery(), "lr");
            ComboboxTool.InitComboboxSource(_detect_result, operationContract.GetComboDetResult(), "lr");
            _entering_datetime.Text           = string.Format("{0:g}", System.DateTime.Now);
            _source_company.SelectionChanged += new SelectionChangedEventHandler(_source_company_SelectionChanged);
            _detect_person.Text = PubClass.userInfo.ShowName;
            _detect_site.Text   = sysSetContract.GetDeptName(PubClass.userInfo.DepartmentID);
        }
示例#4
0
        public AddReviewDetails(int id, SysReviewInfoProduce sysreviewinfosc)
        {
            InitializeComponent();
            this.sysreviewinfosc = sysreviewinfosc;

            orderid = id;

            string    reviewflag = operationContract.GetReviewFlag("p", id);
            DataTable table      = operationContract.ExecuteProDetect("p", id);

            //给画面上的控件赋值
            _orderid.Text        = table.Rows[0][15].ToString();
            _areaName.Text       = table.Rows[0][8].ToString();
            _companyName.Text    = table.Rows[0][9].ToString();
            _itemName.Text       = table.Rows[0][3].ToString();
            _objectName.Text     = table.Rows[0][4].ToString();
            _sampleName.Text     = table.Rows[0][10].ToString();
            _reangetName.Text    = table.Rows[0][5].ToString();
            _resultName.Text     = table.Rows[0][6].ToString();
            _deptName.Text       = table.Rows[0][2].ToString();
            _detectDate.Text     = table.Rows[0][1].ToString();
            _detectUserName.Text = table.Rows[0][7].ToString();
            _detectTypeName.Text = table.Rows[0][0].ToString();
            _detectvalue.Text    = table.Rows[0][18].ToString();

            //检测结果为疑似阳性变红
            if (_resultName.Text == "疑似阳性" || _resultName.Text == "确证阳性")
            {
                _resultName.Foreground = Brushes.Red;
            }
            else
            {
                _resultName.Foreground = Brushes.Black;
            }


            _reviewUserid.Text = PubClass.userInfo.ShowName;
            _reviewDate.Text   = DateTime.Now.ToString();
            ComboboxTool.InitComboboxSource(_reviewResult, operationContract.GetComboDetResult(), "lr");
            ComboboxTool.InitComboboxSource(_reviewReagent, operationContract.GetComboDetReagentProduce(), "lr");
        }
        public NewDetectProduce(string sample_no, string object_id)
        {
            InitializeComponent();

            this.sampleNo = sample_no;
            this.objectId = object_id;

            ProvinceCityTable = PubClass.ProvinceCityTable;

            DataTable table = operationContract.GetDeptProvinceCity(deptid);

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

            //画面初始化-新增检测单画面
            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");
            ComboboxTool.InitComboboxSource(_detect_item, operationContract.GetComboDetItemProduce(), "lr");
            _detect_item.SelectionChanged += new SelectionChangedEventHandler(_detect_item_SelectionChanged);
            ComboboxTool.InitComboboxSource(_detect_method, operationContract.GetComboDetReagentProduce(), "lr");
            ComboboxTool.InitComboboxSource(_sample_no, operationContract.GetComboSampleNo("p", userId), "lr");
            ComboboxTool.InitComboboxSource(_detect_object, operationContract.GetComboDetObjectProduce(), "lr");
            ComboboxTool.InitComboboxSource(_detect_result, operationContract.GetComboDetResult(), "lr");
            _entering_datetime.Text           = string.Format("{0:g}", System.DateTime.Now);
            _source_company.SelectionChanged += new SelectionChangedEventHandler(_source_company_SelectionChanged);
            _detect_person.Text = PubClass.userInfo.ShowName;
            _detect_site.Text   = sysSetContract.GetDeptName(PubClass.userInfo.DepartmentID);

            //赋值样品编号和样品名称
            for (int j = 0; j < _sample_no.Items.Count; j++)
            {
                if ((_sample_no.Items[j] as Label).Tag.ToString() == sampleNo)
                {
                    _sample_no.SelectedItem = _sample_no.Items[j];
                    break;
                }
            }

            for (int j = 0; j < _detect_object.Items.Count; j++)
            {
                if ((_detect_object.Items[j] as Label).Tag.ToString() == objectId)
                {
                    _detect_object.SelectedItem = _detect_object.Items[j];
                    break;
                }
            }
        }