protected void Cancel_Command(object sender, CommandEventArgs e)
    {
        CustomPrincipal cp         = (CustomPrincipal)HttpContext.Current.User;
        TeeTimes        teeTimeMGR = new TeeTimes();

        if (!cp.IsMember())
        {
            int selectedMember;
            if (int.TryParse(MemberID.Text, out selectedMember))
            {
                int cartsInt = int.Parse(carts.Text);
                teeTimeMGR.UpdateTeeTime(int.Parse(e.CommandArgument.ToString()), cartsInt);
                MemberSelection.DataBind();
            }
            else
            {
                Message.Text = "something went wrong";
            }
        }
        else
        {
            int cartsInt = int.Parse(carts.Text);
            teeTimeMGR.UpdateTeeTime(int.Parse(e.CommandArgument.ToString()), cartsInt);
            MemberSelection.DataBind();
        }
    }
Esempio n. 2
0
        public bool UpdateTeeTime(DailyTeeTimeSheet ModifyTeeTime, List <TeeTimeMember> Members)
        {
            bool     confirmation   = false;
            TeeTimes TeeTImeManager = new TeeTimes();

            confirmation = TeeTImeManager.UpdateTeeTime(ModifyTeeTime, Members);
            return(confirmation);
        }