Example #1
0
        //
        //查看重工记录
        //
        private void dgv_Info_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            try
            {
                Maticsoft.Model.Rework   temRek = (Maticsoft.Model.Rework)dgv_Info.SelectedItem;
                Maticsoft.Model.Rejected temRej = new Maticsoft.Model.Rejected();
                Maticsoft.Model.Dispose  temDis = new Maticsoft.Model.Dispose();
                temRej = _M_Rejected.GetModel(temRek.RejectID);
                temDis = _M_Dispose.GetModel(decimal.Parse(temRek.DisposeID));

                //不良显示
                cmb_Reject.Text            = temRej.Reject;
                txb_Search_RejectCode.Text = temRej.RejectCode;
                //在控件中显示图片
                BitmapImage BI = new BitmapImage();
                BI.BeginInit();
                BI.StreamSource = new MemoryStream(temRej.Picture); //bufPic是图片二进制,byte类型
                BI.EndInit();
                image1.Source = BI;                                 //image是XAML页面上定义的Image控件


                //处理方法显示
                cmb_DesposeMethod.Text = temDis.DisposeMethod;
                lab_ID.Content         = temDis.ID;

                //处理结果
                txb_SerialNumber.Text = temRek.SN;
                cmb_PigtaiType.Text   = temRek.PigtailType;
                cmb_Result.Text       = temRek.Result;
                txb_Operator.Text     = temRek.ReworkID;
                txb_Verify.Text       = temRek.VerifyID;
                txb_Length.Text       = temRek.Length;
            }
            catch (System.Exception ex) { My_MessageBox.My_MessageBox_Message(ex.Message); }
        }
Example #2
0
        //
        //查找
        //
        private void btn_Find_Click(object sender, RoutedEventArgs e)
        {
            _Rejected = _M_Rejected.GetModel(txb_RejectCode.Text.Trim());
            if (_Rejected != null)
            {
                //填充不良现象
                txb_Reject.Text = _Rejected.Reject;
                //在控件中显示图片
                BitmapImage BI = new BitmapImage();
                BI.BeginInit();
                BI.StreamSource = new MemoryStream(_Rejected.Picture); //bufPic是图片二进制,byte类型
                BI.EndInit();
                image1.Source = BI;                                    //image是XAML页面上定义的Image控件


                //加载不良处理方法
                _Dispe.Clear();
                foreach (Maticsoft.Model.Dispose disp in _M_Dispose.GetModelList(txb_RejectCode.Text.Trim()))
                {
                    _Dispe.Add(disp);
                }
            }
            else
            {
                My_MessageBox.My_MessageBox_Message("未找到该不良代码的记录!");
                ClearControlInfo();
            }
        }
Example #3
0
 private void ShowInfo(decimal ID)
 {
     Maticsoft.BLL.Rejected   bll   = new Maticsoft.BLL.Rejected();
     Maticsoft.Model.Rejected model = bll.GetModel(ID);
     this.lblID.Text            = model.ID.ToString();
     this.txttb_RejectCode.Text = model.tb_RejectCode;
     this.txtReject.Text        = model.Reject;
     this.txtDescriptions.Text  = model.Descriptions;
     this.txtPicture.Text       = model.Picture.ToString();
     this.txtNotes.Text         = model.Notes;
 }