Esempio n. 1
0
        public Dashboard ViewDashboardComposeData(Dashboard dashboard)
        {
            DashboardData dashboarddata = new DashboardData();
            DataSet       dataSet       = new DataSet();
            Dashboard     lcldash       = new Dashboard();

            lcldash.UserID = ApplicationManager.LoggedInUser.UserID;
            try
            {
                dataSet = dashboarddata.ViewDashboardComposeData(lcldash);

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

            return(lcldash);
        }