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); }
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); }
public NotificationMOM GetNotificationList_Mom(Search_MoM obj) { NotificationMOM NotificationMoMList = new NotificationMOM(); MOMDataManager objDM = new MOMDataManager(); DataSet ds = objDM.GetNotificationListForMom(obj); if (ds != null) { int tblIndex = -1; #region "Notifications List" tblIndex++; if (ds.Tables.Count > tblIndex && ds.Tables[tblIndex] != null && ds.Tables[tblIndex].Rows.Count > 0) { 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.SendResponseBy = Convert.ToString(dr["SendResponseBy"]); objNotification.FinalDateofComments = Convert.ToString(dr["FinalDateOfComment"]); objNotification.Description = Convert.ToString(dr["Description"]); objNotification.MeetingNote = Convert.ToString(dr["MeetingNote"]); objNotification.NotificationGroup = Convert.ToString(dr["NotificationGroup"]); i++; NotificationList.Add(objNotification); } NotificationMoMList.Notification_MomList = NotificationList; } #endregion #region "Country List" tblIndex++; if (ds.Tables.Count > tblIndex && ds.Tables[tblIndex] != null && ds.Tables[tblIndex].Rows.Count > 0) { int i = 1; List <GetCountry> CountryList = new List <GetCountry>(); foreach (DataRow dr in ds.Tables[tblIndex].Rows) { GetCountry objCountry = new GetCountry(); objCountry.CountryId = Convert.ToInt32(dr["CountryId"]); objCountry.Country = Convert.ToString(dr["Country"]); i++; CountryList.Add(objCountry); } NotificationMoMList.CountryList = CountryList; } #endregion #region "Notification Process Dots Color & Tooltip Text" tblIndex++; if (ds.Tables.Count > tblIndex && ds.Tables[tblIndex] != null && ds.Tables[tblIndex].Rows.Count > 0) { List <BusinessObjects.Notification.NotificationProcessDot> NPSList = new List <BusinessObjects.Notification.NotificationProcessDot>(); foreach (DataRow dr in ds.Tables[tblIndex].Rows) { BusinessObjects.Notification.NotificationProcessDot objNPS = new BusinessObjects.Notification.NotificationProcessDot(); objNPS.NotificationId = Convert.ToInt64(dr["NotificationId"]); objNPS.ColorCode = Convert.ToString(dr["ColorCode"]); objNPS.TooltipText = Convert.ToString(dr["TooltipText"]); objNPS.Sequence = Convert.ToInt32(dr["Sequence"]); NPSList.Add(objNPS); } NotificationMoMList.NotificationProcessDots = NPSList; } #endregion } return(NotificationMoMList); }