Ejemplo n.º 1
0
        public static DataTable GetProgress(int progressID)
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_Admin_Progress_GetProgress";

            DbParameter param = dbComm.CreateParameter();

            param.ParameterName = "@ProgressID";
            param.Value         = progressID;
            param.DbType        = DbType.Int32;
            dbComm.Parameters.Add(param);

            DataTable p;

            try
            {
                p = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(p);
        }
Ejemplo n.º 2
0
        public static DataTable GetCounseling(int counselingID)
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_GetCounseling";

            DbParameter dbParam = dbComm.CreateParameter();

            dbParam.ParameterName = "@CounselingID";
            dbParam.Value         = counselingID;
            dbParam.DbType        = DbType.Int32;
            dbParam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbParam);

            DataTable result;

            try
            {
                result = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(result);
        }
Ejemplo n.º 3
0
        public static DataTable GetMemberInfo(string memberId, string password)
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_Admin_Members_GetMemberInfo";

            DbParameter param = dbComm.CreateParameter();

            param.ParameterName = "@MemberID";
            param.Value         = memberId;
            param.DbType        = DbType.String;
            dbComm.Parameters.Add(param);

            param = dbComm.CreateParameter();
            param.ParameterName = "@Password";
            param.Value         = password;
            param.DbType        = DbType.String;
            dbComm.Parameters.Add(param);

            DataTable states;

            try
            {
                states = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(states);
        }
Ejemplo n.º 4
0
        public static DataTable SearchAdminUser(string userID, string password)
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_SearchAdminUser";

            DbParameter dbParam = dbComm.CreateParameter();

            dbParam.ParameterName = "@UserID";
            dbParam.Value         = userID;
            dbParam.DbType        = DbType.String;
            dbParam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbParam);

            dbParam = dbComm.CreateParameter();
            dbParam.ParameterName = "@Password";
            dbParam.Value         = password;
            dbParam.DbType        = DbType.String;
            dbParam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbParam);

            DataTable usertable;

            try
            {
                usertable = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(usertable);
        }
Ejemplo n.º 5
0
        public static DataTable GetSubCategories(int categoryID)
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_Front_Sections_GetSubSections";


            DbParameter dbParam = dbComm.CreateParameter();

            dbParam.ParameterName = "@CategoryID";
            dbParam.Value         = categoryID;
            dbParam.DbType        = DbType.Int32;
            dbParam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbParam);

            DataTable fieldData;

            try
            {
                fieldData = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(fieldData);
        }
Ejemplo n.º 6
0
        public static DataTable GetSection(int sectionID)
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_GetSection";

            DbParameter dbParam = dbComm.CreateParameter();

            dbParam.ParameterName = "@SectionID";
            dbParam.Value         = sectionID;
            dbParam.DbType        = DbType.Int32;
            dbParam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbParam);

            DataTable sectionData;

            try
            {
                sectionData = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(sectionData);
        }
Ejemplo n.º 7
0
        public static DataTable GetNews(int newsID)
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_GetNews";

            DbParameter dbParam = dbComm.CreateParameter();

            dbParam.ParameterName = "@NewsID";
            dbParam.Value         = newsID;
            dbParam.DbType        = DbType.Int32;
            dbParam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbParam);

            DataTable content;

            try
            {
                content = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(content);
        }
Ejemplo n.º 8
0
        public static DataTable GetProgressList(string memberID)
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_Front_Progress_GetProgressList";

            DbParameter param = dbComm.CreateParameter();

            param.ParameterName = "@MemberID";
            param.Value         = memberID;
            param.DbType        = DbType.String;
            dbComm.Parameters.Add(param);

            DataTable p;

            try
            {
                p = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(p);
        }
Ejemplo n.º 9
0
        public static DataTable GetFrontOtherList(int ordersNumber)
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_Front_Other_GetFrontOtherList";

            DbParameter dbParam = dbComm.CreateParameter();

            dbParam.ParameterName = "@OrdersNumber";
            dbParam.Value         = ordersNumber;
            dbParam.DbType        = DbType.Int32;
            dbParam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbParam);

            DataTable content;

            try
            {
                content = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(content);
        }
Ejemplo n.º 10
0
        public static DataTable GetSucess(int ID, int Cat)
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "up_board_retrieveby";

            DbParameter dbParam = dbComm.CreateParameter();

            dbParam.ParameterName = "@UID";
            dbParam.Value         = ID;
            dbParam.DbType        = DbType.Int32;
            dbParam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbParam);

            dbParam = dbComm.CreateParameter();
            dbParam.ParameterName = "@BoardCatID";
            dbParam.Value         = Cat;
            dbParam.DbType        = DbType.Int32;
            dbParam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbParam);


            DataTable content;

            try
            {
                content = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(content);
        }
