protected void btUpload1_Click(object sender, EventArgs e)
    {
        ProductImageService.serProdctImage productimages = new ProductImageService.serProdctImage();
        DataSet dataset2 = productimages.ProductImage_GetAll();


        DataRow dr2 = dataset2.Tables[0].NewRow();

        bool successfull2 = false;

        if (fromScreenToEntityProductImageTest1(dr2))
        {
            dataset2.Tables[0].Rows.Add(dr2);
            successfull2 = productimages.UpdateProdctImage(dataset2);
        }
        if (successfull2)
        {
            LabelErr.Text = "ProductImageService details was added";
            Session["productid"] = lbSessionProdId.Text;
            //Response.Redirect("ShippingDetails.aspx");

        }
        else
        {
            LabelErr.Text = "Transaction rolled back";
        }
    }
    protected void btUpload1_Click(object sender, EventArgs e)
    {
        ProductImageService.serProdctImage productimages = new ProductImageService.serProdctImage();
        DataSet dataset2 = productimages.ProductImage_GetAll();


        DataRow dr2 = dataset2.Tables[0].NewRow();

        bool successfull2 = false;

        if (fromScreenToEntityProductImageTest1(dr2))
        {
            dataset2.Tables[0].Rows.Add(dr2);
            successfull2 = productimages.UpdateProdctImage(dataset2);
        }
        if (successfull2)
        {
            LabelErr.Text        = "ProductImageService details was added";
            Session["productid"] = lbSessionProdId.Text;
            //Response.Redirect("ShippingDetails.aspx");
        }
        else
        {
            LabelErr.Text = "Transaction rolled back";
        }
    }
    protected void btUpload2_Click(object sender, EventArgs e)
    {

        bool successful = false;
        // Dataset containing accounts
        ProductImageService.serProdctImage productimages = new ProductImageService.serProdctImage();
        DataSet dataset = productimages.ProductImage_GetAll();
        // Find the account to update
        try
        {
            foreach (DataRow dr in dataset.Tables[0].Rows)
            {
                if (dr["productimageId"].ToString() == tbProductImageId.Text.Trim())
                {
                    // Account found. Move values from screen to row
                    fromScreenToEntityProductImageTest2(dr);
                    successful = true;
                }
            }
            if (successful)
                // Update the database
                successful = productimages.UpdateProdctImage(dataset); 
        }
        catch
        {


        }

        if (successful)
        {
            LabelErr.Text = "ProductImageService details was added";
            Session["productid"] = lbSessionProdId.Text;
        }
        else
        {
            LabelErr.Text = "Transaction rolled back";
        }

    }
    protected void btUpload2_Click(object sender, EventArgs e)
    {
        bool successful = false;

        // Dataset containing accounts
        ProductImageService.serProdctImage productimages = new ProductImageService.serProdctImage();
        DataSet dataset = productimages.ProductImage_GetAll();

        // Find the account to update
        try
        {
            foreach (DataRow dr in dataset.Tables[0].Rows)
            {
                if (dr["productimageId"].ToString() == tbProductImageId.Text.Trim())
                {
                    // Account found. Move values from screen to row
                    fromScreenToEntityProductImageTest2(dr);
                    successful = true;
                }
            }
            if (successful)
            {
                // Update the database
                successful = productimages.UpdateProdctImage(dataset);
            }
        }
        catch
        {
        }

        if (successful)
        {
            LabelErr.Text        = "ProductImageService details was added";
            Session["productid"] = lbSessionProdId.Text;
        }
        else
        {
            LabelErr.Text = "Transaction rolled back";
        }
    }