protected void GridView1_RowCancelingEdit1(object sender, GridViewCancelEditEventArgs e) { GridView1.EditIndex = -1; IDT = DsAdapter.select(); GridView1.DataSource = IDT; GridView1.DataBind(); }
protected void Button9_Click(object sender, EventArgs e) { FileUpload1.SaveAs(Server.MapPath("~/img/") + FileUpload1.FileName); FileUpload2.SaveAs(Server.MapPath("~/img/") + FileUpload2.FileName); FileUpload3.SaveAs(Server.MapPath("~/img/") + FileUpload3.FileName); FileUpload4.SaveAs(Server.MapPath("~/img/") + FileUpload3.FileName); int inst = DsAdapter.Insert(txtiname.Text, txtdescrip.Text, Convert.ToDouble(txtprice.Text), "~/img/" + FileUpload1.FileName, Convert.ToInt32(txtquan.Text), DropDownList1.SelectedItem.Text, "~/img/" + FileUpload2.FileName, "~/img/" + FileUpload3.FileName, "~/img/" + FileUpload4.FileName, txtmodel.Text, drpcolor.SelectedItem.Text, drptouch.SelectedItem.Text, drpsim.SelectedItem.Text, txtram.Text, drpmemory.SelectedItem.Text, txtdisplay.Text, txtcamera.Text, txtbattery.Text); IDT = DsAdapter.select(); GridView1.DataSource = IDT; GridView1.DataBind(); txtdescrip.Text = ""; txtiname.Text = ""; txtprice.Text = ""; txtmodel.Text = ""; txtdisplay.Text = ""; txtbattery.Text = ""; txtcamera.Text = ""; txtram.Text = ""; drpsim.SelectedIndex = 0; drptouch.SelectedIndex = 0; drpmemory.SelectedIndex = 0; drpcolor.SelectedIndex = 0; txtquan.Text = ""; drpcolor.SelectedIndex = 0; DropDownList1.SelectedIndex = 0; lblmsg.Text = "Items Added Successfully"; }
protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { if (Session["name"] != null) { string cname = Session["name"].ToString(); IDT = IAdapter.searchhhh(cname + "%"); DataList1.DataSource = IDT; DataList1.DataBind(); lblsearch.Text = "(" + DataList1.Items.Count.ToString() + ")"; Session["name"] = null; } else if (Request.QueryString["id"].ToString() != "") { string cname = Request.QueryString["id"].ToString(); IDT = IAdapter.Select_BY_CNAME(cname); DataList1.DataSource = IDT; DataList1.DataBind(); lblsearch.Text = "(" + DataList1.Items.Count.ToString() + ")"; } else { IDT = IAdapter.SeleectTOP7(); DataList1.DataSource = IDT; DataList1.DataBind(); lblsearch.Text = "(" + DataList1.Items.Count.ToString() + ")"; } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["name"].ToString() == "cate") { string cname = Request.QueryString["name"].ToString(); IDT = IAdapter.Select_BY_CNAME(cname); DataList1.DataSource = IDT; DataList1.DataBind(); lblsearch.Text = "(" + DataList1.Items.Count.ToString() + ")"; } else if (Session["name"].ToString() == "search") { string cname = Request.QueryString["name"].ToString(); IDT = IAdapter.searchhhh(cname + "%"); DataList1.DataSource = IDT; DataList1.DataBind(); lblsearch.Text = "(" + DataList1.Items.Count.ToString() + ")"; } else { IDT = IAdapter.SeleectTOP7(); DataList1.DataSource = IDT; DataList1.DataBind(); lblsearch.Text = "(" + DataList1.Items.Count.ToString() + ")"; } }
protected void Page_Load(object sender, EventArgs e) { lbleror.Text = ""; if (Page.IsPostBack == false) { string idd = Request.QueryString["idd"].ToString(); IDT = IAdapter.ITEM_SELECT_BUYIID(Convert.ToInt32(idd)); lblname.Text = IDT.Rows[0]["iname"].ToString(); lbldetil.Text = IDT.Rows[0]["detail"].ToString(); lblprice.Text = IDT.Rows[0]["price"].ToString(); lblqnt.Text = IDT.Rows[0]["aqnt"].ToString(); Image3.ImageUrl = IDT.Rows[0]["image"].ToString(); Image4.ImageUrl = IDT.Rows[0]["image"].ToString(); Image5.ImageUrl = IDT.Rows[0]["image1"].ToString(); Image6.ImageUrl = IDT.Rows[0]["image2"].ToString(); Image7.ImageUrl = IDT.Rows[0]["image3"].ToString(); lblram.Text = IDT.Rows[0]["ram"].ToString(); lblmemory.Text = IDT.Rows[0]["memory"].ToString(); lbldisplay.Text = IDT.Rows[0]["display"].ToString(); lblcamera.Text = IDT.Rows[0]["camera"].ToString(); lblbattry.Text = IDT.Rows[0]["battery"].ToString(); lblcolor.Text = IDT.Rows[0]["color"].ToString(); lblscreen.Text = IDT.Rows[0]["type"].ToString(); lblmodel.Text = IDT.Rows[0]["model"].ToString(); lblsim.Text = IDT.Rows[0]["sim"].ToString(); // lblqnt0.Text = IDT.Rows[0]["size"].ToString(); } }
protected void Button9_Click(object sender, EventArgs e) { IDT = IAdapter.Select_BY_CNAME(DropDownList1.SelectedItem.Text); GridView1.DataSource = IDT; GridView1.DataBind(); lblmsg.Text = "Total " + GridView1.Rows.Count.ToString() + " Record Found"; }
protected void GridView1_RowEditing1(object sender, GridViewEditEventArgs e) { GridView1.EditIndex = e.NewEditIndex; IDT = DsAdapter.select(); GridView1.DataSource = IDT; GridView1.DataBind(); bindgrid(); }
protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { IDT = IAdapter.SeleectTOP7(); DataList1.DataSource = IDT; DataList1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { IDT = IAdapter.searchhhh(Session["s"].ToString()); DataList1.DataSource = IDT; DataList1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { Page.MaintainScrollPositionOnPostBack = true; if (Page.IsPostBack == false) { IDT = DsAdapter.select(); GridView1.DataSource = IDT; GridView1.DataBind(); } }
protected void Button9_Click(object sender, EventArgs e) { ITEMADAPTER.ITEMMST_ADDITEMQUANTITY(Convert.ToInt32(DropDownList2.SelectedValue), Convert.ToInt32(txtquan.Text)); ITEMDATATABLE = ITEMADAPTER.ITEM_SELECT_BUYIID(Convert.ToInt32(DropDownList2.SelectedValue)); Label1.Text = "Qnt Added."; ITEMDATATABLE = ITEMADAPTER.select(); GridView1.DataSource = ITEMDATATABLE; GridView1.DataBind(); txtquan.Text = ""; }
protected void Page_Load(object sender, EventArgs e) { CDT = CAdapter.select(); GridView1.DataSource = CDT; GridView1.DataBind(); IDT = IAdapter.select(); DataList1.DataSource = IDT; DataList1.DataBind(); }
protected void Button9_Click(object sender, EventArgs e) { FileUpload1.SaveAs(Server.MapPath("~/img/") + FileUpload1.FileName); FileUpload2.SaveAs(Server.MapPath("~/img/") + FileUpload2.FileName); FileUpload3.SaveAs(Server.MapPath("~/img/") + FileUpload3.FileName); int inst = DsAdapter.Insert(txtiname.Text, txtdescrip.Text, Convert.ToDouble(txtprice.Text), "~/img/" + FileUpload1.FileName, Convert.ToInt32(txtquan.Text), DropDownList1.SelectedItem.Text, "~/img/" + FileUpload2.FileName, "~/img/" + FileUpload3.FileName, Convert.ToInt32(DropDownList2.SelectedItem.Text)); IDT = DsAdapter.select(); GridView1.DataSource = IDT; GridView1.DataBind(); lblmsg.Text = "Items are Added"; }
protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { ITEMDATATABLE = ITEMADAPTER.select(); GridView1.DataSource = ITEMDATATABLE; GridView1.DataBind(); ITEMDATATABLE = ITEMADAPTER.select(); DropDownList2.DataSource = ITEMDATATABLE; DropDownList2.DataTextField = "INAME"; DropDownList2.DataValueField = "IID"; DropDownList2.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { Page.MaintainScrollPositionOnPostBack = true; if (Page.IsPostBack == false) { IDT = DsAdapter.select(); GridView1.DataSource = IDT; GridView1.DataBind(); CDT = CAdapter.select(); DropDownList1.DataSource = CDT; DropDownList1.DataTextField = "Cname"; DropDownList1.DataValueField = "CID"; DropDownList1.DataBind(); DropDownList1.Items.Insert(0, "SELECT"); } }
protected void Button3_Click(object sender, EventArgs e) { ODT = OAdapter.Sleect_BY_UNAME_Status(Session["uname"].ToString(), 0); for (int i = 0; i < ODT.Rows.Count; i++) { IDT = IAdapter.Select_BY_INAME(ODT.Rows[i]["iname"].ToString()); if (Convert.ToInt32(IDT.Rows[0]["Aqnt"].ToString()) < Convert.ToInt32(ODT.Rows[i]["Qnt"].ToString())) { lblmsg.Text = ODT.Rows[i]["iname"].ToString() + " Quantity must be less then buy quantity"; } else { Response.Redirect("Checkout.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { CDT = CAdapter.select(); //Menu1.Items.Add(new MenuItem("Home", "home.aspx")); MenuItem catalog = new MenuItem("CATEGORY"); for (int i = 0; i < CDT.Rows.Count; i++) { catalog.ChildItems.Add(new MenuItem(CDT.Rows[i]["Cname"].ToString(), "Search.aspx?" + CDT.Rows[i]["Cname"].ToString())); // catalog.ChildItems.Add(new MenuItem("Series", "series.aspx")); } catalog.PopOutImageUrl = "Popout.gif"; Menu1.Items.AddAt(1, catalog); IDT = IAdapter.SeleectTOP7(); DataList1.DataSource = IDT; DataList1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { string idd = Request.QueryString["idd"].ToString(); IDT = IAdapter.ITEM_SELECT_BUYIID(Convert.ToInt32(idd)); lblname.Text = IDT.Rows[0]["iname"].ToString(); lbldetil.Text = IDT.Rows[0]["detail"].ToString(); lblprice.Text = IDT.Rows[0]["price"].ToString(); lblqnt.Text = IDT.Rows[0]["qnt"].ToString(); Image3.ImageUrl = IDT.Rows[0]["image"].ToString(); Image4.ImageUrl = IDT.Rows[0]["image"].ToString(); Image5.ImageUrl = IDT.Rows[0]["image1"].ToString(); Image6.ImageUrl = IDT.Rows[0]["image2"].ToString(); lblqnt0.Text = IDT.Rows[0]["size"].ToString(); IDT = IAdapter.SeleectTOP7(); DataList1.DataSource = IDT; DataList1.DataBind(); } }
private void bindgrid() { IDT = DsAdapter.select(); GridView1.DataSource = IDT; GridView1.DataBind(); }