Exemplo n.º 1
0
        //protected void btnDeleteFuturePeriod_Click(object sender, System.EventArgs e)
        //{
        //    // Delete future period
        //    int EventID;
        //    try
        //    {
        //        EventID = int.Parse(Session["EventID"].ToString());
        //    }
        //    catch
        //    {
        //        EventID = -1;
        //    }
        //    BusinessServices.Event objEvent = new BusinessServices.Event();
        //    objEvent.DeleteFuturePeriod(EventID);
        //    Response.Redirect(@"\Administration\CPD\cpdeventdefault.aspx");
        //}
        private void BindEventType()
        {
            int OrganisationID = UserContext.UserData.OrgID;

            BusinessServices.Event objEvent = new BusinessServices.Event();
            DataTable dtPolicyPoints        = objEvent.GetEventType(OrganisationID);

            if (dtPolicyPoints.Rows.Count > 0) //No policies exist - hide relevant controls and display message
            {
                ddlEventType.DataSource     = dtPolicyPoints;
                ddlEventType.DataValueField = "EventTypeId";
                ddlEventType.DataTextField  = "EventTypeName";
                ddlEventType.DataBind();
            }
        }
Exemplo n.º 2
0
        protected void EventType()
        {
            BusinessServices.Event objEvent = new BusinessServices.Event();
            int PageSize = ApplicationSettings.PageSize;

            this.gvImage.PageSize = PageSize;

            int       OrganisationID = UserContext.UserData.OrgID;
            DataTable dtPolicyPoints = objEvent.GetEventType(OrganisationID);

            if (dtPolicyPoints.Rows.Count > 0)
            {
                gvImage.DataSource = dtPolicyPoints;
                gvImage.DataBind();
            }
        }
Exemplo n.º 3
0
        protected void btnSave_Click(object sender, System.EventArgs e)
        {
            lblMessage.Text = "";
            if (Page.IsValid)
            {
                if (txtEventTypeName.Text.ToString().Trim() != "")
                {
                    BusinessServices.Event objEvent = new BusinessServices.Event();
                    int OrganisationID = UserContext.UserData.OrgID;

                    DataTable dtEventType = objEvent.GetEventType(txtEventTypeName.Text.ToString().Trim(), OrganisationID);
                    if (dtEventType.Rows.Count > 0)
                    {
                        lblMessage.Text = ResourceManager.GetString("EventExists");
                    }
                    else
                    {
                        objEvent.AddEventType(txtEventTypeName.Text.ToString().Trim(), OrganisationID, Convert.ToInt32(cboStatus.SelectedValue));
                        EventType();
                        lblMessage.Text = ResourceManager.GetString("SaveSuccess");
                    }
                }
            }
        }