Ejemplo n.º 11
0
        public static DataTable GetsucessList(int aa, string fdate, string tdate, int bb)
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "up_board_retrieve_list";

            DbParameter dbParam = dbComm.CreateParameter();

            dbParam.ParameterName = "@UID";
            dbParam.Value         = "0";
            dbParam.DbType        = DbType.Int32;
            dbParam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbParam);

            dbParam = dbComm.CreateParameter();
            dbParam.ParameterName = "@DateFrom";
            dbParam.Value         = fdate;
            dbParam.DbType        = DbType.DateTime;
            dbParam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbParam);

            dbParam = dbComm.CreateParameter();
            dbParam.ParameterName = "@DateTo";
            dbParam.Value         = tdate;
            dbParam.DbType        = DbType.DateTime;
            dbParam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbParam);

            dbParam = dbComm.CreateParameter();
            dbParam.ParameterName = "@BoardCatID";
            dbParam.Value         = "0";
            dbParam.DbType        = DbType.Int32;
            dbParam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbParam);

            DataTable content;

            try
            {
                content = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(content);
        }
Ejemplo n.º 12
0
        public static DataTable GetMembers()
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_Admin_Members_GetMembers";

            DataTable members;

            try
            {
                members = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(members);
        }
Ejemplo n.º 13
0
        public static DataTable GetSections()
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_GetSections";

            DataTable sectionData;

            try
            {
                sectionData = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(sectionData);
        }
Ejemplo n.º 14
0
        public static DataTable GetCategories()
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_GetAllCategories";

            DataTable categoryData;

            try
            {
                categoryData = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(categoryData);
        }
Ejemplo n.º 15
0
        public static DataTable GetCaseList(int pageNumber, int casesPerPage, out int howManyPages)
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_Front_Case_GetFrontCaseList";


            DbParameter dbParam = dbComm.CreateParameter();

            dbParam.ParameterName = "@PageNumber";
            dbParam.Value         = pageNumber;
            dbParam.DbType        = DbType.Int32;
            dbParam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbParam);


            dbParam = dbComm.CreateParameter();
            dbParam.ParameterName = "@CasesPerPage";
            dbParam.Value         = casesPerPage;
            dbParam.DbType        = DbType.Int32;
            dbParam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbParam);

            dbParam = dbComm.CreateParameter();
            dbParam.ParameterName = "@HowManyCases";
            dbParam.Direction     = ParameterDirection.Output;
            dbParam.DbType        = DbType.Int32;
            dbComm.Parameters.Add(dbParam);


            DataTable fieldData;

            try
            {
                fieldData = BaseDB.ExecuteSelect(dbComm);
                int howManyCases = Int32.Parse(dbComm.Parameters["@HowManyCases"].Value.ToString());
                howManyPages = (int)Math.Ceiling((double)howManyCases / (double)casesPerPage);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(fieldData);
        }
Ejemplo n.º 16
0
        public static DataTable GetNewsList()
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_GetNewsList";


            DataTable contents;

            try
            {
                contents = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(contents);
        }
Ejemplo n.º 17
0
        public static DataTable GetCounselings()
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_GetCounselings";


            DataTable result;

            try
            {
                result = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(result);
        }
Ejemplo n.º 18
0
        public static DataTable GetAllCategories()
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_Front_Sections_GetAllCategories";
            dbComm.CommandType = CommandType.StoredProcedure;


            DataTable fieldData;

            try
            {
                fieldData = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            return(fieldData);
        }
Ejemplo n.º 19
0
        public static int CountSubCategoriesInCategory(int categoryID)
        {
            DbCommand dbComm = BaseDB.CreateCommand();

            dbComm.CommandText = "E_Front_Categories_CountSubCategoriesInCategory";


            DbParameter dbParam = dbComm.CreateParameter();

            dbParam.ParameterName = "@CategoryID";
            dbParam.Value         = categoryID;
            dbParam.DbType        = DbType.Int32;
            dbParam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbParam);

            DataTable fieldData;

            try
            {
                fieldData = BaseDB.ExecuteSelect(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            if (fieldData.Rows.Count > 0)
            {
                int prodCount = 0;
                int.TryParse(fieldData.Rows[0]["Total"].ToString(), out prodCount);
                if (prodCount > 0)
                {
                    return(prodCount);
                }
            }
            return(0);
        }