コード例 #1
0
        public EditNotificationMeeting InsertRemoveActions(Int64 UserId, AddNotificationAction objAdd)
        {
            EditNotificationMeeting objE  = new EditNotificationMeeting();
            MOMDataManager          objDM = new MOMDataManager();
            DataSet ds = objDM.InsertRemoveActions(UserId, objAdd);

            if (ds != null)
            {
                int tblIndex = -1;

                tblIndex++;
                if (ds.Tables.Count > 0 && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        objE.NotificationNumber = Convert.ToString(dr["NotificationNumber"]);
                        objE.Title       = Convert.ToString(dr["Title"]);
                        objE.Status      = Convert.ToString(dr["Stage"]);
                        objE.MeetingNote = Convert.ToString(dr["MeetingNote"]);
                        objE.MeetingDate = Convert.ToString(dr["MeetingDate"]);
                        objE.RetainedForNextDiscussion = Convert.ToBoolean(dr["RetainedForNextDiscussion"]);
                    }
                }

                tblIndex++;
                if (ds.Tables.Count > 0 && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    List <EditAction> ActionList = new List <EditAction>();
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        EditAction objNotificationAction = new EditAction();
                        objNotificationAction.NotificationActionId = Convert.ToInt64(dr["NotificationActionId"]);
                        objNotificationAction.ActionId             = Convert.ToInt32(dr["ActionId"]);
                        objNotificationAction.ActionName           = Convert.ToString(dr["Action"]);
                        objNotificationAction.RequiredOn           = Convert.ToString(dr["RequiredOn"]);
                        objNotificationAction.MailId    = Convert.ToInt64(dr["MailId"]);
                        objNotificationAction.UpdatedOn = Convert.ToString(dr["UpdatedOn"]);
                        ActionList.Add(objNotificationAction);
                    }
                    objE.Actions = ActionList;
                }
            }
            return(objE);
        }
コード例 #2
0
        public EditNotificationMeeting EditMeetingActions(Int64 Id, Int64 MeetingId)
        {
            EditNotificationMeeting objE  = new EditNotificationMeeting();
            MOMDataManager          objDM = new MOMDataManager();
            DataSet ds = objDM.EditActions(Id, MeetingId);

            if (ds != null)
            {
                int tblIndex = -1;

                tblIndex++;
                if (ds.Tables.Count > 0 && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        objE.NotificationNumber = Convert.ToString(dr["NotificationNumber"]);
                        objE.Title       = Convert.ToString(dr["Title"]);
                        objE.Status      = Convert.ToString(dr["Stage"]);
                        objE.MeetingNote = Convert.ToString(dr["MeetingNote"]);
                        objE.MeetingDate = Convert.ToString(dr["MeetingDate"]);
                        objE.RetainedForNextDiscussion = Convert.ToBoolean(dr["RetainedForNextDiscussion"]);
                        objE.NotificationGroup         = Convert.ToString(dr["NotificationGroup"]);
                    }
                }

                tblIndex++;
                if (ds.Tables.Count > 0 && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    List <EditAction> ActionList = new List <EditAction>();
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        EditAction objNotificationAction = new EditAction();
                        objNotificationAction.NotificationActionId = Convert.ToInt64(dr["NotificationActionId"]);
                        objNotificationAction.ActionId             = Convert.ToInt32(dr["ActionId"]);
                        objNotificationAction.ActionName           = Convert.ToString(dr["Action"]);
                        objNotificationAction.RequiredOn           = Convert.ToString(dr["RequiredOn"]);
                        objNotificationAction.MailId    = Convert.ToInt64(dr["MailId"]);
                        objNotificationAction.UpdatedOn = Convert.ToString(dr["UpdatedOn"]);
                        ActionList.Add(objNotificationAction);
                    }
                    objE.Actions = ActionList;
                }

                tblIndex++;
                if (ds.Tables.Count > 0 && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    List <PreviousMeeting> PrevioiusMeetingList = new List <PreviousMeeting>();
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        PreviousMeeting PrevioiusMeeting = new PreviousMeeting();
                        PrevioiusMeeting.MeetingId   = Convert.ToInt64(dr["MeetingId"]);
                        PrevioiusMeeting.MeetingDate = Convert.ToString(dr["MeetingDate"]);
                        PrevioiusMeetingList.Add(PrevioiusMeeting);
                    }
                    objE.PreviousMeetings = PrevioiusMeetingList;
                }

                tblIndex++;
                if (ds.Tables.Count > 0 && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    List <PrevioiusMeetingAction> PrevioiusMeetingActionList = new List <PrevioiusMeetingAction>();
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        PrevioiusMeetingAction PrevioiusMeetingAction = new PrevioiusMeetingAction();
                        PrevioiusMeetingAction.MeetingId            = Convert.ToInt64(dr["MeetingId"]);
                        PrevioiusMeetingAction.NotificationActionId = Convert.ToInt64(dr["NotificationActionId"]);
                        PrevioiusMeetingAction.Action       = Convert.ToString(dr["Action"]);
                        PrevioiusMeetingAction.ActionStatus = Convert.ToString(dr["ActionStatus"]);
                        PrevioiusMeetingActionList.Add(PrevioiusMeetingAction);
                    }
                    objE.PrevioiusMeetingActions = PrevioiusMeetingActionList;
                }
            }

            return(objE);
        }