public DataTable TimeByUserName_ClassCodeByTerm(string term) { SqlConnection conn = new SqlConnection(); DAO.Adobe.SettingDAO setting = new Adobe.SettingDAO(); setting.getAdobeConnectionString(term); conn.ConnectionString = setting.getAdobeConnectionString(term); SqlDataReader rdr = null; DataTable dt = new DataTable(); conn.Open(); SqlCommand cmd = new SqlCommand("R_TeacherTotalTimeinMeetings", conn); cmd.CommandType = CommandType.StoredProcedure; //cmd.Parameters.Add("@Min", SqlDbType.NVarChar); //cmd.Parameters["@Min"].Value = Min; //cmd.Parameters.Add("@Max", SqlDbType.NVarChar); //cmd.Parameters["@Max"].Value = Max; rdr = cmd.ExecuteReader(); dt.Load(rdr); rdr.Dispose(); cmd.Connection.Close(); cmd.Dispose(); conn.Close(); return(dt); }
/// <summary> /// Get Professor Data From Sida Tables /// </summary> /// <param DataTable="GetProfessorListByDepartment_Term"></param> /// <param name="Term"></param> /// <returns></returns> public DataTable R_TeacherTotalTimeinMeetingsListByClassListAndTerm(DataTable ClassList, string term) { SqlConnection conn = new SqlConnection(); DAO.Adobe.SettingDAO setting = new Adobe.SettingDAO(); setting.getAdobeConnectionString(term); conn.ConnectionString = setting.getAdobeConnectionString(term); SqlDataReader rdr = null; DataTable dt = new DataTable(); conn.Open(); SqlCommand cmd = new SqlCommand("R_TeacherTotalTimeinMeetingsListByClassListAndTerm", conn); cmd.CommandType = CommandType.StoredProcedure; SqlParameter cmdparam = cmd.Parameters.AddWithValue("@ClassList", ClassList); cmdparam.SqlDbType = SqlDbType.Structured; rdr = cmd.ExecuteReader(); dt.Load(rdr); rdr.Dispose(); cmd.Connection.Close(); cmd.Dispose(); conn.Close(); return(dt); }
public DataTable GetMeetingOnlineUser(string ScoId) { SqlConnection conn = new SqlConnection(); SettingDAO setting = new Adobe.SettingDAO(); string termJary = System.Configuration.ConfigurationManager.AppSettings["Term"]; conn.ConnectionString = setting.getAdobeConnectionString(termJary); SqlDataReader rdr = null; DataTable dt = new DataTable(); conn.Open(); SqlCommand cmd = new SqlCommand("Session_OnlineUserInMeetingsByScoId", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@SCO_ID", SqlDbType.NVarChar); cmd.Parameters["@SCO_ID"].Value = ScoId; rdr = cmd.ExecuteReader(); dt.Load(rdr); rdr.Dispose(); cmd.Connection.Close(); cmd.Dispose(); conn.Close(); return(dt); }
public DataTable GetAllAssetByTime(string filedate, string todate) { SqlCommand cmdAssetByTerm = new SqlCommand(); //cmdAssetByTerm.Connection = vcconn; SqlConnection vc_newconn = new SqlConnection(); Adobe.SettingDAO setting = new Adobe.SettingDAO(); cmdAssetByTerm.Connection = vc_newconn; string termJary = System.Configuration.ConfigurationManager.AppSettings["Term"]; cmdAssetByTerm.Connection.ConnectionString = setting.getAdobeConnectionString(termJary); cmdAssetByTerm.CommandType = CommandType.StoredProcedure; cmdAssetByTerm.CommandText = "R_GetRecordOfMeeting2"; cmdAssetByTerm.Parameters.AddWithValue("@date", filedate); cmdAssetByTerm.Parameters.AddWithValue("@todate", todate); // cmdAssetByTerm.Parameters.AddWithValue("@did", did); vc_newconn.Open(); //connNew.Open(); DataTable dt = new DataTable(); SqlDataReader rdr; rdr = cmdAssetByTerm.ExecuteReader(); dt.Load(rdr); vc_newconn.Close(); //connNew.Close(); return(dt); }
public DataTable LinkOfMeetingsAndContentsByCodeClassAndTime(string code, string date, string term) { SqlDataReader rdr; DataTable dt = new DataTable(); SqlConnection conn = new SqlConnection(); SqlCommand cmd = new SqlCommand(); Adobe.SettingDAO setting = new Adobe.SettingDAO(); conn.ConnectionString = setting.getAdobeConnectionString(term); conn.Open(); cmd.CommandText = "R_LinkOfMeetingWithContents"; cmd.Connection = conn; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@code", SqlDbType.NVarChar); cmd.Parameters["@code"].Value = code; cmd.Parameters.AddWithValue("@date", date); rdr = cmd.ExecuteReader(); dt.Load(rdr); rdr.Dispose(); cmd.Connection.Close(); cmd.Dispose(); conn.Close(); return(dt); }
public DataTable EditLinkOfClassByClassCodeAndDateAndTime(string code, string Date, int time, string term)//sargolChangeTypeClassCode { SqlDataReader rdr = null; DataTable dt = new DataTable(); SqlConnection conn = new SqlConnection(); SqlCommand cmd = new SqlCommand(); Adobe.SettingDAO setting = new Adobe.SettingDAO(); conn.ConnectionString = setting.getAdobeConnectionString(term); conn.Open(); cmd.CommandText = "Edit_RecordsOfMeetings"; cmd.CommandType = CommandType.StoredProcedure; cmd.Connection = conn; cmd.Parameters.Add("@code", SqlDbType.NVarChar); cmd.Parameters["@code"].Value = code; cmd.Parameters.Add("@date", SqlDbType.VarChar); cmd.Parameters["@date"].Value = Date; cmd.Parameters.AddWithValue("@time", time); rdr = cmd.ExecuteReader(); dt.Load(rdr); rdr.Dispose(); cmd.Connection.Close(); cmd.Dispose(); conn.Close(); return(dt); }
public DataTable GetTotalTime(string StudentCode, DateTime TermTimeStart, DateTime TermTimeEnd, string term) { SqlConnection conn = new SqlConnection(); Adobe.SettingDAO setting = new Adobe.SettingDAO(); conn.ConnectionString = setting.getAdobeConnectionString(term); //if (con == "Live") //{ // conn = conn_AdobeLive; //} //else if (con=="Class") //{ // conn = conn_class; //} //else if (con == "vc_new") //{ // conn = conn_vc_New; //} //else if (con == "vc951") //{ // conn.ConnectionString = new AdobeConnection().vc_951; //} //else if (con == "vc952") //{ // conn.ConnectionString = new AdobeConnection().vc_952; //} //else if (con == "vc961") //{ // conn.ConnectionString = new AdobeConnection().vc_961; //} //else if (con == "vc962") //{ // conn.ConnectionString = new AdobeConnection().vc_962; //} SqlDataReader rdr = null; DataTable dt = new DataTable(); conn.Open(); SqlCommand cmd = new SqlCommand("R_StudentTotalTimeinMeetingsByStcode", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@Stcode", SqlDbType.NVarChar); cmd.Parameters["@Stcode"].Value = StudentCode; cmd.Parameters.Add("@TermTimeStart", SqlDbType.Date); cmd.Parameters["@TermTimeStart"].Value = TermTimeStart; cmd.Parameters.Add("@TermTimeEnd", SqlDbType.Date); cmd.Parameters["@TermTimeEnd"].Value = TermTimeEnd; rdr = cmd.ExecuteReader(); dt.Load(rdr); rdr.Dispose(); cmd.Connection.Close(); cmd.Dispose(); conn.Close(); return(dt); }
//====================================================================================== //public DataTable GiveListPrincipal93942() //{ // SqlConnection conn = new SqlConnection(new AdobeConnection().liveconnectionString); // SqlDataReader rdr = null; // DataTable dt = new DataTable(); // conn.Open(); // SqlCommand cmd = new SqlCommand("R_Teacher_PRINCIPAL_ID", conn); // rdr = cmd.ExecuteReader(); // dt.Load(rdr); // rdr.Dispose(); // cmd.Connection.Close(); // cmd.Dispose(); // conn.Close(); // return dt; //} public DataTable GiveListPrincipalbyTerm(string term) { SqlConnection conn = new SqlConnection(); DAO.Adobe.SettingDAO setting = new Adobe.SettingDAO(); setting.getAdobeConnectionString(term); conn.ConnectionString = setting.getAdobeConnectionString(term); SqlDataReader rdr = null; DataTable dt = new DataTable(); conn.Open(); SqlCommand cmd = new SqlCommand("R_Teacher_PRINCIPAL_ID", conn); rdr = cmd.ExecuteReader(); dt.Load(rdr); rdr.Dispose(); cmd.Connection.Close(); cmd.Dispose(); conn.Close(); return(dt); }
/// <summary> /// لیست کلاس هایی آنلاین /// </summary> /// <returns></returns> public DataTable GetMeetingsOnline() { SqlConnection conn = new SqlConnection(); SettingDAO setting = new Adobe.SettingDAO(); string termJary = System.Configuration.ConfigurationManager.AppSettings["Term"]; conn.ConnectionString = setting.getAdobeConnectionString(termJary); SqlDataReader rdr = null; DataTable dt = new DataTable(); conn.Open(); //SqlCommand cmd = new SqlCommand("R_SessionMonitoring_Meetings", conn); SqlCommand cmd = new SqlCommand("[Session_OnlineMeetings]", conn); cmd.CommandType = CommandType.StoredProcedure; rdr = cmd.ExecuteReader(); dt.Load(rdr); rdr.Dispose(); cmd.Connection.Close(); cmd.Dispose(); conn.Close(); return(dt); }
public DataTable GetMGTimeByUserName_Term(string username, string term) { SqlConnection conn = new SqlConnection(); DAO.Adobe.SettingDAO setting = new Adobe.SettingDAO(); conn.ConnectionString = setting.getAdobeConnectionString(term); SqlDataReader rdr = null; DataTable dt = new DataTable(); conn.Open(); SqlCommand cmd = new SqlCommand("R_GroupManagerTotalTimeinMeetingsByUserName", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@Userlogin", SqlDbType.VarChar); cmd.Parameters["@Userlogin"].Value = username; //cmd.Parameters.Add("@GCode", SqlDbType.Variant); //cmd.Parameters["@GCode"].Value = GetMGClassCode(term); //cmd.Parameters.AddWithValue("@GCode", GetMGClassCode(term)); try { rdr = cmd.ExecuteReader(); dt.Load(rdr); rdr.Dispose(); cmd.Connection.Close(); cmd.Dispose(); conn.Close(); } catch (Exception ex) { dt.Columns.Add("error"); DataRow dr = dt.NewRow(); dr[0] = "خطا. کانکشن ترم " + term + " بسته است"; } return(dt); }
public DataTable TimeByUserName_ClassCode(string ProfCode, int ClassCode, string BeginDate, string EndDate, string term) { SqlConnection conn = new SqlConnection(); DAO.Adobe.SettingDAO setting = new Adobe.SettingDAO(); setting.getAdobeConnectionString(term); conn.ConnectionString = setting.getAdobeConnectionString(term); //if (term=="93-94-2") // { // conn.ConnectionString = new AdobeConnection().liveconnectionString; // } // else if (term == "93-94-3") // { // conn.ConnectionString = new AdobeConnection().liveconnectionString; // } // else if (term == "94-95-1") // { // conn.ConnectionString = new AdobeConnection().classconnectionString; // } //else if (term == "94-95-2") //{ // conn.ConnectionString = new AdobeConnection().vc_new_connectionString; //} //else if (term == "95-96-1") //{ // conn.ConnectionString = new AdobeConnection().vc_951; //} // else if (term == "95-96-2") // { // conn.ConnectionString = new AdobeConnection().vc_952; // } // else if (term == "96-97-1") // { // conn.ConnectionString = new AdobeConnection().vc_961; // } // else if (term == "96-97-2") // { // conn.ConnectionString = new AdobeConnection().vc_962; // } // else if (term == "97-98-1") // { // conn.ConnectionString = new AdobeConnection().vc_971; // } // SqlConnection conn = new SqlConnection(new AdobeConnection().liveconnectionString); //SqlConnection conn = // new SqlConnection("User=karimi;Password=123456;server=192.168.30.190; database=faghatkarimi; connection timeout=30;"); SqlDataReader rdr = null; DataTable dt = new DataTable(); conn.Open(); SqlCommand cmd = new SqlCommand("R_TeacherTimeinMeetingsByUserName_ClassCode_LMS", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@LoginName", SqlDbType.NVarChar); cmd.Parameters["@LoginName"].Value = ProfCode; cmd.Parameters.Add("@ClassCode", SqlDbType.NVarChar); cmd.Parameters["@ClassCode"].Value = ClassCode; if (BeginDate != "") { cmd.Parameters.Add("@Shamsi_Date_Begin", SqlDbType.VarChar); cmd.Parameters["@Shamsi_Date_Begin"].Value = BeginDate; } if (EndDate != "") { cmd.Parameters.Add("@Shamsi_Date_End", SqlDbType.VarChar); cmd.Parameters["@Shamsi_Date_End"].Value = EndDate; } rdr = cmd.ExecuteReader(); dt.Load(rdr); rdr.Dispose(); cmd.Connection.Close(); cmd.Dispose(); conn.Close(); DataView dv = dt.DefaultView; dv.Sort = "PersianDate"; DataTable sortedDT = dv.ToTable(); return(sortedDT); }
public DataTable GetTotalTimeInAllClassesByStcode(string StudentCode, string term) { SqlConnection conn = new SqlConnection(); Adobe.SettingDAO setting = new Adobe.SettingDAO(); conn.ConnectionString = setting.getAdobeConnectionString(term); //if (con == "vc") //{ // conn.ConnectionString = new AdobeConnection().VCconnectionString; //} //if (con == "live") //{ // conn = conn_AdobeLive; //} //else if (con == "class") //{ // conn = conn_class; //} //else if (con == "vc_new") //{ // conn = conn_vc_New; //} //else if (con == "vc951") //{ // conn.ConnectionString = new AdobeConnection().vc_951; //} //else if (con == "vc952") //{ // conn.ConnectionString = new AdobeConnection().vc_952; //} //else if (con == "vc961") //{ // conn.ConnectionString = new AdobeConnection().vc_961; //} //else if (con == "vc962") //{ // conn.ConnectionString = new AdobeConnection().vc_962; //} DataTable dt = new DataTable(); //if (con != "vc") //{ SqlDataReader rdr = null; try { conn.Open(); } catch (Exception) { dt.TableName = "Exception"; return(dt); } SqlCommand cmd = new SqlCommand("R_GetTotalTimeInAllClassesByStcode", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@stcode", SqlDbType.VarChar); cmd.Parameters["@stcode"].Value = StudentCode; rdr = cmd.ExecuteReader(); dt.Load(rdr); rdr.Dispose(); cmd.Connection.Close(); cmd.Dispose(); conn.Close(); //} return(dt); }