Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            loginwebservice.login1 s1 = new loginwebservice.login1();
            string[] b = new string[10];
            string main_name = Session["main_name"].ToString();
            b = s1.user_retrieve(main_name);

            name.Text = b[0];
            contact.Text = b[2];
            email.Text = b[1];
            zipcode.Text = b[3];

            /*
            SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["dbString"].ConnectionString);
            //Open the connection
            conn.Open();
            string[] b = new string[10];
            string main_name = Session["main_name"].ToString();
            SqlCommand cmd = new SqlCommand("select * from registration where name='" + main_name + "' ", conn);
            SqlDataReader r = cmd.ExecuteReader();

            while (r.Read())
            {
            name.Text = r["name"].ToString();
            contact.Text = r["contactno"].ToString();
            zipcode.Text = r["zipcode"].ToString();
            email.Text = r["email"].ToString();

            }
            cmd.Dispose();
            conn.Close();
             * */
        }
Ejemplo n.º 2
0
        protected void register_Click(object sender, EventArgs e)
        {
            loginwebservice.login1 s1 = new loginwebservice.login1();
            string emailid = email.Text;
            string cat1 = cat.SelectedValue;

            int a = s1.vendor_reg(name.Text, email.Text, password.Text, contactno.Text, zipcode.Text, street.Text, city.Text, officetiming.Text, cat1);

            if (a == 1)
            {
                Label1.Visible = true;
                Label1.Text = "Registration successful";
                //Response.Redirect("login.aspx");
            }
            else if (a == -1)
            {
                Label1.Visible = true;
                Label1.Text = "Email already exists";
            }
            else
            {
                Label1.Visible = true;
                Label1.Text = "Registration failure";
            }
            /*
            string name1 = name.Text;
            string email1 = email.Text;
            string password1 = password.Text;
            string contactno1 = contactno.Text;
            string zipcode1 = zipcode.Text;
            string city1 = city.Text;
            string street1 = street.Text;
            string time1 = officetiming.Text;

            SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["dbString"].ConnectionString);
            //Open the connection
            conn.Open();

            SqlCommand cmd = new SqlCommand("insert into vendor (vname,vemail,vpassword,vcontactno,vzipcode,vcity,vstreet,vtime) values('" + name1 + "','" + email1 + "','" + password1 + "','" + contactno1 + "','" + zipcode1 + "','" + city1 + "','" + street1 + "','" + time1 + "')", conn);
            int result = cmd.ExecuteNonQuery();
            Label1.Visible = true;
            if (result != 0)
            {
                Label1.Text = "Registration successful";
                // Response.Redirect("login.aspx");
            }
            else
            {
                Label1.Text = "Registration Failed";
            }
            conn.Close();
             * */
        }
Ejemplo n.º 3
0
        protected void register_Click(object sender, EventArgs e)
        {
            loginwebservice.login1 s1 = new loginwebservice.login1();
            int a = s1.user_reg(name.Text, email.Text, password.Text, contactno.Text, zipcode.Text);

            if (a == 1)
            {
                Label1.Visible = true;
                Label1.Text = "Registration successful";
                //Response.Redirect("login.aspx");
            }
            else if (a == -1)
            {
                Label1.Text = "Email already exists";
            }
            else
            {
                Label1.Text = "Registration failed";
            }
            /*
            string name1 = name.Text;
            string email1 = email.Text;
            string password1 = password.Text;
            string contactno1 = contactno.Text;
            string zipcode1 = zipcode.Text;

            SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["dbString"].ConnectionString);
            //Open the connection
            conn.Open();

            SqlCommand cmd = new SqlCommand("insert into registration (name,email,password,contactno,zipcode) values('" + name1 + "','" + email1 + "','" + password1 + "','" + contactno1 + "','" + zipcode1 + "')", conn);
            int result = cmd.ExecuteNonQuery();
            Label1.Visible = true;
            if (result != 0)
            {
                Label1.Text = "Registration successful";
               // Response.Redirect("login.aspx");
            }
            else
            {
                Label1.Text = "Registration Failed";
            }
            cmd.Dispose();
            conn.Close();
             * */
        }
