Inheritance: System.Windows.Forms.Form
Exemplo n.º 1
0
        /// <summary>
        /// 记录属性。
        /// </summary>
        protected void DocProperty()
        {
            int rowIndex = dgvDocList.CurrentCell.RowIndex;

            if (rowIndex < 0)
            {
                return;
            }

            DataGridViewRow row = dgvDocList.Rows[rowIndex];

            //HYPDM.Entities.PDM_DOCUMENT document = row.DataBoundItem as HYPDM.Entities.PDM_DOCUMENT;
            //初始化属性值
            HYPDM.Entities.PDM_DOCUMENT document = new PDM_DOCUMENT();
            document.DOCID          = row.Cells["DOCID"].Value.ToString();
            document.DOCNAME        = row.Cells["DOCNAME"].Value.ToString();
            document.DOCNO          = row.Cells["DOCNO"].Value.ToString();
            document.DOCSTATUS      = row.Cells["DOCSTATUS"].Value.ToString();
            document.DOCTYPE        = row.Cells["DOCTYPE"].Value.ToString();
            document.REMARK         = row.Cells["REMARK"].Value.ToString();
            document.VERSION        = row.Cells["VERSION"].Value.ToString();
            document.LASTUPDATEDATE = row.Cells["LASTUPDATEDATE"].Value.ToString();
            document.LASTUPDATEUSER = row.Cells["LASTUPDATEUSER"].Value.ToString();
            document.CREATEDATE     = row.Cells["CREATEDATE"].Value.ToString();
            document.DESCRIPTION    = row.Cells["DESCRIPTION"].Value.ToString();
            document.CREATEUSER     = row.Cells["CREATEUSER"].Value.ToString();
            document.DEL_FLAG       = row.Cells["DEL_FLAG"].Value.ToString();
            if (document == null)
            {
                return;
            }

            DocRegForm o = new DocRegForm();

            o.Document = document;
            if (o.ShowDialog() == DialogResult.OK)
            {
                HYPDM.Entities.PDM_DOCUMENT doc = o.Document;
                //更新当前记录
                //row.Cells["DOCID"].Value = document.DOCID;
                row.Cells["DOCNAME"].Value        = document.DOCNAME;
                row.Cells["DOCNO"].Value          = document.DOCNO;
                row.Cells["DOCSTATUS"].Value      = document.DOCSTATUS;
                row.Cells["DOCTYPE"].Value        = document.DOCTYPE;
                row.Cells["REMARK"].Value         = document.REMARK;
                row.Cells["VERSION"].Value        = document.VERSION;
                row.Cells["LASTUPDATEDATE"].Value = document.LASTUPDATEDATE;
                row.Cells["LASTUPDATEUSER"].Value = document.LASTUPDATEUSER;
                row.Cells["CREATEDATE"].Value     = document.CREATEDATE;
                row.Cells["DESCRIPTION"].Value    = document.DESCRIPTION;
                row.Cells["CREATEUSER"].Value     = document.CREATEUSER;
                row.Cells["DEL_FLAG"].Value       = document.DEL_FLAG;
                // this.InitList();
                BindDataFile();
            }
        }
Exemplo n.º 2
0
        /// 记录添加。
        /// </summary>
        protected void DocAdd()
        {
            DocRegForm o = new DocRegForm();

            if (o.ShowDialog() == DialogResult.OK)
            {
                //重新加载列表
                InitList();
            }
        }
Exemplo n.º 3
0
        /// 记录添加。
        /// </summary>
        protected void DocAdd()
        {
            DocRegForm o = new DocRegForm();

            if (o.ShowDialog() == DialogResult.OK)
            {
                //重新加载列表
                InitList();
            }
        }
Exemplo n.º 4
0
        private void addNewDoc_Click(object sender, EventArgs e)
        {
            if (CurrentNode != null)
            {
                if (CurrentNode.Tag is INavigateModule)
                {
                    INavigateModule modue = CurrentNode.Tag as INavigateModule;
                    object addIn = LoadModule(modue.Name, modue.Assembly, modue.Type);
                    EAS.Application.Instance.OpenModule(addIn);
                }
                HYPDM.WinUI.Document.DocRegForm frmDocReg = new DocRegForm();

                frmDocReg.ShowDialog();

            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 记录属性。
        /// </summary>
        protected void DocProperty()
        {
            int rowIndex = dgvDocList.CurrentCell.RowIndex;

            if (rowIndex < 0)
                return;

            DataGridViewRow row = dgvDocList.Rows[rowIndex];

            //HYPDM.Entities.PDM_DOCUMENT document = row.DataBoundItem as HYPDM.Entities.PDM_DOCUMENT;
            //初始化属性值
            HYPDM.Entities.PDM_DOCUMENT document = new PDM_DOCUMENT();
            document.DOCID = row.Cells["DOCID"].Value.ToString();
            document.DOCNAME = row.Cells["DOCNAME"].Value.ToString();
            document.DOCNO = row.Cells["DOCNO"].Value.ToString();
            document.DOCSTATUS = row.Cells["DOCSTATUS"].Value.ToString();
            document.DOCTYPE = row.Cells["DOCTYPE"].Value.ToString();
            document.REMARK = row.Cells["REMARK"].Value.ToString();
            document.VERSION = row.Cells["VERSION"].Value.ToString();
            document.LASTUPDATEDATE = row.Cells["LASTUPDATEDATE"].Value.ToString();
            document.LASTUPDATEUSER = row.Cells["LASTUPDATEUSER"].Value.ToString();
            document.CREATEDATE = row.Cells["CREATEDATE"].Value.ToString();
            document.DESCRIPTION = row.Cells["DESCRIPTION"].Value.ToString();
            document.CREATEUSER = row.Cells["CREATEUSER"].Value.ToString();
            document.DEL_FLAG = row.Cells["DEL_FLAG"].Value.ToString();
            if (document == null) return;

            DocRegForm o = new DocRegForm();
            o.Document = document;
            if (o.ShowDialog() == DialogResult.OK)
            {
                HYPDM.Entities.PDM_DOCUMENT doc = o.Document;
              //更新当前记录
                //row.Cells["DOCID"].Value = document.DOCID;
                row.Cells["DOCNAME"].Value=document.DOCNAME;
                row.Cells["DOCNO"].Value=document.DOCNO;
                row.Cells["DOCSTATUS"].Value=document.DOCSTATUS;
                row.Cells["DOCTYPE"].Value=document.DOCTYPE;
                row.Cells["REMARK"].Value=document.REMARK;
                row.Cells["VERSION"].Value=document.VERSION;
                row.Cells["LASTUPDATEDATE"].Value=document.LASTUPDATEDATE;
                row.Cells["LASTUPDATEUSER"].Value=document.LASTUPDATEUSER;
                row.Cells["CREATEDATE"].Value=document.CREATEDATE;
                row.Cells["DESCRIPTION"].Value=document.DESCRIPTION;
                row.Cells["CREATEUSER"].Value=document.CREATEUSER;
                row.Cells["DEL_FLAG"].Value=document.DEL_FLAG;
               // this.InitList();
                BindDataFile();
            }
        }