public DataTable GetTotalTimeInAllClassesByStcode(string StudentCode)
        {
        
            SettingBusiness setb = new SettingBusiness();
            StudentDAO s= new StudentDAO();
            string term = s.GetLastTermBystcode(StudentCode);
            DataTable dtTermJari = UD.GetTermJary();
            string termJari = dtTermJari.Rows[0][0].ToString();
            int salStudent = 0;
            if (term!="")
             salStudent=Convert.ToInt32( term.Split('-')[0]);

            int jariSal = 0;
            if(termJari!="")
                jariSal = Convert.ToInt32( termJari.Split('-')[0]);
            
            if (term==""|| salStudent<(jariSal-2))
                return new DataTable() ;
            SettingDTO setdto = setb.GetSettingByTermC(term);
            if (setdto.ConName!="")
            {
                 return spDAO.GetTotalTimeInAllClassesByStcode(StudentCode, term);
            }
            else
            {
                return new DataTable();
            }
           
        }
        public DataTable GetMeetingsOnline()
        {
            DataTable OnlineDT_Final = new DataTable();

            try
            {
                DataTable OnlineDT = SessionMonitoringDAO.GetMeetingsOnline();
                //DataTable OnlineDT = GetMeetingOnline_UrlLink2();
                var setting = sb.GetSettingByTermC(System.Configuration.ConfigurationManager.AppSettings["Term"]);
                DAO.Adobe.SettingDAO sdao = new DAO.Adobe.SettingDAO();

                string adobe_domain = setting.DomainName;
                string adobe_user   = setting.hName;
                string adobe_pass   = setting.hpass;
                // اضافه کردن لینک کلاس

                OnlineDT_Final.Columns.Add("NAME", typeof(string));
                OnlineDT_Final.Columns.Add("code", typeof(string));
                OnlineDT_Final.Columns.Add("URL_PATH", typeof(string));
                OnlineDT_Final.Columns.Add("TimeStart", typeof(string));
                OnlineDT_Final.Columns.Add("CountOFUser", typeof(string));
                OnlineDT_Final.Columns.Add("TotalTime", typeof(string));
                OnlineDT_Final.Columns.Add("SCO_ID", typeof(string));
                OnlineDT_Final.Columns.Add("Link", typeof(string));
                OnlineDT_Final.Columns.Add("ShamsiDate", typeof(string));
                OnlineDT_Final.Columns.Add("Day", typeof(string));

                for (int i = 0; i < OnlineDT.Rows.Count; i++)
                {
                    DataRow row = OnlineDT_Final.NewRow();
                    row["NAME"]        = OnlineDT.Rows[i]["NAME"].ToString();
                    row["code"]        = OnlineDT.Rows[i]["code"].ToString();
                    row["URL_PATH"]    = OnlineDT.Rows[i]["URL_PATH"].ToString();
                    row["TimeStart"]   = OnlineDT.Rows[i]["TimeStart"].ToString();
                    row["CountOFUser"] = OnlineDT.Rows[i]["CountOFUser"].ToString();
                    row["TotalTime"]   = OnlineDT.Rows[i]["TotalTime"].ToString();
                    row["SCO_ID"]      = OnlineDT.Rows[i]["SCO_ID"].ToString();
                    row["ShamsiDate"]  = OnlineDT.Rows[i]["ShamsiDate"].ToString();
                    row["Day"]         = OnlineDT.Rows[i]["Day"].ToString();
                    row["Link"]        = AdobeBusiness.OpenMeetingAsHost(adobe_domain, adobe_user, adobe_pass, OnlineDT.Rows[i]["SCO_ID"].ToString(), OnlineDT.Rows[i]["_val"].ToString(), "view", sdao.Decrypt(setting.aPass, true));
                    //row["Link"] = AdobeBusiness.OpenMeetingAsView("http://live.iauec.ac.ir/", "vuser", "", OnlineDT.Rows[i]["SCO_ID"].ToString(), OnlineDT.Rows[i]["_val"].ToString(), "view");

                    OnlineDT_Final.Rows.Add(row);
                }

                return(OnlineDT_Final);
            }
            catch (Exception em)
            {
                return(OnlineDT_Final);
            }
        }
