private void _Click(object sender,System.EventArgs e) { ACMS.Control.ClassComponent cc; cc = (ACMS.Control.ClassComponent) sender; string strSQL = "select * from tblClassSchedule where strClassCode='" + cc.ClassName + "' and nDay="+ cc.Day + " and nHallNo='" + cc.ClassHall + "' and convert(varchar,dtStartTime,108)='" + Convert.ToDateTime(cc.StartTime).ToString("HH:mm:ss") + "'"; DataSet _ds = new DataSet(); SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) ); ACMSManager.frmClassSchedule myform = new ACMS.ACMSManager.frmClassSchedule(_ds.Tables["table"]); myform.ShowDialog(); }
private void _Click(object sender, System.EventArgs e) { ACMS.Control.ClassComponent cc; cc = (ACMS.Control.ClassComponent)sender; string strSQL = "SELECT nClassScheduleID, strBranchCode, nDay, dtStartTime, dtEndTime, " + "strClassCode, nHallNo, nInstructorID, fFree, COALESCE(fPeak, -1) AS fPeak, " + "fAllowStudentOnPeak, fReservation, nMaxNo, fAllowUOBBooking, nCommissionTypeID,dtStartDate,dtEndDate " + "FROM tblClassSchedule " + "WHERE nClassScheduleID = " + cc.ClassScheduleID; DataSet _ds = new DataSet(); SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA", _ds, new string[] { "table" }, new SqlParameter("@strSQL", strSQL)); ACMSManager.frmClassSchedule myform = new ACMS.ACMSManager.frmClassSchedule(_ds.Tables["table"]); myform.ShowDialog(); }