Ejemplo n.º 4
0
        protected void user_click(object sender, EventArgs e)
        {
            loginwebservice.login1 s1 = new loginwebservice.login1();
               int a = s1.user_login_check(name.Text, password.Text, 0);
               string name1 = name.Text;
               if (a == 1)
               {
               Label3.Visible = true;

              Session["main_name"] = name1;
              Label3.Text = "Login successful";
               Response.Redirect("userProfile.aspx");

               }
             else
               {
              Label3.Visible = true;
              Label3.Text = "Login Failed";
            }
            /*
            string name1 = name.Text;

            string password1 = password.Text;

            SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["dbString"].ConnectionString);
            //Open the connection
            conn.Open();
            SqlCommand cmd = new SqlCommand("select name,password from registration where name='" + name1 + "' and password='******'" , conn);
            string CurrentName;
            CurrentName = (string)cmd.ExecuteScalar();

             Label3.Visible = true;
             if (CurrentName != null)

            {
                Label3.Text = "Login successful";
                Session["main_name"] = name1;
                Response.Redirect("userProfile.aspx");
            }
            else
            {
                Label3.Text = "Login Failed! Please check the login name/password !";
            }
            cmd.Dispose();
            conn.Close(); */
        }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            loginwebservice.login1 s1 = new loginwebservice.login1();
            string[] b = new string[10];
            //string emailid = Session["main_res"].ToString();
            string main_vname = Session["main_vname"].ToString();
            b = s1.vendor_retrieve(main_vname);

            name.Text = b[0];
            email.Text = b[1];
            contact.Text = b[2];
            zipcode.Text = b[3];
            street.Text = b[4];
            city.Text = b[5];
            time.Text = b[6];
            service.Text = b[7];

            /*
               SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["dbString"].ConnectionString);
            //Open the connection
            conn.Open();
            string[] b = new string[10];
            string main_vname = Session["main_vname"].ToString();
            SqlCommand cmd = new SqlCommand("select * from vendor where vname='" + main_vname + "' ", conn);
            SqlDataReader r = cmd.ExecuteReader();

            while (r.Read())
            {
            name.Text = r["vname"].ToString();
            contact.Text = r["vcontactno"].ToString();
            zipcode.Text = r["vzipcode"].ToString();
            email.Text = r["vemail"].ToString();
            city.Text = r["vcity"].ToString();
            street.Text = r["vstreet"].ToString();
            time.Text = r["vtime"].ToString();

            }
            cmd.Dispose();
            conn.Close();*/
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string v1 = "";
            v1 = Request.QueryString["vendor_name"];

            string[] f = new string[10];

            //Declare Connection by passing the connection string from the web config file
            SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["dbString"].ConnectionString);
            //Open the connection
            conn.Open();
            //Declare the sql command

            SqlCommand cmd1 = new SqlCommand("select * from photo where vname='" + v1 + "'", conn);
            SqlDataReader reader = cmd1.ExecuteReader();

            while (reader.Read())
            {
                style.Text = reader["style"].ToString();
                package.Text = reader["package"].ToString();
                employee.Text = reader["employee"].ToString();
                album.Text = reader["album"].ToString();
                media.Text = reader["media"].ToString();
                insurance.Text = reader["insurance"].ToString();
                fee.Text = reader["fee"].ToString();

            }

            cmd1.Dispose();
            conn.Close();

            try
            {

                loginwebservice.login1 l1 = new loginwebservice.login1();
                string[] a = l1.vendor_retrieve(v1);

                name.Text = a[0];
                contact.Text = a[3];
                street.Text = a[4];
                city.Text = a[5];
                zipcode.Text = a[1];
                service1.Text = a[7];
                timings.Text = a[6];
                gimg.Text = "<a class='details' data-fancybox-type='iframe' href='http://maps.google.com/?output=embed&amp;f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=" + street.Text + "," + city.Text + "," + zipcode.Text + "'><img src='images/google-map.png'></a>";

                loginwebservice.login1 l2 = new loginwebservice.login1();

                ArrayList b = new ArrayList(l2.vendor_try(v1));
                ArrayList c = new ArrayList();
                c = (ArrayList)b;

                string[,] data = new string[100, 4];

                int iterator = 0;

                foreach (string d in c)
                {

                    string[] row = d.Split('^');

                    data[iterator, 0] = row[0];

                    data[iterator, 1] = row[1];

                    data[iterator, 2] = row[2];

                    data[iterator, 3] = row[3];

                    iterator++;

                }

                DataTable newsDataTable = new DataTable();

                // add some columns to our datatable

                newsDataTable.Columns.Add("vname");

                newsDataTable.Columns.Add("vzipcode");

                newsDataTable.Columns.Add("vemail");
                newsDataTable.Columns.Add("vcontactno");

                // adding new rows

                for (int i = 0; i < iterator; i++)
                {

                    DataRow newsDataRow = newsDataTable.NewRow();

                    newsDataRow["vname"] = data[i, 0];

                    newsDataRow["vzipcode"] = data[i, 1];

                    newsDataRow["vemail"] = data[i, 2];

                    newsDataRow["vcontactno"] = data[i, 3];

                    newsDataTable.Rows.Add(newsDataRow);

                }

                //Label1.Text = "<a title='Send Mail to Restaurant' href='mailto:" + param1 + "'><img src ='images/email-to.png'></a>";

                // bind our datatable to our repeater

                category.DataSource = newsDataTable;

                category.DataBind();

            }
            catch (Exception e1)
            {
                //error.Visible = true;
                //error.Text = "error";
                //int abc = 1;
            }
        }
