Esempio n. 1
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (flag == 1)
     {
         con.ExecuteCommand("insert into executive_bio values('" + Session["Username"].ToString() + "','" + NameBox.Text + "','" + Session["Photo"].ToString() + "','" + QBox.SelectedValue.ToString() + "','" + ExpBox.Text + "' )");
         Response.Redirect("executivebio.aspx");
     }
     if (flag == 0)
     {
         con.ExecuteCommand("update executive_bio set bio='" + NameBox.Text + "', photo='" + Session["Photo"].ToString() + "',qualification='" + QBox.SelectedValue.ToString() + "',exp='" + ExpBox.Text + "' where designerid='" + Session["Username"].ToString() + "' ");
         Response.Redirect("executivebio.aspx");
     }
 }
 protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
 {
     if (e.CommandName.ToString() == "Approve")
     {
         con.ExecuteCommand("update Registration set Status=1 where Email='" + e.CommandArgument.ToString() + "' ");
         Response.Redirect("ViewCustomers.aspx");
     }
     if (e.CommandName.ToString() == "Reject")
     {
         con.ExecuteCommand("update Registration set Status=2 where Email='" + e.CommandArgument.ToString() + "' ");
         Response.Redirect("ViewCustomers.aspx");
     }
 }
Esempio n. 3
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if ((Convert.ToInt32(MaxQtyBox.Text) >= 1) && (Convert.ToInt32(MinQtyBox.Text) >= 1) && (Convert.ToInt32(MaxQtyBox.Text) >= Convert.ToInt32(MinQtyBox.Text)))
     {
         if ((Convert.ToInt32(DiscountBox.Text) < 0) || (Convert.ToInt32(DiscountBox.Text) >= 100))
         {
             Response.Write("<script>alert('The discount percentage should be a valid amount')</script>");
         }
         else
         {
             if ((Convert.ToInt32(PriceBox.Text) < 0))
             {
                 Response.Write("<script>alert('The price should be a valid amount')</script>");
             }
             else
             {
                 if ((Convert.ToInt32(Delivery.Text) < 0))
                 {
                     Response.Write("<script>alert('The delivery period should be a valid number')</script>");
                 }
                 else
                 {
                     con.ExecuteCommand("insert into tbl_productdetails values('" + Session["Username"].ToString() + "','" + ProductBox.Text + "','" + Session["Photo"].ToString() + "','" + DescriptionBox.Text + "','" + CategoryBox.SelectedValue + "','" + SizeBox.SelectedValue + "','" + MaxQtyBox.Text + "','" + MinQtyBox.Text + "','" + PriceBox.Text + "','" + DiscountBox.Text + "','" + System.DateTime.Today.Date + "','" + Delivery.Text + "')");
                     Response.Redirect("ProductDetails.aspx");
                 }
             }
         }
     }
     else
     {
         Response.Write("<script>alert('Max. quantity shouldnot be less than minimum quantity')</script>");
     }
 }
Esempio n. 4
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if ((Convert.ToInt32(MaxQtyBox.Text) >= 1) && (Convert.ToInt32(MinQtyBox.Text) >= 1) && (Convert.ToInt32(MaxQtyBox.Text) >= Convert.ToInt32(MinQtyBox.Text)))
     {
         if ((Convert.ToInt32(DiscountBox.Text) < 0) || (Convert.ToInt32(DiscountBox.Text) >= 100))
         {
             Response.Write("<script>alert('The discount percentage should be a valid amount')</script>");
         }
         else
         {
             if ((Convert.ToInt32(PriceBox.Text) < 0))
             {
                 Response.Write("<script>alert('The price should be a valid amount')</script>");
             }
             else
             {
                 con.ExecuteCommand("update tbl_productdetails set productname='" + ProductBox.Text + "', description='" + DescriptionBox.Text + "',category='" + CategoryBox.SelectedValue + "',size='" + SizeBox.SelectedValue + "',maxqty='" + MaxQtyBox.Text + "',minqty='" + MinQtyBox.Text + "',price='" + PriceBox.Text + "',discount='" + DiscountBox.Text + "' where emailid='" + Session["Username"].ToString() + "'");
                 Response.Redirect("ViewOwnProducts.aspx");
             }
         }
     }
     else
     {
         Response.Write("<script>alert('Max. quantity shouldnot be less than minimum quantity')</script>");
     }
 }
