예제 #1
0
        public MoMs MeetingSummary(Int64 Id)
        {
            MoMs           objMoM = new MoMs();
            MOMDataManager objDM  = new MOMDataManager();
            DataSet        ds     = objDM.MeetingSummary(Id);

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

                #region "Total Of MOM Notification"
                tblIndex++;
                if (ds.Tables.Count > tblIndex && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    List <MoM> MOMNotification = new List <MoM>();
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        MoM objMOMList = new MoM();
                        objMOMList.MeetingDate          = Convert.ToString(dr["MeetingDate"]);
                        objMOMList.SPSNotificationCount = Convert.ToInt32(dr["SPSNotification"]);
                        objMOMList.TBTNotificationCount = Convert.ToInt32(dr["TBTNotification"]);
                        objMOMList.Observation          = Convert.ToString(dr["Observation"]);
                        MOMNotification.Add(objMOMList);
                    }
                    objMoM.MoMList = MOMNotification;
                }
                #endregion

                #region "TBT Notification"
                tblIndex++;
                if (ds.Tables.Count > tblIndex && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    List <Notification_Mom> MOMNotificationList = new List <Notification_Mom>();
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        Notification_Mom objList = new Notification_Mom();
                        objList.NotificationId     = Convert.ToInt64(dr["NotificationId"]);
                        objList.NotificationNumber = Convert.ToString(dr["NotificationNumber"]);
                        objList.DateOfNotification = Convert.ToString(dr["DateOfNotification"]);
                        objList.Country            = Convert.ToString(dr["Country"]);
                        objList.Description        = Convert.ToString(dr["Description"]);
                        objList.Action             = Convert.ToString(dr["Action"]);
                        MOMNotificationList.Add(objList);
                    }
                    objMoM.TBTNotificationList = MOMNotificationList;
                }
                #endregion

                #region "SPS Notification"
                tblIndex++;
                if (ds.Tables.Count > tblIndex && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    List <Notification_Mom> MOMNotificationList = new List <Notification_Mom>();
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        Notification_Mom objList = new Notification_Mom();
                        objList.NotificationId     = Convert.ToInt64(dr["NotificationId"]);
                        objList.NotificationNumber = Convert.ToString(dr["NotificationNumber"]);
                        objList.DateOfNotification = Convert.ToString(dr["DateOfNotification"]);
                        objList.Country            = Convert.ToString(dr["Country"]);
                        objList.Description        = Convert.ToString(dr["Description"]);
                        objList.Action             = Convert.ToString(dr["Action"]);
                        MOMNotificationList.Add(objList);
                    }
                    objMoM.SPSNotificationList = MOMNotificationList;
                }
                #endregion
                #region "Regulatory Notification"
                tblIndex++;
                if (ds.Tables.Count > tblIndex && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    List <Notification_Mom> MOMNotificationList = new List <Notification_Mom>();
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        Notification_Mom objList = new Notification_Mom();
                        objList.ItemNumber         = Convert.ToInt32(dr["RowNumber"]);
                        objList.NotificationId     = Convert.ToInt64(dr["NotificationId"]);
                        objList.NotificationNumber = Convert.ToString(dr["NotificationNumber"]);
                        objList.Country            = Convert.ToString(dr["Country"]);
                        objList.Description        = Convert.ToString(dr["Description"]);
                        objList.Regulatory         = Convert.ToString(dr["Regulators"]).Replace("|", ", ");
                        MOMNotificationList.Add(objList);
                    }
                    objMoM.RegulatoryNotificationList = MOMNotificationList;
                }
                #endregion
                #region "Regulatory Notification"
                tblIndex++;
                if (ds.Tables.Count > tblIndex && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    List <Notification_Mom> MOMNotificationList = new List <Notification_Mom>();
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        Notification_Mom objList = new Notification_Mom();
                        objList.ItemNumber         = Convert.ToInt32(dr["RowNumber"]);
                        objList.NotificationId     = Convert.ToInt64(dr["NotificationId"]);
                        objList.NotificationNumber = Convert.ToString(dr["NotificationNumber"]);
                        objList.Country            = Convert.ToString(dr["Country"]);
                        objList.Description        = Convert.ToString(dr["Description"]);
                        MOMNotificationList.Add(objList);
                    }
                    objMoM.PolicyNotificationList = MOMNotificationList;
                }
                #endregion
            }

            return(objMoM);
        }
예제 #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);
        }