示例#3
0
        public List <RecordsDTO> LinkOfClassWithLessonCodeByCodeClassAndTime(string code, string date, string term)
        {
            List <RecordsDTO> assetList = new List <RecordsDTO>();
            SettingDTO        setdto    = setb.GetSettingByTermC(term);

            DAO.Adobe.SettingDAO sdao = new DAO.Adobe.SettingDAO();

            if (term == "93-94-1")
            {
                DataTable dtvc = recDAO.LinkOfClassWithLessonCodeByCodeClassAndTime(code, date, term);

                for (int i = 0; i < dtvc.Rows.Count; i++)
                {
                    RecordsDTO    asset         = new RecordsDTO();
                    AdobeBusiness adobeBusiness = new AdobeBusiness();
                    asset.ClassCode  = dtvc.Rows[i]["code"].ToString();
                    asset.LessonCode = dtvc.Rows[i]["lesson_code"].ToString();
                    asset.Size       = dtvc.Rows[i]["storage"].ToString();
                    asset.Duration   = dtvc.Rows[i]["Minute"].ToString();
                    asset.FileType   = dtvc.Rows[i]["fileType"].ToString();
                    asset.FileName   = dtvc.Rows[i]["name"].ToString();
                    asset.Date       = dtvc.Rows[i]["Shamsi Date"].ToString();
                    asset.Session    = dtvc.Rows[i]["session"].ToString();

                    // asset.Link = dt.Rows[i]["URL"].ToString();
                    asset.Link = adobeBusiness.OpenMeetingAsView("http://192.168.30.140/", setdto.vName, setdto.vpass, dtvc.Rows[i]["SCO_ID"].ToString(), dtvc.Rows[i]["_val"].ToString(), "view", sdao.Decrypt(setdto.aPass, true));


                    assetList.Add(asset);
                }

                DataTable dtAdobe = recDAO.LinkOfClassWithLessonCodeByCodeClassAndTime(code, date, term);
                for (int i = 0; i < dtAdobe.Rows.Count; i++)
                {
                    RecordsDTO    asset         = new RecordsDTO();
                    AdobeBusiness adobeBusiness = new AdobeBusiness();
                    asset.ClassCode  = dtAdobe.Rows[i]["code"].ToString();
                    asset.LessonCode = dtAdobe.Rows[i]["lesson_code"].ToString();
                    asset.Size       = dtAdobe.Rows[i]["storage"].ToString();
                    asset.Duration   = dtAdobe.Rows[i]["Minute"].ToString();
                    asset.FileType   = dtAdobe.Rows[i]["fileType"].ToString();
                    asset.FileName   = dtAdobe.Rows[i]["name"].ToString();
                    asset.Date       = dtAdobe.Rows[i]["Shamsi Date"].ToString();
                    asset.Session    = dtAdobe.Rows[i]["session"].ToString();
                    // asset.Link = dt.Rows[i]["URL"].ToString();
                    asset.Link = adobeBusiness.OpenMeetingAsView("http://adobe.iauec.ac.ir/", setdto.vName, setdto.vpass, dtAdobe.Rows[i]["SCO_ID"].ToString(), dtAdobe.Rows[i]["_val"].ToString(), "view", sdao.Decrypt(setdto.aPass, true));


                    assetList.Add(asset);
                }
            }

            else
            {
                DataTable dtAdobe = recDAO.LinkOfClassWithLessonCodeByCodeClassAndTime(code, date, term);
                for (int i = 0; i < dtAdobe.Rows.Count; i++)
                {
                    RecordsDTO    asset         = new RecordsDTO();
                    AdobeBusiness adobeBusiness = new AdobeBusiness();
                    asset.ClassCode  = dtAdobe.Rows[i]["code"].ToString();
                    asset.LessonCode = dtAdobe.Rows[i]["lesson_code"].ToString();
                    asset.Size       = dtAdobe.Rows[i]["storage"].ToString();
                    asset.Duration   = dtAdobe.Rows[i]["Minute"].ToString();
                    asset.FileType   = dtAdobe.Rows[i]["fileType"].ToString();
                    asset.FileName   = dtAdobe.Rows[i]["name"].ToString();
                    asset.Date       = dtAdobe.Rows[i]["Shamsi Date"].ToString();
                    asset.Session    = dtAdobe.Rows[i]["session"].ToString();
                    // asset.Link = dt.Rows[i]["URL"].ToString();
                    if (setdto.version == "9.5")
                    {
                        asset.Link = adobeBusiness.OpenMeetingAsView(setdto.DomainName, setdto.vName, setdto.vpass, dtAdobe.Rows[i]["SCO_ID"].ToString(), dtAdobe.Rows[i]["_val"].ToString(), "", sdao.Decrypt(setdto.aPass, true));
                    }
                    else
                    {
                        asset.Link = adobeBusiness.OpenMeetingAsView(setdto.DomainName, setdto.vName, setdto.vpass, dtAdobe.Rows[i]["SCO_ID"].ToString(), dtAdobe.Rows[i]["_val"].ToString(), "view", sdao.Decrypt(setdto.aPass, true));
                    }


                    assetList.Add(asset);
                }
            }
            return(assetList);
        }