Esempio n. 1
0
 protected void btnCommit_Click(object sender, EventArgs e)
 {
     FinalClassNameList = SplitClasses.DisplayFinalClassNames(_connString);
     StoreCommon();
     if (FinalClassNameList != null && FinalClassNameList.Count > 0)
     {
         MembershipUser userInfo = Membership.GetUser();
         Guid           user_ID  = (Guid)userInfo.ProviderUserKey;
         ClearFinalClassNames();
         foreach (FinalClassNames finalClassName in FinalClassNameList)
         {
             Guid?            show_Final_Class_ID = null;
             ShowEntryClasses showEntryClass      = new ShowEntryClasses(_connString, finalClassName.Show_Entry_Class_ID);
             ShowFinalClasses showFinalClass      = new ShowFinalClasses(_connString);
             showFinalClass.Show_ID                      = showEntryClass.Show_ID;
             showFinalClass.Show_Entry_Class_ID          = showEntryClass.Show_Entry_Class_ID;
             showFinalClass.Show_Final_Class_Description = finalClassName.Show_Final_Class_Description;
             showFinalClass.Show_Final_Class_No          = finalClassName.OrderBy;
             show_Final_Class_ID = showFinalClass.Insert_Show_Final_Class(user_ID);
             if (show_Final_Class_ID == null)
             {
                 MessageLabel.Text = "Show Final Class Insert Failed!";
                 break;
             }
             else
             {
                 MessageLabel.Text = "Show Final Class Insert Successful.";
             }
         }
     }
 }
Esempio n. 2
0
        private void btnGetFinalClasses_Click(object sender, EventArgs e)
        {
            bool success = SplitClasses.PopulateFinalClassNames(_connString, (int)numMaxClassSize.Value);

            if (success)
            {
                PopulateFinalClassGridView();
            }
        }
Esempio n. 3
0
    protected void btnGetFinalClasses_Click(object sender, EventArgs e)
    {
        StoreCommon();
        bool success = SplitClasses.PopulateFinalClassNames(_connString);

        if (success)
        {
            FinalClassNameList        = SplitClasses.DisplayFinalClassNames(_connString);
            Common.FinalClassNameList = FinalClassNameList;
        }
        PopulateFinalClassGridView();
    }
Esempio n. 4
0
    protected void FinalClassGridView_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        StoreCommon();
        TextBox txtOrderBy = (TextBox)FinalClassGridView.Rows[e.RowIndex].FindControl("txtOrderBy");
        TextBox txtShow_Final_Class_Description = (TextBox)FinalClassGridView.Rows[e.RowIndex].FindControl("txtShowFinalClassDescription");
        short   orderBy = short.Parse(txtOrderBy.Text);

        SplitClasses.UpdateFinalClassName(_connString, orderBy, txtShow_Final_Class_Description.Text);

        FinalClassGridView.EditIndex = -1;
        FinalClassNameList           = SplitClasses.DisplayFinalClassNames(_connString);
        PopulateFinalClassGridView();
    }
Esempio n. 5
0
        private void btnUnallocateDogs_Click(object sender, EventArgs e)
        {
            Guid?userID = Utils.SetUserID();

            bool success = false;

            success = SplitClasses.UnAllocateDogsFromFinalClasses(_connString, _user_ID);
            if (success)
            {
                MessageLabel.Text = "Final Class Names successfully removed Dogs";
            }
            else
            {
                MessageLabel.Text = "Error Removing Class Names from Dogs!";
            }
        }
Esempio n. 6
0
        private void btnAllocateDogs_Click(object sender, EventArgs e)
        {
            Guid?userID = Utils.SetUserID();

            bool success = false;

            success = SplitClasses.AllocateDogsToFinalClasses(_connString, _show_ID, _user_ID);
            if (success)
            {
                MessageLabel.Text = "Final Class Names successfully Added to Dogs";
            }
            else
            {
                MessageLabel.Text = "Error Adding Class Names from Dogs!";
            }
        }
Esempio n. 7
0
        private void PopulateFinalClassGridView()
        {
            List <FinalClassNames> FinalClassNameList = SplitClasses.DisplayFinalClassNames(_connString);

            if (FinalClassNameList != null && FinalClassNameList.Count > 0)
            {
                dgvFinalClassNames.DataSource          = FinalClassNameList;
                dgvFinalClassNames.Columns[0].Visible  = false;
                dgvFinalClassNames.Columns[5].Visible  = false;
                dgvFinalClassNames.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
                //Enable buttons
            }
            else
            {
                string msg = "Failed to populate the Final Class Names Grid";
                lblMessage.Text = msg;
                Utils.LogToFile(msg);
            }
        }
Esempio n. 8
0
    protected void btnUnAllocateDogs_Click(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(Show_ID))
        {
            MembershipUser userInfo = Membership.GetUser();
            Guid           user_ID  = (Guid)userInfo.ProviderUserKey;

            bool success = false;
            success = SplitClasses.UnAllocateDogsFromFinalClasses(_connString, user_ID);
            if (success)
            {
                MessageLabel.Text = "Final Class Names successfully removed Dogs";
            }
            else
            {
                MessageLabel.Text = "Error Removing Class Names from Dogs!";
            }
        }
    }