示例#1
0
        private void dgvData_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridViewRow row    = dgvData.Rows[e.RowIndex];
            string          oldSTN = row.Cells[ColSTN.Name].Value.ToString();

            PdeContentItem item = PdeContent.Items.FirstOrDefault(
                c => string.Equals(oldSTN, c.STN, StringComparison.OrdinalIgnoreCase));

            frmImportItem importItem = new frmImportItem();

            importItem.pdeContent = item;
            importItem.ShowDialog();
            importItem.ShowImportedItem();
        }
示例#2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(txtPdeFile.Text))
            {
                MessageBox.Show("Please select a pde file.");
                return;
            }

            if (!System.IO.File.Exists(txtPdeFile.Text))
            {
                MessageBox.Show("Pde file is not exist.");
                return;
            }

            string         templateName   = System.IO.Path.GetFileNameWithoutExtension(txtPdeFile.Text);
            PdeContentItem pdeContentItem =
                AddPdeConentItem(txtPdeFile.Text, templateName, txtSTN.Text, Convert.ToInt32(numSAppID.Value));

            if (pdeContentItem == null)
            {
                return;
            }

            BindPdeContent();

            ContextManager contextMgr = new ContextManager();

            contextMgr.ImportPde(pdeContentItem, _wDoc);

            frmImportItem importItem = new frmImportItem();

            importItem.pdeContent = pdeContentItem;
            importItem.ShowDialog();
            importItem.ShowImportedItem();

            //Wkl.MainCtrl.CommonCtrl.CommonProfile.CurrentTemplateInfo.ProntoDocMarkup.LoadImportPDE();
            //Close();
        }