Пример #1
0
        private void button_Save_Click(object sender, EventArgs e)
        {
            DialogResult dr = MessageBox.Show("are you sure that you want to save ?", "Verify Operation",
                                              MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);

            if (dr == DialogResult.No)
            {
                MessageBox.Show(" Operation Cancelled by user ");
                return;
            }

            GenDoc myDoc   = new GenDoc(dataStringsList);
            int    retcode = myDoc.SaveDocument(base.ident, "Interview", textBox_DocNum.Text, textBox_DocType.Text, dataStringsList);

            MessageBox.Show("Schedule new Interview successfully");
            this.Close();
        }
Пример #2
0
        private void button_Save_Click(object sender, EventArgs e)
        {
            DialogResult dr = MessageBox.Show("are you sure that you want to save ?", "Verify Operation",
                                              MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);

            if (dr == DialogResult.No)
            {
                MessageBox.Show(" Operation Cancelled by user ");
                return;
            }
            //   (response == "yes")
            string        _tableName = textBox_TableName.Text;
            List <string> myData     = new List <string>();

            for (int i = 0; i < listBox_DataStrings.Items.Count; i++)
            {
                myData.Add(listBox_DataStrings.Items[i].ToString());
            }
            int myDataCount = myData.Count;
            int retcode     = myDoc.SaveDocument(base.ident, _tableName, textBox_DocNum.Text, textBox_DocType.Text, myData);
            // string retMessage = myDoc.SaveDocument(base.ident, textBox_TableName.Text, textBox_DocumentID.Text, textBox_DocType.Text, myData);
        }