Esempio n. 1
0
        //

        public AccessPropertySP GetServiceProviderRegDetails(string userName)
        {
            string        s      = userName;
            string        sql    = "SELECT * FROM Registrations Where userName='******'";
            SqlDataReader reader = this.GetData(sql);

            if (reader.Read())
            {
                AccessPropertySP accessProperty = new AccessPropertySP();
                accessProperty.UserName     = reader["userName"].ToString();
                accessProperty.EmailId      = reader["emailId"].ToString();
                accessProperty.Password     = reader["password"].ToString();
                accessProperty.Category     = reader["category"].ToString();
                accessProperty.Address      = reader["Address"].ToString();
                accessProperty.City         = reader["City"].ToString();
                accessProperty.Division     = reader["Division"].ToString();
                accessProperty.BloodGroup   = reader["bloodGroup"].ToString();
                accessProperty.MobileNumber = reader["mobileNumber"].ToString();
                accessProperty.FullName     = reader["fullName"].ToString();
                accessProperty.NID          = reader["NID"].ToString();
                accessProperty.DOB          = reader["dateofbirth"].ToString();
                accessProperty.Gender       = reader["gender"].ToString();
                accessProperty.Profession   = reader["Profession"].ToString();


                return(accessProperty);
            }
            return(null);
        }
Esempio n. 2
0
        //GetServiceProviderAdditionalDetails

        public AccessPropertySP GetServiceProviderAdditionalDetails(string userName)
        {
            string        s      = userName;
            string        sql    = "SELECT * FROM SPTables Where userName='******'";
            SqlDataReader reader = this.GetData(sql);

            if (reader.Read())
            {
                AccessPropertySP accessProperty = new AccessPropertySP();
                accessProperty.Id            = Convert.ToInt32(reader["Id"].ToString());
                accessProperty.UserName      = reader["userName"].ToString();
                accessProperty.ServiceCharge = Convert.ToDouble(reader["serviceCharge"]);

                try
                {
                    accessProperty.Rating = Convert.ToInt32(reader["Rating"]);
                }
                catch (Exception exp)
                {
                }

                accessProperty.AvailStime = reader["AvailStime"].ToString();

                return(accessProperty);
            }
            return(null);
        }
Esempio n. 3
0
        public List <AccessPropertySP> GetAllMobileServices()
        {
            string                  s1     = "Service Giver";
            string                  s2     = "Mobile Mechanic";
            string                  sql    = "SELECT *FROM Registrations Where category='" + s1 + "' And Profession='" + s2 + "'";
            SqlDataReader           reader = this.GetData(sql);
            List <AccessPropertySP> Ap1    = new List <AccessPropertySP>();

            while (reader.Read())
            {
                AccessPropertySP ap = new AccessPropertySP();
                ap.UserName   = Convert.ToString(reader["userName"]);
                ap.Profession = Convert.ToString(reader["Profession"]);
                ap.City       = Convert.ToString(reader["City"]);
                ap.Address    = Convert.ToString(reader["Address"]);
                Ap1.Add(ap);
            }
            return(Ap1);
        }
Esempio n. 4
0
        //For dashboardForservice provider:

        public int AddServiceProviderDetails(AccessPropertySP accessProperty)
        {
            string sql = "INSERT INTO SPTables(userName,serviceCharge,AvailStime) VALUES('" + accessProperty.UserName + "'," + accessProperty.ServiceCharge + ",'" + accessProperty.AvailStime + "')";

            return(this.ExecuteNonQuery(sql));
        }