Example #1
0
        protected void DeleteUserEmail_Click(object sender, ImageClickEventArgs e)
        {
            var             btn          = (ImageButton)sender;
            int             EmailUserId  = Convert.ToInt32(btn.CommandArgument);
            EmailRepository EmailUserReb = new EmailRepository();

            EmailUserReb.DeleteUserEmail(EmailUserId);

            BindRepeater();
        }
Example #2
0
        protected void DeleteController_Click(object sender, ImageClickEventArgs e)
        {
            var             btn                = (ImageButton)sender;
            var             arg                = btn.CommandArgument.ToString().Split(',');
            int             EmailConId         = Convert.ToInt32(arg[0]);
            EmailRepository EmailControllerReb = new EmailRepository();

            EmailControllerReb.DeleteEmailController(EmailConId);
            DataTable Users = EmailControllerReb.GetControllerAssignUsers(Convert.ToInt32(arg[1]));

            foreach (DataRow item in Users.Rows)
            {
                EmailControllerReb.DeleteUserEmail(Convert.ToInt32(txtEmailId.Text), Convert.ToInt32(item["UserId"]));
            }
            BindControllerRepeater();
        }