Ejemplo n.º 1
0
    public clsMessage UpdateExamScheduleBulk(clsExamSchedule pExamSchedule, List <clsExamCourseSchedule> pExamCourseScheduleList, string action = "Insert")
    {
        clsMessage rm = new clsMessage();

        rm = pExamSchedule.updateExamScheduleBulk(pExamCourseScheduleList, action);

        return(rm);
    }
Ejemplo n.º 2
0
    public clsMessage UpdateExamSchedule(clsExamSchedule examSchedule, string action = "Insert")
    {
        clsMessage rm = new clsMessage();

        rm = examSchedule.updateExamSchedule(action);

        return(rm);
    }
Ejemplo n.º 3
0
    public List <clsExamSchedule> GetExamScheduleList(string ExamID)
    {
        clsExamSchedule        examClass = new clsExamSchedule();
        List <clsExamSchedule> examList  = new List <clsExamSchedule>();

        try
        {
            examClass.ExamID = int.Parse((String.IsNullOrEmpty(ExamID) ? "0" : ExamID));

            examList = examClass.getExamSchedule();
        }
        catch (Exception er) {
            examList.Add(new clsExamSchedule {
                ErrorMessage = er.Message.ToString()
            });
        }
        return(examList);
    }
Ejemplo n.º 4
0
        public static Boolean InsertUpdateExamSchedule(clsExamSchedule objExamSchedule)
        {
            bool   isAdded = false;
            string SpName  = "usp_InsertUpdateExamSchedule";

            try
            {
                using (IDbConnection db = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["databaseConnection"]))
                {
                    db.Execute(SpName, objExamSchedule, commandType: CommandType.StoredProcedure);
                }
                isAdded = true;
            }
            catch (Exception ex)
            {
                ErrorHandler.ErrorLogging(ex, false);
                ErrorHandler.ReadError();
            }
            return(isAdded);
        }
Ejemplo n.º 5
0
        public static clsExamSchedule SelectExamScheduleById(int ExamScheduleId)
        {
            clsExamSchedule objExamSchedule = new clsExamSchedule();
            bool            isnull          = true;
            string          SpName          = "usp_SelectExamSchedule";
            var             objPar          = new DynamicParameters();

            if (String.IsNullOrEmpty(ExamScheduleId.ToString()))
            {
                throw new ArgumentException("Function parameters cannot be blank!");
            }
            else
            {
                try
                {
                    objPar.Add("@ExamScheduleId", ExamScheduleId, dbType: DbType.Int32);

                    using (IDbConnection db = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["databaseConnection"]))
                    {
                        objExamSchedule = db.Query <clsExamSchedule>(SpName, objPar, commandType: CommandType.StoredProcedure).SingleOrDefault();
                        isnull          = false;
                    }
                }
                catch (Exception ex)
                {
                    ErrorHandler.ErrorLogging(ex, false);
                    ErrorHandler.ReadError();
                }
            }

            if (isnull)
            {
                return(null);
            }
            else
            {
                return(objExamSchedule);
            }
        }