Ejemplo n.º 7
0
        protected void vendor_click(object sender, EventArgs e)
        {
            string name2 = name.Text;

            string password2 = password.Text;

               /* SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["dbString"].ConnectionString);
            //Open the connection
            conn.Open();
            SqlCommand cmd = new SqlCommand("select vname,vpassword from vendor where vname='" + name2 + "' and vpassword='******'" , conn);
              string CurrentName;
            CurrentName = (string)cmd.ExecuteScalar();

             Label3.Visible = true;
             if (CurrentName != null)

            {
                Label3.Text = "Login successful";
                Session["main_vname"] = name2;
                Response.Redirect("vendorProfile.aspx");
            }
            else
            {
                Label3.Text = "Login Failed! Please check the login name/password !";
            }
            cmd.Dispose();
            conn.Close(); */

            loginwebservice.login1 s1 = new loginwebservice.login1();
            int a = s1.user_login_check(name.Text, password.Text, 1);
            string[] b = new string[10];
            if (a == 1)
            {
                Label3.Visible = true;
                Session["main_vname"] = name2;
                Label3.Text = "Login successful";
                SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["dbString"].ConnectionString);
                //Open the connection
                conn.Open();
                //Declare the sql command

                SqlCommand cmd1 = new SqlCommand("select * from vendor where vname ='" + name2 + "' ", conn);
                SqlDataReader reader = cmd1.ExecuteReader();
                while (reader.Read())
                {
                    b[0] = reader["vname"].ToString();
                    b[2] = reader["vemail"].ToString();
                    b[3] = reader["vcontactno"].ToString();
                    b[1] = reader["vzipcode"].ToString();
                    b[4] = reader["vstreet"].ToString();
                    b[5] = reader["vcity"].ToString();
                    b[6] = reader["vtime"].ToString();
                    b[7] = reader["vservice"].ToString();

                }

                cmd1.Dispose();
                conn.Close();
                if (b[7] == "Catering" || b[7] == "Theme")
                {
                    Response.Redirect("vendorProfile.aspx");
                }
                else if (b[7] == "Venue")
                {
                    Response.Redirect("vp1.aspx");
                }
                else if (b[7] == "Photography")
                {
                    Response.Redirect("vp2.aspx");
                }
            }
            else
            {
                Label3.Visible = true;
                Label3.Text = "Login Failed";
            }
        }
Ejemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string v1 = "";
            v1 = Request.QueryString["vendor_name"];
            //Session["vn"] = Request.QueryString["vendor_name"];

            try
            {

            loginwebservice.login1 l1 = new loginwebservice.login1();
            string[] a = l1.vendor_retrieve(v1);

            name.Text = a[0];
            contact.Text = a[3];
            street.Text = a[4];
            city.Text = a[5];
            zipcode.Text = a[1];
            service1.Text = a[7];
            timings.Text = a[6];
            gimg.Text = "<a class='details' data-fancybox-type='iframe' href='http://maps.google.com/?output=embed&amp;f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=" + street.Text + "," + city.Text + "," + zipcode.Text + "'><img src='images/google-map.png'></a>";

            loginwebservice.login1 l2 = new loginwebservice.login1();

            ArrayList b = new ArrayList(l2.vendor_try(v1));
            ArrayList c = new ArrayList();
            c = (ArrayList)b;

            string[,] data = new string[100, 4];

            int iterator = 0;

            foreach (string d in c)
            {

                string[] row = d.Split('^');

                data[iterator, 0] = row[0];

                data[iterator, 1] = row[1];

                data[iterator, 2] = row[2];

                data[iterator, 3] = row[3];

                iterator++;

            }

            DataTable newsDataTable = new DataTable();

            // add some columns to our datatable

            newsDataTable.Columns.Add("vname");

            newsDataTable.Columns.Add("vzipcode");

            newsDataTable.Columns.Add("vemail");
            newsDataTable.Columns.Add("vcontactno");

            // adding new rows

            for (int i = 0; i < iterator; i++)
            {

                DataRow newsDataRow = newsDataTable.NewRow();

                newsDataRow["vname"] = data[i, 0];

                newsDataRow["vzipcode"] = data[i, 1];

                newsDataRow["vemail"] = data[i, 2];

                newsDataRow["vcontactno"] = data[i, 3];

                newsDataTable.Rows.Add(newsDataRow);

            }

            //Label1.Text = "<a title='Send Mail to Restaurant' href='mailto:" + param1 + "'><img src ='images/email-to.png'></a>";

            // bind our datatable to our repeater

            category.DataSource = newsDataTable;

            category.DataBind();

            }
            catch (Exception e1)
            {
            //error.Visible = true;
            //error.Text = "error";
            //int abc = 1;
            }
        }