Пример #1
0
        protected void btnAssign1_Click(object sender, EventArgs e)
        {
            int             EmailId  = Convert.ToInt32(txtEmailId.Text);
            EmailRepository emailReb = new EmailRepository();

            gvEmails.DataBind();
            string emailRef = "NPO#" + EmailId;

            DataTable dataTable = emailReb.GetEmailAssignUsers(EmailId);
            string    emails    = "";

            for (int i = 0; i < dataTable.Rows.Count; i++)
            {
                emails += dataTable.Rows[i][2].ToString() + ",";
            }

            EntityEmail email = new EntityEmail();

            email.To      = emails;
            email.Body    = "you have a new Assign search By Email Reference : " + emailRef;
            email.Subject = "NPO Tool";

            if (MailHelper.SendMail(email))
            {
                emailReb.UpdateIsAssign(EmailId, 1, 0);
            }

            Page.Response.Redirect(Page.Request.Url.ToString(), true);
        }
Пример #2
0
        private void BindRepeater()
        {
            EmailRepository EmailUserReb = new EmailRepository();
            DataTable       dataTable    = EmailUserReb.GetEmailAssignUsers(Convert.ToInt32(txtEmailId.Text));

            RepeaterUsersEmail.DataSource = dataTable;
            RepeaterUsersEmail.DataBind();
        }
Пример #3
0
        protected void btnCancelAssign_Click(object sender, ImageClickEventArgs e)
        {
            EmailRepository EmailAssign = new EmailRepository();
            DataTable       con         = EmailAssign.GetEmailAssignController(Convert.ToInt32(txtEmailId.Text));
            DataTable       users       = EmailAssign.GetEmailAssignUsers(Convert.ToInt32(txtEmailId.Text));

            if (con.Rows.Count == 0 && users.Rows.Count == 0)
            {
                EmailAssign.UpdateIsAssign(Convert.ToInt32(txtEmailId.Text), 0, 0);
            }
            else
            {
                int emailStatus = EmailAssign.GetStatus(Convert.ToInt32(txtEmailId.Text));
                EmailAssign.UpdateIsAssign(Convert.ToInt32(txtEmailId.Text), 1, emailStatus);
            }
            Page.Response.Redirect(Page.Request.Url.ToString(), true);
        }