Beispiel #1
0
        private void btSave_Click(object sender, EventArgs e)
        {
            if (tbCloseText.Text == "")
            {
                MessageBox.Show("Please insert closing comment!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                try
                {
                    string DateActualEnd = dtActualEnd.Value.ToString("yyyy-MM-dd");
                    if (cbH.Text != "" && cbM.Text != "")
                    {
                        DateActualEnd = DateActualEnd + " " + cbH.Text + ":" + cbM.Text;
                    }

                    DBlayer dba = new GIM.DBlayer();
                    dba.UpdateStatus(IssueID, DateActualEnd);
                    dba.InsertUpdate(IssueID, UserID, Environment.UserName, "The issue is now CLOSED -- " + tbCloseText.Text, "", "");

                    MessageBox.Show("You have successfully closed the issue!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    this.Close();
                }
                catch
                {
                }
            }
        }
Beispiel #2
0
        private void btSubmitUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                DBlayer dba = new GIM.DBlayer();
                dba.InsertUpdate(IssueID, UserID, Environment.UserName, tbUpdate.Text.Replace("'", "''"), "", tbAttachment.Text);
                tbUpdate.Text     = "";
                tbAttachment.Text = "";

                DataSet  dsUpdates = dba.GetUpdates(IssueID);
                DataView dvUpdates = dsUpdates.Tables[0].DefaultView;
                gvUpdates.DataSource = dvUpdates;
            }
            catch { }
        }