Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            /*
             * if (!IsPostBack)
             * {
             *  DisplayData()
             * }
             */

            ProdBLL   p  = new ProdBLL();
            DataTable dt = p.AllProdBLL();

            if (dt.Rows.Count > 0)
            {
                //products.Items.Clear();
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    products.Items.Add(dt.Rows[i]["prd_title"].ToString());
                }
            }
            else
            {
                Response.Write("<script>alert('Record Not Found..!')</script>");
            }


            SellBLL   s   = new SellBLL();
            DataTable dtt = s.getSellBLL();

            GridView1.DataSource = dtt;
            GridView1.DataBind();
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ProdBLL   p  = new ProdBLL();
            DataTable dt = p.AllProdBLL();

            if (dt.Rows.Count > 0)
            {
                //products.Items.Clear();
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    products.Items.Add(dt.Rows[i]["prd_title"].ToString());
                }
            }
            else
            {
                Response.Write("<script>alert('Products Not Found..!')</script>");
            }

            SupBLL    s   = new SupBLL();
            DataTable dtb = s.AllSupBLL();

            if (dtb.Rows.Count > 0)
            {
                //supply.Items.Clear();
                for (int i = 0; i < dtb.Rows.Count; i++)
                {
                    supply.Items.Add(dtb.Rows[i]["name"].ToString());
                }
            }
            else
            {
                Response.Write("<script>alert('Supplyers Not Found..!')</script>");
            }


            PurBLL    pp  = new PurBLL();
            DataTable dtt = pp.getPurBLL();

            GridView1.DataSource = dtt;
            GridView1.DataBind();
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ProdBLL s = new ProdBLL();

            Repeater1.DataSource = s.AllProdBLL();
            Repeater1.DataBind();


            if (Request.Params.AllKeys.Contains("dltprd"))
            {
                ProdProps u = new ProdProps();
                u.Prd_id = Request.QueryString["dltprd"];
                ProdBLL ub = new ProdBLL();
                if (ub.deleteProdBLL(u))
                {
                    Response.Redirect("viewproducts.aspx?success=Deleted Successfully");
                }
                else
                {
                    Response.Redirect("viewproducts.aspx?error=Something Went Wrong....!");
                }
            }
        }