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); } }
private void setComponentValue(string term) { DAO.Adobe.SettingDAO stDAO = new DAO.Adobe.SettingDAO(); Business.Adobe.SettingBusiness st = new Business.Adobe.SettingBusiness(); var setting = st.GetSettingByTermC(term); txtConName.Text = setting.ConName; txtConString.Text = stDAO.Decrypt(setting.DBConName, true); txtDomainName.Text = setting.DomainName; txthName.Text = setting.hName; txthPass.Text = setting.hpass; txtvName.Text = setting.vName; txtvPass.Text = setting.vpass; txtAdminPassword.Text = setting.aPass != ""?stDAO.Decrypt(setting.aPass, true): setting.aPass; }
public List <RecordsDTO> LinkOfMeetingsAndContentsByCodeClassAndTime(string code, string date, string term) { SettingDTO setdto = setb.GetSettingByTermC(term); DAO.Adobe.SettingDAO sdao = new DAO.Adobe.SettingDAO(); List <RecordsDTO> assetList = new List <RecordsDTO>(); if (term == "93-94-1") { DataTable dtvc = recDAO.LinkOfMeetingsAndContentsByCodeClassAndTime(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 = 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.LinkOfMeetingsAndContentsByCodeClassAndTime(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 dt_live = recDAO.LinkOfMeetingsAndContentsByCodeClassAndTime(code, date, term); for (int i = 0; i < dt_live.Rows.Count; i++) { RecordsDTO asset = new RecordsDTO(); AdobeBusiness adobe = new AdobeBusiness(); asset.ClassCode = dt_live.Rows[i]["code"].ToString(); asset.LessonCode = dt_live.Rows[i]["lesson_code"].ToString(); asset.Size = dt_live.Rows[i]["storage"].ToString(); asset.Duration = dt_live.Rows[i]["Minute"].ToString(); asset.FileType = dt_live.Rows[i]["fileType"].ToString(); asset.FileName = dt_live.Rows[i]["name"].ToString(); asset.Date = dt_live.Rows[i]["Shamsi Date"].ToString(); asset.Link = adobe.OpenMeetingAsHost(setdto.DomainName, setdto.vName, setdto.vpass, dt_live.Rows[i]["SCO_ID"].ToString(), dt_live.Rows[i]["_val"].ToString(), setdto.version == "9.5" ? "" : "view", sdao.Decrypt(setdto.aPass, true)); assetList.Add(asset); } } return(assetList); }