Exemple #1
0
        public Hashtable getHomeInformation()
        {
            //order in the list should be
            //
            List <string> lsthomeinfo = new List <string>();

            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] { };
                dsResultSet = DB_UTILITY.RunSP("USP_FETCH_HOMEMASTERDATA", arrParameter);
                if (ValidateResultSet(dsResultSet))
                {
                    htHomeData = new Hashtable();
                    htHomeData.Add("CATEGORY", OBJECT_UTILITY.GetConvertCollection <Category>(dsResultSet.Tables[0]));
                    htHomeData.Add("INSTITUTE", OBJECT_UTILITY.GetConvertCollection <Institute>(dsResultSet.Tables[1]));
                    htHomeData.Add("HOSTEL", OBJECT_UTILITY.GetConvertCollection <Hostel>((dsResultSet.Tables[2])));
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(htHomeData);
        }
Exemple #2
0
        public List <string> getAdminDashboardInformation()
        {
            //order in the list should be
            //USER AUTHENTICATION, USER QUERY, PARTNER QUERY, L1 COURSE, L2 COURSE COUNT, SUPPLIER COUNT, AGENCY COUNT
            List <string> lstDashbaordinfo = new List <string>();

            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] { };
                dsResultSet = DB_UTILITY.RunSP("USP_FETCH_ADMINDASHBOARD", arrParameter);
                if (ValidateResultSet(dsResultSet))
                {
                    foreach (DataTable dtTable in dsResultSet.Tables)
                    {
                        lstDashbaordinfo.Add(dtTable.Rows[0][0].ToString());
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(lstDashbaordinfo);
        }
        public bool CreateCategory(Category category)
        {
            bool result = false;

            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] {
                    DB_UTILITY.CreateParameter("@iTitle", DbType.String, ParameterDirection.Input, category.Title),
                    DB_UTILITY.CreateParameter("@iDescription", DbType.String, ParameterDirection.Input, category.Details),
                    DB_UTILITY.CreateParameter("@iBannerImage", DbType.String, ParameterDirection.Input, category.HomeImage == null ? "" : category.HomeImage),
                    DB_UTILITY.CreateParameter("@iBannerImageAccess", DbType.String, ParameterDirection.Input, category.HomeImageAccess),
                    DB_UTILITY.CreateParameter("@iHomePageAccess", DbType.String, ParameterDirection.Input, category.HomePageAccess),
                    DB_UTILITY.CreateParameter("@iStatus", DbType.String, ParameterDirection.Input, "1")
                };
                dsResultSet = DB_UTILITY.RunSP("USP_INSERTTBL_CATEGORY", arrParameter);
                if (ValidateResultSet(dsResultSet))
                {
                    result = Convert.ToBoolean(dsResultSet.Tables[0].Rows[0][0]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
Exemple #4
0
 /// <summary>
 /// Description:To get the active user list from database
 /// Name:Bhargav krishna
 /// </summary>
 public List <Users> GetUsers()
 {
     try
     {
         IDbDataParameter[] arrParameter = new IDbDataParameter[] { };
         dsResultSet = DB_UTILITY.RunSP("USP_FETCH_USERSLIST", arrParameter);
         if (ValidateResultSet(dsResultSet))
         {
             listuser = OBJECT_UTILITY.GetConvertCollection <Users>(dsResultSet.Tables[0]);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(listuser);
 }
 public List <Category> getCategoryList(ref int Total)
 {
     try
     {
         IDbDataParameter[] arrParameter = new IDbDataParameter[] { };
         dsResultSet = DB_UTILITY.RunSP("USP_FETCHTBL_CATEGORY", arrParameter);
         if (ValidateResultSet(dsResultSet))
         {
             Total       = Convert.ToInt32(dsResultSet.Tables[0].Rows[0][0]);
             lstCategory = OBJECT_UTILITY.GetConvertCollection <Category>(dsResultSet.Tables[1]);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(lstCategory);
 }
Exemple #6
0
 /// <summary>
 /// Description :Verify User Login
 /// Name:Sruthi A
 /// </summary>
 public Users VerifyUserLogin(string UserMailID, string Password)
 {
     _users = new Users();
     try
     {
         IDbDataParameter[] arrParameter = new IDbDataParameter[] {
             DB_UTILITY.CreateParameter("@iMailId", DbType.String, ParameterDirection.Input, UserMailID),
             DB_UTILITY.CreateParameter("@iPassword", DbType.String, ParameterDirection.Input, Password)
         };
         dtuser = DB_UTILITY.RunSP("USP_FETCH_USERSLOGIN", arrParameter);
         if (ValidateResultSet(dtuser))
         {
             _users = OBJECT_UTILITY.GetConvert <Users>(dtuser.Tables[0]);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(_users);
 }
Exemple #7
0
        public bool CreateHostel(Hostel Hostel)
        {
            bool result = false;

            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] {
                    DB_UTILITY.CreateParameter("@iTitle", DbType.String, ParameterDirection.Input, Hostel.Title),
                    DB_UTILITY.CreateParameter("@iDescription", DbType.String, ParameterDirection.Input, Hostel.Detials),
                    DB_UTILITY.CreateParameter("@iCategory", DbType.String, ParameterDirection.Input, Hostel.Category),
                    DB_UTILITY.CreateParameter("@iBannerImage", DbType.String, ParameterDirection.Input, Hostel.BannerImage == null ? "" : Hostel.BannerImage),
                    DB_UTILITY.CreateParameter("@iBannerImageAccess", DbType.String, ParameterDirection.Input, Hostel.BannerImageAccess),
                    DB_UTILITY.CreateParameter("@iSliderAccess", DbType.String, ParameterDirection.Input, Hostel.SliderAccess),
                    DB_UTILITY.CreateParameter("@iStateCode", DbType.String, ParameterDirection.Input, Hostel.StateCode),
                    DB_UTILITY.CreateParameter("@iCityCode", DbType.String, ParameterDirection.Input, Hostel.CityCode),
                    DB_UTILITY.CreateParameter("@iAreaCode", DbType.String, ParameterDirection.Input, Hostel.AreaCode),
                    DB_UTILITY.CreateParameter("@iContactNo", DbType.String, ParameterDirection.Input, Hostel.ContactNumber),
                    DB_UTILITY.CreateParameter("@iMailID", DbType.String, ParameterDirection.Input, Hostel.MailID),
                    DB_UTILITY.CreateParameter("@iAddress", DbType.String, ParameterDirection.Input, Hostel.Address),
                    DB_UTILITY.CreateParameter("@iLandmark", DbType.String, ParameterDirection.Input, Hostel.Landmark),
                    DB_UTILITY.CreateParameter("@iShare", DbType.String, ParameterDirection.Input, Hostel.Share),
                    DB_UTILITY.CreateParameter("@iBudget", DbType.String, ParameterDirection.Input, Hostel.Budget),
                    DB_UTILITY.CreateParameter("@iAmenities", DbType.String, ParameterDirection.Input, Hostel.Amenities),
                    DB_UTILITY.CreateParameter("@iGoogleLocation", DbType.String, ParameterDirection.Input, Hostel.GoogleLocation),
                    DB_UTILITY.CreateParameter("@iHomePageAccess", DbType.String, ParameterDirection.Input, Hostel.HomePageAccess),
                    DB_UTILITY.CreateParameter("@iStatus", DbType.String, ParameterDirection.Input, "1")
                };
                dsResultSet = DB_UTILITY.RunSP("USP_INSERTTBL_AGENCY", arrParameter);
                if (ValidateResultSet(dsResultSet))
                {
                    result = Convert.ToBoolean(dsResultSet.Tables[0].Rows[0][0]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }
        public List <Location> getLocations()
        {
            //order in the list should be
            //
            List <string> lstlocationinfo = new List <string>();

            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] { };
                dsResultSet = DB_UTILITY.RunSP("USP_FETCH_LOCATION", arrParameter);
                if (ValidateResultSet(dsResultSet))
                {
                    lstLocations = OBJECT_UTILITY.GetConvertCollection <Location>(dsResultSet.Tables[0]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(lstLocations);
        }
Exemple #9
0
        public List <Hostel> getHostels()
        {
            //order in the list should be
            //
            List <string> lstHostelinfo = new List <string>();

            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] { };
                dsResultSet = DB_UTILITY.RunSP("USP_FETCH_AGENCY", arrParameter);
                if (ValidateResultSet(dsResultSet))
                {
                    lstHostel = OBJECT_UTILITY.GetConvertCollection <Hostel>(dsResultSet.Tables[0]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(lstHostel);
        }
        public bool CreateInstitute(Institute Institute)
        {
            bool result = false;

            try
            {
                IDbDataParameter[] arrParameter = new IDbDataParameter[] {
                    DB_UTILITY.CreateParameter("@iTitle", DbType.String, ParameterDirection.Input, Institute.Title),
                    DB_UTILITY.CreateParameter("@iDescription", DbType.String, ParameterDirection.Input, Institute.Details),
                    DB_UTILITY.CreateParameter("@iBannerImage", DbType.String, ParameterDirection.Input, Institute.BannerImage == null ? "" : Institute.BannerImage),
                    DB_UTILITY.CreateParameter("@iBannerImageAccess", DbType.String, ParameterDirection.Input, Institute.BannerImageAccess),
                    DB_UTILITY.CreateParameter("@iSliderAccess", DbType.String, ParameterDirection.Input, Institute.SliderAccess),
                    DB_UTILITY.CreateParameter("@iStateCode", DbType.String, ParameterDirection.Input, Institute.StateCode),
                    DB_UTILITY.CreateParameter("@iCityCode", DbType.String, ParameterDirection.Input, Institute.CityCode),
                    DB_UTILITY.CreateParameter("@iAreaCode", DbType.String, ParameterDirection.Input, Institute.AreaCode),
                    DB_UTILITY.CreateParameter("@iContactNo", DbType.String, ParameterDirection.Input, Institute.ContactNo),
                    DB_UTILITY.CreateParameter("@iMailID", DbType.String, ParameterDirection.Input, Institute.MailID),
                    DB_UTILITY.CreateParameter("@iAddress", DbType.String, ParameterDirection.Input, Institute.Address),
                    DB_UTILITY.CreateParameter("@iLandmark", DbType.String, ParameterDirection.Input, Institute.Landmark),
                    DB_UTILITY.CreateParameter("@iGoogleLocation", DbType.String, ParameterDirection.Input, Institute.GoogleLocation),
                    DB_UTILITY.CreateParameter("@iHomePageAccess", DbType.String, ParameterDirection.Input, Institute.HomePageAccess),
                    DB_UTILITY.CreateParameter("@iStatus", DbType.String, ParameterDirection.Input, "1")
                };
                dsResultSet = DB_UTILITY.RunSP("USP_INSERTTBL_SUPPLIER", arrParameter);
                if (ValidateResultSet(dsResultSet))
                {
                    result = Convert.ToBoolean(dsResultSet.Tables[0].Rows[0][0]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(result);
        }