示例#1
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (this.RemarkType == "WP")
            {
                RVO = WP_RVO.RemarkVOByID(this.ID);
                DBRemarkWP dbr = new DBRemarkWP(UVO);
                RVO.CLOSED         = true;
                RVO.CLOSINGCOMMENT = textBox1.Text;
                RVO.DATECLOSE      = DateTime.Now;
                RVO.IDCLOSER       = UVO.id;
                dbr.Edit(RVO);
            }
            else
            {
                SummonRVO      RVO = SummonRVO.RemarkVOByID(this.ID);
                DBRemarkSUMMON dbr = new DBRemarkSUMMON();
                RVO.CLOSED         = true;
                RVO.CLOSINGCOMMENT = textBox1.Text;
                RVO.DATECLOSE      = DateTime.Now;
                RVO.IDCLOSER       = UVO.id;
                dbr.Edit(RVO);
            }
            MessageBox.Show("Замечание успешно отработано!");

            Close();
        }
示例#2
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (RVO != null)
     {
         RVO.REMARK     = tbRemark.Text;
         RVO.IDCREATOR  = UVO.id;
         RVO.DATEREMARK = DateTime.Now;
         DBRemarkWP dbr = new DBRemarkWP(UVO);
         dbr.AddNew(RVO);
     }
     else
     {
         RVOS.REMARK     = tbRemark.Text;
         RVOS.IDCREATOR  = UVO.id;
         RVOS.DATEREMARK = DateTime.Now;
         DBRemarkSUMMON dbr = new DBRemarkSUMMON();
         dbr.AddNew(RVOS);
     }
     MessageBox.Show("Замечание успешно добавлено!");
     Close();
 }
