protected void btnSave_Click(object sender, EventArgs e)
    {
        Pro.CatNo           = DropDownList1.SelectedValue;
        Pro.ProdNo          = txtProdNo.Text;
        Pro.ProdName        = txtProdName.Text;
        Pro.ProdPrice       = Convert.ToDecimal(txtPrice.Text);
        Pro.ProdQuantity    = Convert.ToInt32(txtQty.Text);
        Pro.ProdDescription = txtDesc.Text;

        if (txtProdNo.ReadOnly)
        {
            if (Pro.UpDate())
            {
                lblaMsg.Text = "Product Updated Successfully";
                MultiView1.ActiveViewIndex = 0;
            }

            else
            {
                lblMasg2.Text = "Product Not Updated";
            }
        }

        else
        if (Pro.Add())
        {
            lblaMsg.Text = "Product Added Successfully";
            MultiView1.ActiveViewIndex = 0;
        }
        else
        {
            lblMasg2.Text = "Product Not Added ";
        }

        if (Filup.HasFile)
        {
            Filup.SaveAs(Server.MapPath(("../ProImage") + "//" + txtProdNo.Text + ".jpg"));
        }
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        Cat.CatNo          = txtNum.Text;
        Cat.CatName        = txtName.Text;
        Cat.CatDescription = txtDesc.Text;

        if (txtNum.ReadOnly)
        {
            if (Cat.UpDate())
            {
                lblaMsg.Text = "Category Updated Successfully";
                MultiView1.ActiveViewIndex = 0;
            }

            else
            {
                lblaMsg.Text = "Category Not Updated";
            }
        }

        else
        if (Cat.Add())
        {
            lblaMsg.Text = "Category Added Successfully";
            MultiView1.ActiveViewIndex = 0;
        }
        else
        {
            lblaMsg.Text = "Category Not Added , Please Change Category Number";
        }

        if (Filup.HasFile)
        {
            Filup.SaveAs(Server.MapPath(("..\\ImgImgs") + "\\" + txtNum.Text + ".jpg"));
        }
    }