Пример #1
0
        public void Fill_BulkEnrollShifts()
        {
            try
            {
                List <FBEventsInfo> items;
                FBEventsController  controller = new FBEventsController();

                items = controller.Events_GetAvailableSignups(_eventMID, ddlShiftName.SelectedValue.ToString(), ddlShiftDay.SelectedValue.ToString(), Convert.ToDateTime(txtStartDate.Text.ToString()), Convert.ToDateTime(txtEndDate.Text.ToString()), Int32.Parse(ddlUserDropdown.SelectedValue.ToString()));

                gv_BulkEnrollShifts.DataSource = items;
                gv_BulkEnrollShifts.DataBind();

                if (items.Count > 0)
                {
                    lbAddBulkShift.Visible = true;
                }
                else
                {
                    lbAddBulkShift.Visible = false;
                }
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Пример #2
0
        public void Fill_Report()
        {
            try
            {
                List <FBEventsInfo> items;
                FBEventsController  controller = new FBEventsController();

                items = controller.Events_GetUserSignups(_eventMID, this.PortalId, Convert.ToDateTime(txtStartDate.Text.ToString()), Convert.ToDateTime(txtEndDate.Text.ToString()), Int32.Parse(ddlUserDropdown.SelectedValue.ToString()));

                gv_Report.DataSource = items;
                gv_Report.DataBind();

                if (items.Count > 0)
                {
                    lbRemoveShift.Visible = true;
                    //lblWelcomeMsg.Visible = false;
                    //btnLoadShifts.Visible = true;
                    //btnAddShift.Visible = true;
                }
                else
                {
                    lbRemoveShift.Visible = false;
                    //lblWelcomeMsg.Visible = true;
                    //btnLoadShifts.Visible = false;
                    //btnAddShift.Visible = false;
                }
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Пример #3
0
 public void FillVolunteerInfo(int userID)
 {
     try
     {
         //load the item
         FBEventsController controller = new FBEventsController();
         FBEventsInfo       item       = controller.Events_GetVolunteerInfo(userID, PortalId);
         if (item != null)
         {
             lblVolunteerEmail.Text   = item.VolunteerEmail.ToString();
             lblVolunteerName.Text    = item.VolunteerName.ToString();
             lblVolunteerPhone.Text   = item.PrimaryTelephone.ToString();
             lblPrimaryJob.Text       = item.PrimaryJob.ToString();
             divVolunteerInfo.Visible = true;
         }
         else
         {
             divVolunteerInfo.Visible = false;
         }
     }
     catch (Exception ex)
     {
         Exceptions.ProcessModuleLoadException(this, ex);
     }
 }
Пример #4
0
 public void DeleteBulkEnrollment(int _SignupID)
 {
     try
     {
         FBEventsController controller = new FBEventsController();
         controller.Events_DeleteSignup(_SignupID);
     }
     catch (Exception ex)
     {
         Exceptions.ProcessModuleLoadException(this, ex);
     }
 }
Пример #5
0
        public void Fill_Report()
        {
            try
            {
                List <FBEventsInfo> items;
                FBEventsController  controller = new FBEventsController();

                items = controller.Events_GetUserSignups(_eventMID, this.PortalId, Convert.ToDateTime(txtStartDate.Text.ToString()), Convert.ToDateTime(txtEndDate.Text.ToString()), Int32.Parse(ddlUserDropdown.SelectedValue.ToString()));

                gv_Report.DataSource = items;
                gv_Report.DataBind();
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Пример #6
0
        public void Fill_Report()
        {
            try
            {
                List <FBEventsInfo> items;
                FBEventsController  controller = new FBEventsController();

                items = controller.EventsSignupsGetAllEvents(_eventMID, this.PortalId, Convert.ToDateTime(txtStartDate.Text.ToString()), Convert.ToDateTime(txtEndDate.Text.ToString()));

                gv_Report.DataSource = items;
                gv_Report.DataBind();
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Пример #7
0
        public void SaveBulkEnrollment(int _EventID, int _UserID)
        {
            try
            {
                FBEventsController controller = new FBEventsController();
                FBEventsInfo       item       = new FBEventsInfo();

                item.ModuleId = _eventMID;
                item.EventID  = _EventID;
                item.UserID   = _UserID;

                controller.Events_AddSignup(item);
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Пример #8
0
        public void Fill_Schedule()
        {
            try
            {
                List <FBEventsInfo> items;
                FBEventsController  controller = new FBEventsController();

                items = controller.Events_GetEventSignups(Int32.Parse(ddlEventDropdown.SelectedValue.ToString()), _eventMID, this.PortalId);


                gv_EventSchedule.DataSource = items;
                gv_EventSchedule.DataBind();
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Пример #9
0
        public void SaveSignUp()
        {
            try
            {
                FBEventsController controller = new FBEventsController();

                FBEventsInfo item = new FBEventsInfo();

                item.ModuleId = _eventMID;
                item.EventID  = Int32.Parse(ddlEventDropdown.SelectedValue.ToString());
                item.UserID   = Int32.Parse(ddlUserDropdown.SelectedValue.ToString());

                controller.Events_AddSignup(item);
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Пример #10
0
        public void GetDistinctShifts()
        {
            try
            {
                FBEventsController  controller = new FBEventsController();
                List <FBEventsInfo> items1;
                items1 = controller.Events_GetDistinctShifts(_eventMID, Convert.ToDateTime(txtStartDate.Text.ToString()), Convert.ToDateTime(txtEndDate.Text.ToString()));

                ddlShiftName.DataSource     = items1;
                ddlShiftName.DataTextField  = "ShiftName";
                ddlShiftName.DataValueField = "ShiftName";
                ddlShiftName.DataBind();
                ddlShiftName.Items.Insert(0, new ListItem("-- Select Shift --", ""));
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Пример #11
0
        public string CheckProfilePropertyExists(string propertyName)
        {
            string value = null;

            ProfilePropertyDefinition ppd = ProfileController.GetPropertyDefinitionByName(this.PortalId, propertyName.ToString());

            if (ppd == null)
            {
                // IT DOESN'T EXIST - -  CREATE IT
                FBEventsController controller = new FBEventsController();
                controller.Events_AddPropertyDefinition(this.PortalId, "Volunteer Information", propertyName.ToString());

                value = "Profile Property Created for PrimaryJob!";
            }
            else
            {
                value = "PrimaryJob Profile Property Exists!";
            }
            return(value);
        }
Пример #12
0
        public void GetUsers()
        {
            try
            {
                List <FBEventsInfo> items;
                FBEventsController  controller = new FBEventsController();

                items = controller.Events_GetUsersByRoleName(this.PortalId, _roleName.ToString());


                ddlUserDropdown.DataSource     = items;
                ddlUserDropdown.DataTextField  = "VolunteerName";
                ddlUserDropdown.DataValueField = "UserID";

                ddlUserDropdown.DataBind();
                ddlUserDropdown.Items.Insert(0, new ListItem("-- Select User --", "0"));
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Пример #13
0
        public void GetAvailableShifts()
        {
            try
            {
                List <FBEventsInfo> items;
                FBEventsController  controller = new FBEventsController();

                items = controller.Events_GetAvailableShifts(_eventMID, this.PortalId, Convert.ToDateTime(txtStartDate.Text.ToString()), Convert.ToDateTime(txtEndDate.Text.ToString()), Int32.Parse(ddlUserDropdown.SelectedValue.ToString()));


                ddlEventDropdown.DataSource     = items;
                ddlEventDropdown.DataTextField  = "ShiftName";
                ddlEventDropdown.DataValueField = "EventID";

                ddlEventDropdown.DataBind();
                ddlEventDropdown.Items.Insert(0, new ListItem("-- Select Shift --", "0"));
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Пример #14
0
        public void GetRoles()
        {
            try
            {
                //  string roleName = _ClientManagerUserRole.ToString();

                List <FBEventsInfo> items;
                FBEventsController  controller = new FBEventsController();

                items = controller.Events_GetRolesByGroupID(_roleGroupID);


                ddlRolesDropdown.DataSource     = items;
                ddlRolesDropdown.DataTextField  = "RoleName";
                ddlRolesDropdown.DataValueField = "RoleName";

                ddlRolesDropdown.DataBind();
                ddlRolesDropdown.Items.Insert(0, new ListItem("All Registered Users", "Registered Users"));
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }