Пример #1
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);
        }