public static bool DeleteEvent(List <ATTEvent> lstEvent)
        {
            try
            {
                foreach (ATTEvent objEvent in lstEvent)
                {
                    foreach (ATTMeeting objMeeting in objEvent.LstMeeting)
                    {
                        BLLMeeting.DeleteMeetingEvent(objMeeting);
                    }
                }

                return(true);
            }
            catch (Exception ex)
            {
                throw(ex);
            }
        }
        public static List <ATTEvent> GetEventList(string dateString, ATTUserLogin login)
        {
            try
            {
                List <ATTEvent> lstEvents = new List <ATTEvent>();

                DataTable tblME = new DataTable();
                tblME = BLLMeeting.GetMeetingEventListTable(dateString, login);


                tblMA = new DataTable();
                tblMA = BLLMeetingAgenda.GetMeetingAgendaListTable(dateString, login);

                tblMP = new DataTable();
                tblMP = BLLMeetingParticipant.GetMeetingParticipantListTable(dateString, login);

                lstGroupMember = BLLGroupMember.GetGroupMemberList(null);

                ATTGroupMember objGM = lstGroupMember.Find(delegate(ATTGroupMember obj)
                {
                    return(obj.OrgID == login.OrgID && obj.EmpID == login.PID);
                }
                                                           );

                foreach (DataRow row in tblME.Rows)
                {
                    ATTEvent objEvent = new ATTEvent();

                    objEvent.Day = int.Parse(row["meeting_date"].ToString().Split('/')[2].ToString());

                    objEvent.OrgID   = int.Parse(row["Org_ID"].ToString());
                    objEvent.EventID = int.Parse(row["MEETING_ID"].ToString());

                    //int stop;

                    //stop = objEvent.EventID;

                    /*if (objEvent.EventID == 21)
                     *  stop = 0;
                     */
                    //CALLED_BY_P_ID

                    int?calledByID;

                    if (row["CALLED_BY_P_ID"].ToString() != "")
                    {
                        calledByID = int.Parse(row["CALLED_BY_P_ID"].ToString());
                    }
                    else
                    {
                        calledByID = null;
                    }

                    if (calledByID == null)
                    {
                        int    calleby  = int.Parse(row["called_by"].ToString());
                        string userName = row["ENTRY_BY"].ToString().Trim();

                        string entryBy = row["m_entry_by"].ToString().Trim();



                        if (login.UserName.Trim() == row["ENTRY_BY"].ToString().Trim() || login.UserName.Trim() == row["m_entry_by"].ToString().Trim())
                        {
                            if (row["meeting_subject"].ToString().Length > 15)
                            {
                                objEvent.Event = "<i><b>" + row["meeting_subject"].ToString().Substring(0, 15) + ".....</i></b>";
                            }
                            else
                            {
                                objEvent.Event = "<i><b>" + row["meeting_subject"].ToString() + "</i></b>";
                            }

                            objEvent.InOut = "IN";
                        }
                        else if (objGM != null)
                        {
                            if (objGM.GroupID == int.Parse(row["called_by"].ToString()))
                            {
                                if (row["meeting_subject"].ToString().Length > 15)
                                {
                                    objEvent.Event = "<i><b>" + row["meeting_subject"].ToString().Substring(0, 15) + ".....</i></b>";
                                }
                                else
                                {
                                    objEvent.Event = "<i><b>" + row["meeting_subject"].ToString() + "</i></b>";
                                }

                                objEvent.InOut = "IN";
                            }
                            else
                            {
                                if (row["meeting_subject"].ToString().Length > 15)
                                {
                                    objEvent.Event = "<b>" + row["meeting_subject"].ToString().Substring(0, 15) + ".....</b>";
                                }
                                else
                                {
                                    objEvent.Event = "<b>" + row["meeting_subject"].ToString() + "</b>";
                                }

                                objEvent.InOut = "OUT";
                            }
                        }
                        else
                        {
                            if (row["meeting_subject"].ToString().Length > 15)
                            {
                                objEvent.Event = "<b>" + row["meeting_subject"].ToString().Substring(0, 15) + ".....</b>";
                            }
                            else
                            {
                                objEvent.Event = "<b>" + row["meeting_subject"].ToString() + "</b>";
                            }

                            objEvent.InOut = "OUT";
                        }
                    }
                    else
                    {
                        if (calledByID == login.PID || login.UserName.Trim() == row["ENTRY_BY"].ToString().Trim() || login.UserName.Trim() == row["m_entry_by"].ToString().Trim())
                        {
                            if (row["meeting_subject"].ToString().Length > 15)
                            {
                                objEvent.Event = "<i>" + row["meeting_subject"].ToString().Substring(0, 15) + ".....</i>";
                            }
                            else
                            {
                                objEvent.Event = "<i>" + row["meeting_subject"].ToString() + "</i>";
                            }

                            objEvent.InOut = "IN";
                        }
                        else
                        {
                            if (row["meeting_subject"].ToString().Length > 15)
                            {
                                objEvent.Event = row["meeting_subject"].ToString().Substring(0, 15) + ".....";
                            }
                            else
                            {
                                objEvent.Event = row["meeting_subject"].ToString();
                            }

                            objEvent.InOut = "OUT";
                        }
                    }



                    objEvent.EventDetail = "(" + row["start_time"].ToString() + " - " + row["end_time"].ToString() + ") \n " + row["meeting_subject"].ToString();

                    objEvent.StatusColor = row["MSTATUS_COLOR"].ToString();

                    objEvent.LstMeeting = SetMeeting(row, dateString, login);

                    lstEvents.Add(objEvent);
                }

                return(lstEvents);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }