Пример #1
0
        protected void btnPost_Click(object sender, EventArgs e)
        {
            BusinessObjects bo            = new BusinessObjects();
            var             rnd           = new Random(DateTime.Now.Millisecond);
            int             ticid         = rnd.Next(0, 3000);
            string          strTic_ID     = "TIC" + ticid.ToString();
            string          strCurUser    = Convert.ToString(Session["CurrentUser"]);
            bool            retVal        = bo.PostTicket(strTic_ID, txtTitle.Text, strCurUser, "Open", txtDesc.Text, ddlInst.SelectedItem.Text);
            string          strToMailAddr = bo.GetEmailByUser(ddlInst.SelectedItem.Text);

            //SendMail(strTic_ID, strCurUser, strToMailAddr);//Uncomment123
            if (retVal == true)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "AlertScript", "AlertBox('Ticket Created Successfully')", true);
            }
        }