public string GetFinishDate(string startDate, string startTime, string finishDate, string finishTime)
    {
        DateTime?dateTimeStart  = CommonStaticFunctions.ParseDateTime(startDate, startTime);
        DateTime?dateTimeFinish = CommonStaticFunctions.ParseDateTime(finishDate, finishTime);

        if (dateTimeFinish.Value.Ticks < dateTimeStart.Value.Ticks)
        {
            return(dateTimeStart.Value.ToString("d-MMM-yyyy!hh:mm tt", CultureInfo.CreateSpecificCulture("en-US")));
        }

        return("");
    }
    public string CreateNewEvent(string topic, string description,
                                 string startDate, string startTime, string finishDate, string finishTime,
                                 string value, string isPublic)
    {
        if (!mIsInit)
        {
            InitMembers();
        }

        if (mCurrentUser == null)
        {
            return("User is not Loaded");
        }

        string    timeText = "";
        string    dateText = "";
        EventBase newEvent = new EventBase();
        DateTime  today    = DateTime.Today;

        newEvent.Admin = mCurrentUser;
        newEvent.ResourceDescription.Topic   = topic;
        newEvent.ResourceDescription.Summary = description;
        newEvent.Value    = int.Parse(value);
        newEvent.IsPublic = (isPublic == "1") ? true : false;

        timeText = startTime;
        dateText = startDate;
        if (dateText == string.Empty)
        {
            dateText = today.ToString("d-MMM-yyyy", CultureInfo.CreateSpecificCulture("en-US"));
        }
        newEvent.EventTimeInfo.BecomeActive = CommonStaticFunctions.ParseDateTime(dateText, timeText);

        timeText = finishTime;
        dateText = finishDate;
        if (dateText == string.Empty)
        {
            dateText = today.ToString("d-MMM-yyyy", CultureInfo.CreateSpecificCulture("en-US"));
        }
        newEvent.EventTimeInfo.BecomeInactive = CommonStaticFunctions.ParseDateTime(dateText, timeText);

        mEventBaseBO.Save(newEvent);

        mCurrentUser.Events.Add(newEvent);

        mUserBaseBO.Save(mCurrentUser);

        Session["CurrentUser"] = mCurrentUser;

        Session["CurrentEvent"] = newEvent;

        return("Success");
    }
    public string SaveEventDetails(
        string topic,
        string description,
        string startDate,
        string startTime,
        string finishDate,
        string finishTime,
        string location,
        string valueNeeded)
    {
        if (!mIsInit)
        {
            InitMembers();
        }

        if (mCurrentEvent == null)
        {
            return("Event is not Loaded");
        }

        mCurrentEvent.ResourceDescription.Topic   = topic;
        mCurrentEvent.ResourceDescription.Summary = description;        //.Replace("\n", "<br/>");
        mResourceDescriptionBO.Save(mCurrentEvent.ResourceDescription);

        mCurrentEvent.EventTimeInfo.BecomeActive   = CommonStaticFunctions.ParseDateTime(startDate, startTime);
        mCurrentEvent.EventTimeInfo.BecomeInactive = CommonStaticFunctions.ParseDateTime(finishDate, finishTime);
        mEventTimeInfoBO.Save(mCurrentEvent.EventTimeInfo);

        mCurrentEvent.EventLocation.Address1 = location;
        mObjectLocationBO.Save(mCurrentEvent.EventLocation);

        int value = int.Parse(valueNeeded);

        mCurrentEvent.Value = value;

        mEventBaseBO.Save(mCurrentEvent);

        return("Event details was saved successfully");
    }