예제 #1
0
 public FailureTreeEditFrm(Model.v_failure_tree editModel, FailureTreeFrm father)
 {
     InitializeComponent();
     this.father    = father;
     this.editModel = editModel;
     initCntls();
     loadEditInfo(editModel);
 }
예제 #2
0
 public FailureTreeDetailFrm(Model.v_failure_tree detail)
 {
     InitializeComponent();
     KeyPreview         = true;
     this.detail        = detail;
     picBxTree.SizeMode = PictureBoxSizeMode.StretchImage;
     picBxGrid.SizeMode = PictureBoxSizeMode.StretchImage;
     displayDetail(detail);
 }
예제 #3
0
        private void listView1_DoubleClick(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count == 0)
            {
                return;
            }
            Model.v_failure_tree detail       = vftList[listView1.SelectedIndices[0]];
            FailureTreeDetailFrm viewImageFrm = new FailureTreeDetailFrm(detail);

            viewImageFrm.ShowDialog();
        }
예제 #4
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count == 0)
            {
                MessageBox.Show("请选择要修改的项!");
                return;
            }
            Model.v_failure_tree editModel            = vftList[listView1.SelectedIndices[0]];
            FailureTreeEditFrm   failureTreeDetailFrm = new FailureTreeEditFrm(editModel, this);

            failureTreeDetailFrm.ShowDialog();
        }
예제 #5
0
 private void loadEditInfo(Model.v_failure_tree editModel)
 {
     lblUser.Text                = editModel.user_name;
     lblAddTime.Text             = editModel.ft_addtime.ToString("yyyy-MM-dd HH:mm");
     lblCsID.Text                = editModel.ft_caseid;
     cmbPlaneType.SelectedIndex  = plnTypIdLst.IndexOf(editModel.ptype_id);
     cmbFailSystem.SelectedIndex = flSysIdLst.IndexOf(editModel.system_id);
     cmbTimePoint.SelectedIndex  = tmPntIdLst.IndexOf(editModel.tpoint_id);
     txtKeyWds.Text              = editModel.ft_keywd;
     picBxTree.Image             = getPicFromByteArr(editModel.ft_pic);
     picBxGrid.Image             = getPicFromByteArr(editModel.ft_grid);
     rchTxtExperience.Text       = editModel.experience;
 }
예제 #6
0
        private void displayDetail(Model.v_failure_tree detail)
        {
            lblUser.Text    = detail.user_name;
            lblAddTime.Text = detail.ft_addtime.ToString("yyyy-MM-dd HH:mm");
            lblCsID.Text    = detail.ft_caseid;
            lblPlnTyp.Text  = detail.ptype_name;
            lblTPnt.Text    = detail.tpoint_value;
            lblFlSys.Text   = detail.system_name;
            lblKeyWds.Text  = detail.ft_keywd;
            picBxTree.Image = getPicFromByteArr(detail.ft_pic);
            picBxGrid.Image = getPicFromByteArr(detail.ft_grid);

            if (detail.experience != null && detail.experience != "")
            {
                string[] expArr = detail.experience.Split(new char[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
                foreach (string str in expArr)
                {
                    rchTxtExperience.Text += "●  " + str + "\r\n";
                }
            }
        }
예제 #7
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(fds.Model.v_failure_tree model)
 {
     return(dal.Update(model));
 }
예제 #8
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(fds.Model.v_failure_tree model)
 {
     return(dal.Add(model));
 }