Esempio n. 5
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string status = "Ordered";

        con.ExecuteCommand("insert into order_table(product_code,customer_id,quantity,discount,unit_price,total_price,house_name,place,landmark,district,state,pincode,phone,status,book_date,delivery_date) values('" + Session["ProductID"].ToString() + "', '" + Session["Username"].ToString() + "','" + Convert.ToInt32(QtyBox.Text) + "','" + Convert.ToInt32(DiscountBox.Text) + "','" + Convert.ToInt32(UpriceBox.Text) + "','" + Convert.ToInt32(TotalBox.Text) + "','" + Hname.Text + "','" + Place.SelectedValue.ToString() + "','" + Landmark.Text + "','" + Dist.SelectedValue.ToString() + "','" + State.SelectedValue.ToString() + "','" + Pincode.Text + "','" + Phone.Text + "','" + status + "','" + System.DateTime.Today.Date.ToShortDateString() + "','" + Ddate.Text + "')");
        Session["amount"] = TotalBox.Text;
        Response.Redirect("~/Payment/First.aspx");
    }
Esempio n. 6
0
 protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
 {
     if (e.CommandName.ToString() == "Remove")
     {
         con.ExecuteCommand("delete from Gallery where Id='" + Convert.ToInt32(e.CommandArgument.ToString()) + "'");
         Response.Redirect("ViewMyWorks.aspx");
     }
 }
 protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
 {
     if (e.CommandName.ToString() == "Edit")
     {
         Session["Pid"] = e.CommandArgument.ToString();
         Response.Redirect("EditProduct.aspx");
     }
     if (e.CommandName.ToString() == "Delete")
     {
         con.ExecuteCommand("delete from tbl_productdetails where productid='" + e.CommandArgument.ToString() + "' ");
         Response.Redirect("ViewOwnProducts.aspx");
     }
 }
Esempio n. 8
0
    protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
    {
        if (e.CommandName.ToString() == "Deliver")
        {
            con.ExecuteCommand("update order_table set status='Delivered', delivery_date='" + System.DateTime.Today.ToShortDateString() + "' where order_id='" + e.CommandArgument.ToString() + "' ");
            Response.Redirect("ViewOrders.aspx");
        }

        if (e.CommandName.ToString() == "Customer")
        {
            Session["CID"] = e.CommandArgument.ToString();
            Response.Redirect("ViewCustomer.aspx");
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        con.reader("select * from Registration where Email='" + TextBox2.Text + "' ");
        if (con.dr.Read())
        {
            Response.Write("<script>alert('The Email ID is already registered')</script>");
            con.dr.Close();
        }
        else
        {
            con.dr.Close();
            string Usertype = "Customer";
            con.ExecuteCommand("insert into Registration values('" + TextBox2.Text + "','" + TextBox1.Text + "','" + RadioButtonList1.SelectedValue + "','" + TextBox3.Text + "','" + DropDownList5.SelectedValue + "','" + TextBox4.Text + "','" + DropDownList2.SelectedValue + "','" + DropDownList1.SelectedValue + "','" + DropDownList3.SelectedValue + "','" + TextBox6.Text + "','" + TextBox7.Text + "','" + Usertype + "','" + TextBox8.Text + "','" + DropDownList4.Text + "','" + TextBox11.Text + "','" + 0 + "')");

            Response.Redirect("Login.aspx");
            Response.Write("<script>alert('Successfully registered to T-Trends.You can login after admin approval')</script>");
        }
    }
Esempio n. 10
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     con.ExecuteCommand("update order_table set status='Cancelled', cancel_date='" + System.DateTime.Today.ToShortDateString() + "',cancel_reason='" + NameBox.Text + "' where order_id='" + EmailBox.Text + "' ");
     Response.Redirect("MyOrders.aspx");
 }
Esempio n. 11
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     con.ExecuteCommand("insert into Chat values('" + Session["Username"].ToString() + "','" + DropDownList1.SelectedValue.ToString() + "','" + NameBox.Text + "','" + System.DateTime.Today.ToShortDateString() + "' ,'" + System.DateTime.Now.ToShortTimeString() + "','Executive' )");
     Response.Redirect("Chat.aspx");
 }
Esempio n. 12
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     con.ExecuteCommand("update Registration set Name='" + NameBox.Text + "', Gender='" + RadioButtonList1.SelectedValue.ToString() + "',Housename='" + HouseBox.Text + "',Place='" + PlaceBox.SelectedValue.ToString() + "', Landmark='" + LandMarkBox.Text + "', District='" + DistrictBox.SelectedValue.ToString() + "',State='" + StateBox.SelectedValue.ToString() + "', Nationality='" + NationalityBox.SelectedValue.ToString() + "', Pincode='" + PincodeBox.Text + "',Phone='" + PhoneBox.Text + "' where Email='" + Session["Username"].ToString() + "' ");
     Response.Redirect("Profile.aspx");
     // Response.Write("<script>alert('"+Session["Username"].ToString()+"')</script>");
 }
Esempio n. 13
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     con.ExecuteCommand("insert into Gallery values('" + Session["Username"].ToString() + "','" + Session["Photo"].ToString() + "','" + NameBox.Text + "')");
     Response.Write("<script>alert('Design inserted successfully')</script>");
 }