示例#3
0
        private void Remarks_Load(object sender, EventArgs e)
        {
            DBRemarkWP dbr = new DBRemarkWP(UVO);
            //BindingSource bsm = new BindingSource();
            //bsm.DataSource = dbr.GetAll();
            //dgWP.DataSource = dbr.GetAll();

            DBRemarkSUMMON dbrs = new DBRemarkSUMMON();

            //dgSumm.DataSource = dbrs.GetAll();



            if (rbAllRemarks.Checked)
            {
                dgWP.DataSource   = dbr.GetAll();
                dgSumm.DataSource = dbrs.GetAll();
                //UVO.AllRemarksWP(dgWP);
                //UVO.AllRemarksSmm(dgSumm);
            }
            else if (rbMyRemarks.Checked)
            {
                dgWP.DataSource   = dbr.GetAll();
                dgSumm.DataSource = dbrs.GetAll();
                UVO.MyRemarksWP(dgWP);
                UVO.MyRemarksSmm(dgSumm);
            }
            else if (rbFinishedRemarks.Checked)
            {
                //BindingSource bs = new BindingSource();
                //bs.DataSource = dbr.GetFinished();
                //dgWP.DataSource = null;
                dgWP.DataSource = dbr.GetFinished();


                //BindingSource bs1 = new BindingSource();
                //bs1.DataSource = dbrs.GetFinished();
                dgSumm.DataSource = dbrs.GetFinished();

                //UVO.FinishedRemarksWP(dgWP);
                //UVO.FinishedRemarksSmm(dgSumm);
            }
            else
            {
                dgWP.DataSource   = dbr.GetAll();
                dgSumm.DataSource = dbrs.GetAll();
                //UVO.AllRemarksWP(dgWP);
                //UVO.AllRemarksSmm(dgSumm);
            }


            dgWP.RowTemplate.DefaultCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
            dgWP.AutoSizeRowsMode                       = DataGridViewAutoSizeRowsMode.AllCells;
            dgWP.Columns["WP"].FillWeight               = 70;
            dgWP.Columns["WP"].HeaderText               = "№ изделия";
            dgWP.Columns["IDWP"].Visible                = false;
            dgWP.Columns["DOCUMENTNAME"].Visible        = false;
            dgWP.Columns["ID"].Visible                  = false;
            dgWP.Columns["DOCUMENTNAME_RUS"].FillWeight = 100;
            dgWP.Columns["DOCUMENTNAME_RUS"].HeaderText = "Документ";
            dgWP.Columns["REMARK"].FillWeight           = 200;
            dgWP.Columns["REMARK"].HeaderText           = "Проблема";
            dgWP.Columns["DATEREMARK"].FillWeight       = 80;
            dgWP.Columns["DATEREMARK"].HeaderText       = "Дата создания";
            dgWP.Columns["createrole"].FillWeight       = 80;
            dgWP.Columns["createrole"].HeaderText       = "Роль создателя";
            dgWP.Columns["creator"].FillWeight          = 80;
            dgWP.Columns["creator"].HeaderText          = "Создатель";
            dgWP.Columns["CLOSED"].FillWeight           = 70;
            dgWP.Columns["CLOSED"].HeaderText           = "Статус";
            dgWP.Columns["CLOSINGCOMMENT"].FillWeight   = 150;
            dgWP.Columns["CLOSINGCOMMENT"].HeaderText   = "Комментарий после отработки";
            dgWP.Columns["DATECLOSE"].FillWeight        = 80;
            dgWP.Columns["DATECLOSE"].HeaderText        = "Дата отработки";
            dgWP.Columns["closer"].FillWeight           = 80;
            dgWP.Columns["closer"].HeaderText           = "Кто отработал";
            dgWP.Columns["closerole"].FillWeight        = 80;
            dgWP.Columns["closerole"].HeaderText        = "Роль отработавшего";

            dgWP.Columns["WP"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            dgWP.Columns["DOCUMENTNAME_RUS"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            dgWP.Columns["REMARK"].AutoSizeMode           = DataGridViewAutoSizeColumnMode.Fill;
            dgWP.Columns["DATEREMARK"].AutoSizeMode       = DataGridViewAutoSizeColumnMode.Fill;
            dgWP.Columns["createrole"].AutoSizeMode       = DataGridViewAutoSizeColumnMode.Fill;
            dgWP.Columns["creator"].AutoSizeMode          = DataGridViewAutoSizeColumnMode.Fill;
            dgWP.Columns["CLOSED"].AutoSizeMode           = DataGridViewAutoSizeColumnMode.Fill;
            dgWP.Columns["CLOSINGCOMMENT"].AutoSizeMode   = DataGridViewAutoSizeColumnMode.Fill;
            dgWP.Columns["DATECLOSE"].AutoSizeMode        = DataGridViewAutoSizeColumnMode.Fill;
            dgWP.Columns["closer"].AutoSizeMode           = DataGridViewAutoSizeColumnMode.Fill;
            dgWP.Columns["closerole"].AutoSizeMode        = DataGridViewAutoSizeColumnMode.Fill;



            dgSumm.RowTemplate.DefaultCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
            dgSumm.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;

            dgSumm.Columns["IDS"].FillWeight       = 70;
            dgSumm.Columns["IDS"].HeaderText       = "№ извещения";
            dgSumm.Columns["IDSUMMON"].Visible     = false;
            dgSumm.Columns["DOCUMENTNAME"].Visible = false;
            dgSumm.Columns["ID"].Visible           = false;

            dgSumm.Columns["DOCUMENTNAME_RUS"].FillWeight   = 100;
            dgSumm.Columns["DOCUMENTNAME_RUS"].HeaderText   = "Документ";
            dgSumm.Columns["REMARK"].FillWeight             = 200;
            dgSumm.Columns["REMARK"].HeaderText             = "Проблема";
            dgSumm.Columns["DATEREMARK"].FillWeight         = 80;
            dgSumm.Columns["DATEREMARK"].HeaderText         = "Дата создания";
            dgSumm.Columns["creator"].FillWeight            = 80;
            dgSumm.Columns["creator"].HeaderText            = "Создатель";
            dgSumm.Columns["createrole"].FillWeight         = 80;
            dgSumm.Columns["createrole"].HeaderText         = "Роль создателя";
            dgSumm.Columns["CLOSED"].FillWeight             = 70;
            dgSumm.Columns["CLOSED"].HeaderText             = "Статус";
            dgSumm.Columns["CLOSINGCOMMENT"].FillWeight     = 150;
            dgSumm.Columns["CLOSINGCOMMENT"].HeaderText     = "Комментарий после отработки";
            dgSumm.Columns["DATECLOSE"].FillWeight          = 80;
            dgSumm.Columns["DATECLOSE"].HeaderText          = "Дата отработки";
            dgSumm.Columns["closer"].FillWeight             = 80;
            dgSumm.Columns["closer"].HeaderText             = "Кто отработал";
            dgSumm.Columns["closerole"].FillWeight          = 80;
            dgSumm.Columns["closerole"].HeaderText          = "Роль отработавшего";
            dgSumm.Columns["IDS"].AutoSizeMode              = DataGridViewAutoSizeColumnMode.Fill;
            dgSumm.Columns["DOCUMENTNAME_RUS"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            dgSumm.Columns["REMARK"].AutoSizeMode           = DataGridViewAutoSizeColumnMode.Fill;
            dgSumm.Columns["DATEREMARK"].AutoSizeMode       = DataGridViewAutoSizeColumnMode.Fill;
            dgSumm.Columns["createrole"].AutoSizeMode       = DataGridViewAutoSizeColumnMode.Fill;
            dgSumm.Columns["creator"].AutoSizeMode          = DataGridViewAutoSizeColumnMode.Fill;
            dgSumm.Columns["CLOSED"].AutoSizeMode           = DataGridViewAutoSizeColumnMode.Fill;
            dgSumm.Columns["CLOSINGCOMMENT"].AutoSizeMode   = DataGridViewAutoSizeColumnMode.Fill;
            dgSumm.Columns["DATECLOSE"].AutoSizeMode        = DataGridViewAutoSizeColumnMode.Fill;
            dgSumm.Columns["closer"].AutoSizeMode           = DataGridViewAutoSizeColumnMode.Fill;
            dgSumm.Columns["closerole"].AutoSizeMode        = DataGridViewAutoSizeColumnMode.Fill;
        }
示例#4
0
        private void ChooseRemarkToWork_Load(object sender, EventArgs e)
        {
            if (RemarkType == "WP")
            {
                DBRemarkWP dbr = new DBRemarkWP(UVO);
                dgRemark.DataSource = dbr.GetRemarksByIDWPDOC(DOCUMENTNAME, ID);
                dgRemark.RowTemplate.DefaultCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
                dgRemark.AutoSizeRowsMode                       = DataGridViewAutoSizeRowsMode.AllCells;
                dgRemark.Columns["WP"].FillWeight               = 70;
                dgRemark.Columns["WP"].HeaderText               = "№ изделия";
                dgRemark.Columns["IDWP"].Visible                = false;
                dgRemark.Columns["DOCUMENTNAME"].Visible        = false;
                dgRemark.Columns["ID"].Visible                  = false;
                dgRemark.Columns["DOCUMENTNAME_RUS"].FillWeight = 100;
                dgRemark.Columns["DOCUMENTNAME_RUS"].HeaderText = "Документ";
                dgRemark.Columns["REMARK"].FillWeight           = 200;
                dgRemark.Columns["REMARK"].HeaderText           = "Проблема";
                dgRemark.Columns["DATEREMARK"].FillWeight       = 80;
                dgRemark.Columns["DATEREMARK"].HeaderText       = "Дата создания";
                dgRemark.Columns["createrole"].FillWeight       = 80;
                dgRemark.Columns["createrole"].HeaderText       = "Роль создателя";
                dgRemark.Columns["creator"].FillWeight          = 80;
                dgRemark.Columns["creator"].HeaderText          = "Создатель";
                dgRemark.Columns["CLOSED"].Visible              = false;
                dgRemark.Columns["CLOSINGCOMMENT"].Visible      = false;
                dgRemark.Columns["DATECLOSE"].Visible           = false;
                dgRemark.Columns["closer"].Visible              = false;
                dgRemark.Columns["closerole"].Visible           = false;

                dgRemark.Columns["WP"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
                dgRemark.Columns["DOCUMENTNAME_RUS"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
                dgRemark.Columns["REMARK"].AutoSizeMode           = DataGridViewAutoSizeColumnMode.Fill;
                dgRemark.Columns["DATEREMARK"].AutoSizeMode       = DataGridViewAutoSizeColumnMode.Fill;
                dgRemark.Columns["createrole"].AutoSizeMode       = DataGridViewAutoSizeColumnMode.Fill;
                dgRemark.Columns["creator"].AutoSizeMode          = DataGridViewAutoSizeColumnMode.Fill;
            }
            else
            {
                DBRemarkSUMMON dbrs = new DBRemarkSUMMON();
                dgRemark.DataSource = dbrs.GetRemarksByIDSDOC(DOCUMENTNAME, ID);
                dgRemark.RowTemplate.DefaultCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
                dgRemark.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;

                dgRemark.Columns["IDS"].FillWeight       = 70;
                dgRemark.Columns["IDS"].HeaderText       = "№ извещения";
                dgRemark.Columns["IDSUMMON"].Visible     = false;
                dgRemark.Columns["DOCUMENTNAME"].Visible = false;
                dgRemark.Columns["ID"].Visible           = false;

                dgRemark.Columns["DOCUMENTNAME_RUS"].FillWeight = 100;
                dgRemark.Columns["DOCUMENTNAME_RUS"].HeaderText = "Документ";
                dgRemark.Columns["REMARK"].FillWeight           = 200;
                dgRemark.Columns["REMARK"].HeaderText           = "Проблема";
                dgRemark.Columns["DATEREMARK"].FillWeight       = 80;
                dgRemark.Columns["DATEREMARK"].HeaderText       = "Дата создания";
                dgRemark.Columns["creator"].FillWeight          = 80;
                dgRemark.Columns["creator"].HeaderText          = "Создатель";
                dgRemark.Columns["createrole"].FillWeight       = 80;
                dgRemark.Columns["createrole"].HeaderText       = "Роль создателя";
                dgRemark.Columns["CLOSED"].Visible                = false;
                dgRemark.Columns["CLOSINGCOMMENT"].Visible        = false;
                dgRemark.Columns["DATECLOSE"].Visible             = false;
                dgRemark.Columns["closer"].Visible                = false;
                dgRemark.Columns["closerole"].Visible             = false;
                dgRemark.Columns["IDS"].AutoSizeMode              = DataGridViewAutoSizeColumnMode.Fill;
                dgRemark.Columns["DOCUMENTNAME_RUS"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
                dgRemark.Columns["REMARK"].AutoSizeMode           = DataGridViewAutoSizeColumnMode.Fill;
                dgRemark.Columns["DATEREMARK"].AutoSizeMode       = DataGridViewAutoSizeColumnMode.Fill;
                dgRemark.Columns["createrole"].AutoSizeMode       = DataGridViewAutoSizeColumnMode.Fill;
                dgRemark.Columns["creator"].AutoSizeMode          = DataGridViewAutoSizeColumnMode.Fill;
            }
        }