Esempio n. 1
0
        public static void inviteeAddContact(int taskID, int? contactID, int? userID, int? leadID)
        {
            Invitee invitee = null;

            if (taskID > 0) {
                invitee = new Invitee();
                invitee.TaskID = taskID;
                invitee.ContactID = contactID;
                invitee.UserID = userID;
                invitee.LeadID = leadID;

                using (InviteeManager repository = new InviteeManager()) {
                    repository.Save(invitee);
                }
            }
        }
Esempio n. 2
0
        private void bindInvitees(int taskID)
        {
            List<InviteeView> invitees = null;

            using (InviteeManager repository = new InviteeManager()) {
                invitees = repository.GetAll(taskID);
            }

            gvInvitees.DataSource = invitees;
            gvInvitees.DataBind();
        }
Esempio n. 3
0
        protected void lbtnUninviteeAll_Click(object sender, EventArgs e)
        {
            int taskID = Convert.ToInt32(hf_taskID.Value);

            using (InviteeManager repository = new InviteeManager()) {
                repository.DeleteAll(taskID);
            }
            bindInvitees(taskID);
        }
Esempio n. 4
0
        protected void gvInvitees_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int inviteeID = 0;
            int taskID = Convert.ToInt32(hf_taskID.Value);

            if (e.CommandName == "DoDelete") {
                inviteeID = Convert.ToInt32(e.CommandArgument);
                try {
                    using (InviteeManager repository = new InviteeManager()) {
                        repository.Delete(inviteeID);
                    }

                    bindInvitees(taskID);
                }
                catch (Exception ex) {
                    Core.EmailHelper.emailError(ex);
                }
            }
        }