Exemplo n.º 1
0
        public DataSet FetchFirstname(int userid)
        {
            Database  db    = null;
            DbCommand dbCmd = null;
            DataSet   ds    = null;

            try
            {
                //Database Connection String
                db = DatabaseFactory.CreateDatabase(AllDA.DATABASE_CONNECTION_STRING);
                //Access Stored Procedure
                dbCmd = db.GetStoredProcCommand(AllDA.FETCH_FIRST_NAME);
                //Pass parameteres in stored procedure
                db.AddInParameter(dbCmd, "@USER_ID", DbType.Int32, userid);

                //Execute database commands and store results in dataset
                ds = db.ExecuteDataSet(dbCmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                AllDA.Destroy(ref dbCmd);
            }
            //return dataset
            return(ds);
        }
Exemplo n.º 2
0
        public DataSet updateusermaster(int userid, string fname, string lname, string email, string contactnumber, string securityanswers)
        {
            Database  db     = null;
            DbCommand dbCmd  = null;
            DataSet   dsData = null;

            try
            {
                //Database Connection String
                db = DatabaseFactory.CreateDatabase(AllDA.DATABASE_CONNECTION_STRING);
                //Access Stored Procedure
                dbCmd = db.GetStoredProcCommand(AllDA.UPDATE_USERMASTER_DATA);
                //Pass parameteres in stored procedure
                db.AddInParameter(dbCmd, "@USER_ID", DbType.Int32, userid);
                db.AddInParameter(dbCmd, "@FIRST_NAME", DbType.String, fname);
                db.AddInParameter(dbCmd, "@LAST_NAME", DbType.String, lname);
                db.AddInParameter(dbCmd, "@RECOVERY_EMAIL", DbType.String, email);
                db.AddInParameter(dbCmd, "@PHONE_NUMBER", DbType.String, contactnumber);
                db.AddInParameter(dbCmd, "@SECURITY_ANSWER", DbType.String, securityanswers);

                //Execute database commands and store results in dataset
                dsData = db.ExecuteDataSet(dbCmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                AllDA.Destroy(ref dbCmd);
            }
            //return dataset
            return(dsData);
        }
Exemplo n.º 3
0
        //Contact us

        public DataSet FetchEmailID(string USER_NAME)
        {
            Database  db    = null;
            DbCommand dbCmd = null;
            DataSet   ds    = null;

            try
            {
                //Database Connection String
                db = DatabaseFactory.CreateDatabase(AllDA.DATABASE_CONNECTION_STRING);
                //Access Stored Procedure
                dbCmd = db.GetStoredProcCommand(AllDA.FETCH_FORGOTPASSWORD_DETAILS);
                //Pass parameteres in stored procedure
                db.AddInParameter(dbCmd, "@USER_NAME", DbType.String, USER_NAME);

                //Execute database commands and store results in dataset
                ds = db.ExecuteDataSet(dbCmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                AllDA.Destroy(ref dbCmd);
            }
            //return dataset
            return(ds);
        }
Exemplo n.º 4
0
        public DataTable Fetchalldatadropdown()
        {
            Database  db    = null;
            DbCommand dbCmd = null;
            DataSet   ds    = null;

            try
            {
                //Database Connection String
                db = DatabaseFactory.CreateDatabase(AllDA.DATABASE_CONNECTION_STRING);
                //Access Stored Procedure
                dbCmd = db.GetStoredProcCommand(AllDA.FETCH_ADMIN);
                //Pass parameteres in stored procedure

                //Execute database commands and store results in dataset
                ds = db.ExecuteDataSet(dbCmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                AllDA.Destroy(ref dbCmd);
            }
            //return dataset
            return(ds.Tables[0]);
        }
Exemplo n.º 5
0
        public DataSet fetchreportsbyfilter(int userid, string firstname, string lastname, string username, string phone, string email, string seqanswer, string usertype, string status)
        {
            Database  db     = null;
            DbCommand dbCmd  = null;
            DataSet   dsData = null;

            try
            {
                //Database Connection String
                db = DatabaseFactory.CreateDatabase(AllDA.DATABASE_CONNECTION_STRING);
                //Access Stored Procedure
                dbCmd = db.GetStoredProcCommand(AllDA.SEARCH_REPORTS);
                //Pass parameteres in stored procedure
                db.AddInParameter(dbCmd, "@USER_ID", DbType.Int32, userid);
                db.AddInParameter(dbCmd, "@FIRST_NAME", DbType.String, firstname);
                db.AddInParameter(dbCmd, "@LAST_NAME", DbType.String, lastname);
                db.AddInParameter(dbCmd, "@USER_NAME", DbType.String, username);
                db.AddInParameter(dbCmd, "@PHONE_NUMBER", DbType.String, phone);
                db.AddInParameter(dbCmd, "@RECOVERY_EMAIL", DbType.String, email);
                db.AddInParameter(dbCmd, "@SECURITY_ANSWER", DbType.String, seqanswer);
                db.AddInParameter(dbCmd, "@USER_TYPE", DbType.String, usertype);
                db.AddInParameter(dbCmd, "@USER_STATUS", DbType.String, status);
                dsData = db.ExecuteDataSet(dbCmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                AllDA.Destroy(ref dbCmd);
            }
            //return dataset
            return(dsData);
        }
Exemplo n.º 6
0
        public DataSet FetchRatingDataForLandlord(int landlordid)
        {
            Database  db    = null;
            DbCommand dbCmd = null;
            DataSet   ds    = null;

            try
            {
                //Database Connection String
                db = DatabaseFactory.CreateDatabase(AllDA.DATABASE_CONNECTION_STRING);
                //Access Stored Procedure
                dbCmd = db.GetStoredProcCommand(AllDA.FETCH_RATINGS_DETAILS_LANDLORD_WISE);
                //Pass parameteres in stored procedure
                db.AddInParameter(dbCmd, "@REQUEST_RECEIVER_LANDLORD_ID", DbType.Int32, landlordid);
                //Execute database commands and store results in dataset
                ds = db.ExecuteDataSet(dbCmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                AllDA.Destroy(ref dbCmd);
            }
            //return dataset
            return(ds);
        }
Exemplo n.º 7
0
        public DataSet FetchViewRatingsallData()
        {
            Database  db    = null;
            DbCommand dbCmd = null;
            DataSet   ds    = null;

            try
            {
                //Database Connection String
                db = DatabaseFactory.CreateDatabase(AllDA.DATABASE_CONNECTION_STRING);
                //Access Stored Procedure
                dbCmd = db.GetStoredProcCommand(AllDA.FETCH_ALL_VIEW_RATINGS);
                ds    = db.ExecuteDataSet(dbCmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                AllDA.Destroy(ref dbCmd);
            }
            //return dataset
            return(ds);
        }
Exemplo n.º 8
0
        public DataSet insertrequestpropertydetail(int propertyid, int tenantid, int landlordid)
        {
            Database  db    = null;
            DbCommand dbCmd = null;
            DataSet   ds    = null;

            try
            {
                //Database Connection String
                db = DatabaseFactory.CreateDatabase(AllDA.DATABASE_CONNECTION_STRING);
                //Access Stored Procedure
                dbCmd = db.GetStoredProcCommand(AllDA.INSERT_REQUEST_PROPERTY_DATA);
                //Pass parameteres in stored procedure

                db.AddInParameter(dbCmd, "@PROPERTY_ID", DbType.Int32, propertyid);
                db.AddInParameter(dbCmd, "@REQUEST_SENDER_TENANT_ID", DbType.Int32, tenantid);
                db.AddInParameter(dbCmd, "@REQUEST_RECEIVER_LANDLORD_ID", DbType.String, landlordid);
                //Execute database commands and store results in dataset
                ds = db.ExecuteDataSet(dbCmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                AllDA.Destroy(ref dbCmd);
            }
            //return dataset
            return(ds);
        }
Exemplo n.º 9
0
        public DataSet Updatephoto(int propertyid, string photo)
        {
            Database  db    = null;
            DbCommand dbCmd = null;
            DataSet   ds    = null;

            try
            {
                //Database Connection String
                db = DatabaseFactory.CreateDatabase(AllDA.DATABASE_CONNECTION_STRING);
                //Access Stored Procedure
                dbCmd = db.GetStoredProcCommand(AllDA.UPDATE_PROPERTY_PHOTO);
                //Pass parameteres in stored procedure

                db.AddInParameter(dbCmd, "@PROPERTY_ID", DbType.Int32, propertyid);
                db.AddInParameter(dbCmd, "@PHOTOS", DbType.String, photo);
                //Execute database commands and store results in dataset
                ds = db.ExecuteDataSet(dbCmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                AllDA.Destroy(ref dbCmd);
            }
            //return dataset
            return(ds);
        }
Exemplo n.º 10
0
        public DataSet ViewAllProperty()
        {
            Database  db    = null;
            DbCommand dbCmd = null;
            DataSet   ds    = null;

            try
            {
                //Database Connection String
                db = DatabaseFactory.CreateDatabase(AllDA.DATABASE_CONNECTION_STRING);
                //Access Stored Procedure
                dbCmd = db.GetStoredProcCommand(AllDA.VIEW_ALL_PROPERTY);
                //Pass parameteres in stored procedure

                //Execute database commands and store results in dataset
                ds = db.ExecuteDataSet(dbCmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                AllDA.Destroy(ref dbCmd);
            }
            //return dataset
            return(ds);
        }
Exemplo n.º 11
0
        public DataSet Viewpostedproperty(int landlordid)
        {
            Database  db    = null;
            DbCommand dbCmd = null;
            DataSet   ds    = null;

            try
            {
                //Database Connection String
                db = DatabaseFactory.CreateDatabase(AllDA.DATABASE_CONNECTION_STRING);
                //Access Stored Procedure
                dbCmd = db.GetStoredProcCommand(AllDA.VIEW_POSTED_PROPERTY_LANDLORD);
                //Pass parameteres in stored procedure
                db.AddInParameter(dbCmd, "@USER_ID", DbType.String, landlordid);
                //Execute database commands and store results in dataset
                ds = db.ExecuteDataSet(dbCmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                AllDA.Destroy(ref dbCmd);
            }
            //return dataset
            return(ds);
        }
Exemplo n.º 12
0
        public DataSet Postpropertyforrent(string propertytype, string ownername, string contactnumber, string propertyaddress, string propertycity, string propertystate, string propertyzipcode, string builtdate, string bedbath, string photo, double rent, int userid)
        {
            Database  db    = null;
            DbCommand dbCmd = null;
            DataSet   ds    = null;

            try
            {
                //Database Connection String
                db = DatabaseFactory.CreateDatabase(AllDA.DATABASE_CONNECTION_STRING);
                //Access Stored Procedure
                dbCmd = db.GetStoredProcCommand(AllDA.INSERT_PROPERTY_DETAILS);
                //Pass parameteres in stored procedure
                db.AddInParameter(dbCmd, "@PROPERTY_TYPE", DbType.String, propertytype);
                db.AddInParameter(dbCmd, "@OWNER_NAME", DbType.String, ownername);
                db.AddInParameter(dbCmd, "@CONTACT_NUMBER", DbType.String, contactnumber);
                db.AddInParameter(dbCmd, "@PROPERTY_ADDRESS", DbType.String, propertyaddress);
                db.AddInParameter(dbCmd, "@CITY", DbType.String, propertycity);
                db.AddInParameter(dbCmd, "@STATE", DbType.String, propertystate);
                db.AddInParameter(dbCmd, "@ZIPCODE", DbType.String, propertyzipcode);
                db.AddInParameter(dbCmd, "@BUILTDATE", DbType.String, builtdate);
                db.AddInParameter(dbCmd, "@BED_BATH", DbType.String, bedbath);
                db.AddInParameter(dbCmd, "@PHOTOS", DbType.String, photo);
                db.AddInParameter(dbCmd, "@RENT", DbType.Double, rent);
                db.AddInParameter(dbCmd, "@USER_ID", DbType.Int32, userid);
                //Execute database commands and store results in dataset
                ds = db.ExecuteDataSet(dbCmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                AllDA.Destroy(ref dbCmd);
            }
            //return dataset
            return(ds);
        }
Exemplo n.º 13
0
        public DataSet InsertregistrationDetailsAdmin(string fname, string lname, string username, string password, string phonenumber, string recoveryemail, string adminpassword, string securityque, string securityanswer, string usertype)
        {
            Database  db     = null;
            DbCommand dbCmd  = null;
            DataSet   dsData = null;

            try
            {
                //Database Connection String
                db = DatabaseFactory.CreateDatabase(AllDA.DATABASE_CONNECTION_STRING);
                //Access Stored Procedure
                dbCmd = db.GetStoredProcCommand(AllDA.INSERT_REGISTRATION_DETAILS_ADMIN);
                //Pass parameteres in stored procedure
                db.AddInParameter(dbCmd, "@FIRST_NAME", DbType.String, fname);
                db.AddInParameter(dbCmd, "@LAST_NAME", DbType.String, lname);
                db.AddInParameter(dbCmd, "@USER_NAME", DbType.String, username);
                db.AddInParameter(dbCmd, "@PASSWORD", DbType.String, password);
                db.AddInParameter(dbCmd, "@PHONE_NUMBER", DbType.String, phonenumber);
                db.AddInParameter(dbCmd, "@RECOVERY_EMAIL", DbType.String, recoveryemail);
                db.AddInParameter(dbCmd, "@DBA_PASSWORD", DbType.String, adminpassword);
                db.AddInParameter(dbCmd, "@SECURITY_QUE", DbType.String, securityque);
                db.AddInParameter(dbCmd, "@SECURITY_ANSWER", DbType.String, securityanswer);
                db.AddInParameter(dbCmd, "@USER_TYPE", DbType.String, usertype);

                //Execute database commands and store results in dataset
                dsData = db.ExecuteDataSet(dbCmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                AllDA.Destroy(ref dbCmd);
            }
            //return dataset
            return(dsData);
        }
Exemplo n.º 14
0
        public DataSet InsertregistrationDetails(string fname, string lname, string username, string password, string phonenumber, string address, string city, string state, string zipcode, string recoveryemail)
        {
            Database  db     = null;
            DbCommand dbCmd  = null;
            DataSet   dsData = null;

            try
            {
                //Database Connection String
                db = DatabaseFactory.CreateDatabase(AllDA.DATABASE_CONNECTION_STRING);
                //Access Stored Procedure
                dbCmd = db.GetStoredProcCommand(AllDA.INSERT_REGISTRATION_DETAILS);
                //Pass parameteres in stored procedure
                db.AddInParameter(dbCmd, "@FIRST_NAME", DbType.String, fname);
                db.AddInParameter(dbCmd, "@LAST_NAME", DbType.String, lname);
                db.AddInParameter(dbCmd, "@USER_NAME", DbType.String, username);
                db.AddInParameter(dbCmd, "@PASSWORD", DbType.String, password);
                db.AddInParameter(dbCmd, "@PHONE_NUMBER", DbType.String, phonenumber);
                db.AddInParameter(dbCmd, "@ADDRESS", DbType.String, address);
                db.AddInParameter(dbCmd, "@CITY", DbType.String, city);
                db.AddInParameter(dbCmd, "@STATE", DbType.String, state);
                db.AddInParameter(dbCmd, "@ZIPCODE", DbType.String, zipcode);
                db.AddInParameter(dbCmd, "@RECOVERY_EMAIL", DbType.String, recoveryemail);
                //Execute database commands and store results in dataset
                dsData = db.ExecuteDataSet(dbCmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                AllDA.Destroy(ref dbCmd);
            }
            //return dataset
            return(dsData);
        }
Exemplo n.º 15
0
        public DataSet INSERT_SUBMIT_RATINGS_DETAILS(int ratingid, int fromuserid, int touserid, int ratings, string reviews, string propertyaddress, string city, string state, string zipcode, int propertyid)
        {
            Database  db     = null;
            DbCommand dbCmd  = null;
            DataSet   dsData = null;

            try
            {
                //Database Connection String
                db = DatabaseFactory.CreateDatabase(AllDA.DATABASE_CONNECTION_STRING);
                //Access Stored Procedure
                dbCmd = db.GetStoredProcCommand(AllDA.INSERT_SUBMIT_RATINGS_DETAILS);
                //Pass parameteres in stored procedure
                db.AddInParameter(dbCmd, "@RATING_ID", DbType.Int32, ratingid);
                db.AddInParameter(dbCmd, "@FROM_USER_ID", DbType.Int32, fromuserid);
                db.AddInParameter(dbCmd, "@TO_USER_ID", DbType.Int32, touserid);
                db.AddInParameter(dbCmd, "@RATINGS", DbType.Int32, ratings);
                db.AddInParameter(dbCmd, "@REVIEWS", DbType.String, reviews);
                db.AddInParameter(dbCmd, "@PROPERTY_ADDRESS", DbType.String, propertyaddress);
                db.AddInParameter(dbCmd, "@CITY", DbType.String, city);
                db.AddInParameter(dbCmd, "@STATE", DbType.String, state);
                db.AddInParameter(dbCmd, "@ZIPCODE", DbType.String, zipcode);
                db.AddInParameter(dbCmd, "@PROPERTY_ID", DbType.Int32, propertyid);
                //Execute database commands and store results in dataset
                dsData = db.ExecuteDataSet(dbCmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                AllDA.Destroy(ref dbCmd);
            }
            //return dataset
            return(dsData);
        }
Exemplo n.º 16
0
        public DataSet Insertcontactdetails(string fname, string lname, string email, string contactnumber, string inquiry, string chkemail, string chkcontactnum)
        {
            Database  db     = null;
            DbCommand dbCmd  = null;
            DataSet   dsData = null;

            try
            {
                //Database Connection String
                db = DatabaseFactory.CreateDatabase(AllDA.DATABASE_CONNECTION_STRING);
                //Access Stored Procedure
                dbCmd = db.GetStoredProcCommand(AllDA.INSERT_CONTACT_DETAILS);
                //Pass parameteres in stored procedure
                db.AddInParameter(dbCmd, "@FIRST_NAME", DbType.String, fname);
                db.AddInParameter(dbCmd, "@LAST_NAME", DbType.String, lname);
                db.AddInParameter(dbCmd, "@EMAIL", DbType.String, email);
                db.AddInParameter(dbCmd, "@CONTACT_NUMBER", DbType.String, contactnumber);
                db.AddInParameter(dbCmd, "@INQUIRY", DbType.String, inquiry);
                db.AddInParameter(dbCmd, "@CHECK_EMAIL", DbType.String, chkemail);
                db.AddInParameter(dbCmd, "@CHECK_CONTACT_NUMBER", DbType.String, chkcontactnum);


                //Execute database commands and store results in dataset
                dsData = db.ExecuteDataSet(dbCmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                AllDA.Destroy(ref dbCmd);
            }
            //return dataset
            return(dsData);
        }