예제 #1
0
        public EditMeeting EditMoM(Nullable <Int64> Id, Search_MoM obj)
        {
            EditMeeting    objE  = new EditMeeting();
            MOMDataManager objDM = new MOMDataManager();
            DataSet        ds    = objDM.EditMeeting(Id, obj);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                int tblIndex = -1;

                #region "Master Actions List"
                tblIndex++;
                if (ds.Tables.Count > tblIndex && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    List <BusinessObjects.MOM.Action> ActionList = new List <BusinessObjects.MOM.Action>();
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        BusinessObjects.MOM.Action objAction = new BusinessObjects.MOM.Action();
                        objAction.ActionId   = Convert.ToInt32(dr["ActionId"]);
                        objAction.ActionName = Convert.ToString(dr["Action"]);
                        ActionList.Add(objAction);
                    }
                    objE.Actions = ActionList;
                }
                #endregion

                #region "MoM Details"
                tblIndex++;
                if (ds.Tables.Count > tblIndex)
                {
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        objE.MoMId       = Convert.ToInt64(dr["MomId"]);
                        objE.MeetingDate = Convert.ToString(dr["MeetingDate"]);
                        objE.IsActive    = Convert.ToBoolean(dr["IsActive"]);
                    }
                }
                #endregion

                #region "Notifications List"
                tblIndex++;
                if (ds.Tables.Count > tblIndex)
                {
                    List <Notification_Mom> NotificationList = new List <Notification_Mom>();
                    int i = 1;
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        Notification_Mom objNotification = new Notification_Mom();
                        objNotification.ItemNumber         = i;
                        objNotification.NotificationId     = Convert.ToInt64(dr["NotificationId"]);
                        objNotification.Title              = Convert.ToString(dr["Title"]);
                        objNotification.NotificationNumber = Convert.ToString(dr["NotificationNumber"]);
                        objNotification.Country            = Convert.ToString(dr["Country"]);
                        objNotification.MeetingNote        = Convert.ToString(dr["MeetingNote"]);
                        objNotification.IsUpdate           = Convert.ToBoolean(dr["IsUpdate"]);
                        objNotification.Description        = Convert.ToString(dr["Description"]);
                        objNotification.RowNum             = Convert.ToInt64(dr["ROWNum"]);
                        objNotification.TotalRow           = Convert.ToInt64(dr["TotalRow"]);
                        objNotification.NotificationGroup  = Convert.ToString(dr["NotificationGroup"]);
                        i++;
                        NotificationList.Add(objNotification);
                    }
                    objE.Notifications = NotificationList;
                }
                #endregion

                #region "Notification Actions List"
                tblIndex++;
                if (ds.Tables.Count > tblIndex && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    List <NotificationAction> NotificationActionList = new List <NotificationAction>();
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        NotificationAction objAction = new NotificationAction();
                        objAction.NotificationId = Convert.ToInt64(dr["NotificationId"]);
                        objAction.ActionId       = Convert.ToInt32(dr["ActionId"]);
                        objAction.MailId         = Convert.ToInt64(dr["MailId"]);
                        NotificationActionList.Add(objAction);
                    }
                    objE.NotificationActions = NotificationActionList;
                }
                #endregion
            }
            return(objE);
        }
예제 #2
0
        public MoMs GetMOMListData()
        {
            MoMs           objMoM = new MoMs();
            MOMDataManager objDM  = new MOMDataManager();
            DataSet        ds     = objDM.GetMOMListData();

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                int tblIndex = -1;

                #region "Master Actions List"
                tblIndex++;
                if (ds.Tables.Count > tblIndex && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    List <BusinessObjects.MOM.Action> ActionList = new List <BusinessObjects.MOM.Action>();
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        BusinessObjects.MOM.Action objAction = new BusinessObjects.MOM.Action();
                        objAction.ActionId   = Convert.ToInt32(dr["ActionId"]);
                        objAction.ActionName = Convert.ToString(dr["Action"]);
                        ActionList.Add(objAction);
                    }
                    objMoM.Actions = ActionList;
                }
                #endregion

                #region "MoMs Notification List"
                tblIndex++;
                if (ds.Tables.Count > tblIndex)
                {
                    List <MoM> NotificationList = new List <MoM>();
                    int        i = 1;
                    string     hdnRelatedStakeHolder = string.Empty;
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        MoM objNotification = new MoM();
                        objNotification.ItemNumber        = i;
                        objNotification.MoMId             = Convert.ToInt64(dr["MomId"]);
                        objNotification.NotificationCount = Convert.ToInt32(dr["NotificationCount"]);
                        objNotification.PendingCount      = Convert.ToInt32(dr["PendingCount"]);
                        objNotification.MeetingDate       = Convert.ToString(dr["MeetingDate"]);
                        objNotification.IsActive          = Convert.ToBoolean(dr["IsActive"]);
                        i++;
                        NotificationList.Add(objNotification);
                    }
                    objMoM.MoMList = NotificationList;
                }
                #endregion

                #region "Notification Actions List"
                tblIndex++;
                if (ds.Tables.Count > tblIndex && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    List <MoMAction> MoMActionList = new List <MoMAction>();
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        MoMAction objAction = new MoMAction();
                        objAction.MoMId        = Convert.ToInt64(dr["MomId"]);
                        objAction.ActionId     = Convert.ToInt32(dr["ActionId"]);
                        objAction.PendingCount = Convert.ToInt64(dr["PendingCount"]);
                        objAction.TotalCount   = Convert.ToInt64(dr["TotalCount"]);
                        MoMActionList.Add(objAction);
                    }
                    objMoM.MoMActionList = MoMActionList;
                }
                #endregion
            }

            return(objMoM);
        }