Exemple #1
0
        public List <Dashboard> ViewDashboardData(Dashboard dashboard)
        {
            List <Dashboard> localdashboard = new List <Dashboard>();
            DashboardData    dashboarddata  = new DashboardData();
            DataSet          dataSet        = new DataSet();
            Dashboard        locald         = new Dashboard();

            locald.UserID = ApplicationManager.LoggedInUser.UserID;
            try
            {
                dataSet = dashboarddata.ViewDashboardData(locald);

                if (dataSet.Tables["Dashboard"].Rows.Count > 0)
                {
                    for (int i = 0; i < dataSet.Tables["Dashboard"].Rows.Count; i++)
                    {
                        Dashboard lcldash = new Dashboard();
                        lcldash.UserID         = dataSet.Tables["Dashboard"].Rows[i]["USERID"].ToString();
                        lcldash.ID             = Convert.ToInt16(dataSet.Tables["Dashboard"].Rows[i]["ID"].ToString());
                        lcldash.FormName       = dataSet.Tables["Dashboard"].Rows[i]["FORMNAME"].ToString();
                        lcldash.ApprovalStatus = dataSet.Tables["Dashboard"].Rows[i]["APPROVALSTATUS"].ToString();
                        lcldash.IsSubmitted    = dataSet.Tables["Dashboard"].Rows[i]["ISSUBMITTED"].ToString();
                        lcldash.Percentage     = Convert.ToDecimal(dataSet.Tables["Dashboard"].Rows[i]["PERCENTAGE"].ToString());

                        localdashboard.Add(lcldash);
                    }
                }
            }
            catch (Exception ex)
            {
                LoggerHelper.WriteToLog(ex);
            }

            return(localdashboard);
        }
Exemple #2
0
        public List <Dashboard> ViewDashboardData(Dashboard dashboard)
        {
            List <Dashboard> localdashboard = new List <Dashboard>();
            DashboardData    dashboarddata  = new DashboardData();
            DataSet          dataSet        = new DataSet();
            Dashboard        locald         = new Dashboard();

            locald.UserID     = ApplicationManager.LoggedInUser.UserID;
            locald.FolderType = "Inbox";
            try
            {
                dataSet = dashboarddata.ViewDashboardData(locald);

                if (dataSet.Tables["Dashboard"].Rows.Count > 0)
                {
                    for (int i = 0; i < dataSet.Tables["Dashboard"].Rows.Count; i++)
                    {
                        Dashboard lcldash = new Dashboard();
                        lcldash.UserID         = dataSet.Tables["Dashboard"].Rows[i]["USERID"].ToString();
                        lcldash.EmailBoxID     = Convert.ToInt16(dataSet.Tables["Dashboard"].Rows[i]["EMAILBOXID"].ToString());
                        lcldash.UserRoleDetail = dataSet.Tables["Dashboard"].Rows[i]["USERROLE"].ToString();
                        lcldash.FolderType     = dataSet.Tables["Dashboard"].Rows[i]["FOLDERTYPE"].ToString();
                        lcldash.EmailFrom      = dataSet.Tables["Dashboard"].Rows[i]["EMAILFROM"].ToString();
                        lcldash.EmailTo        = dataSet.Tables["Dashboard"].Rows[i]["EMAILTO"].ToString();
                        lcldash.EmailCC        = dataSet.Tables["Dashboard"].Rows[i]["EMAILCC"].ToString();
                        lcldash.EmailBCC       = dataSet.Tables["Dashboard"].Rows[i]["EMAILBCC"].ToString();
                        lcldash.EmailSubject   = dataSet.Tables["Dashboard"].Rows[i]["EMAILSUBJECT"].ToString();
                        lcldash.EmailBody      = dataSet.Tables["Dashboard"].Rows[i]["EMAILBODY"].ToString();
                        lcldash.IsRead         = Convert.ToInt16(dataSet.Tables["Dashboard"].Rows[i]["ISREAD"].ToString());
                        lcldash.ReceivedTime   = dataSet.Tables["Dashboard"].Rows[i]["RECEIVEDTIME"].ToString();
                        localdashboard.Add(lcldash);
                    }
                }
            }
            catch (Exception ex)
            {
                LoggerHelper.WriteToLog(ex);
            }

            return(localdashboard);
        }