protected void btSaveShippinDetail_Click(object sender, EventArgs e)
    {
        //ShippingType deatils 
        ShippingType.serShippingType inboundshippingdetail = new ShippingType.serShippingType();
        DataSet dataset = inboundshippingdetail.ShippingType_GetAll();

        DataRow dr = dataset.Tables[0].NewRow();

        bool successfull = false;

        if (fromScreenToEntityShippingType(dr))
        {
            dataset.Tables[0].Rows.Add(dr);
            successfull = inboundshippingdetail.UpdateShippingType(dataset);
        }
        if (successfull)
        {
            LabelErr.Text = "Shipping details was added";

        }
        else
        {
            LabelErr.Text = "Transaction rolled back";
        }
    }
    private void populateGridViewShippingDetails()
    {
        int prodId;
     
        // Take productId from screen
        try
        {
            prodId = Convert.ToInt32(lbSessionProdId.Text);
        }
        catch
        {
            prodId = 0;
        }


        ShippingType.serShippingType oneProShippingDetail = new ShippingType.serShippingType();
        DataSet dataset = oneProShippingDetail.ShippingType_GetProductShippingDetail(prodId);


        // Create a DataSet from Database

        if (dataset != null)
        {
            // A user can select a person from the grid
            //GridViewStock.AutoGenerateSelectButton = true;
            // Set the DataSet to cotrols DataSource
            GridViewShippingDetails.DataSource = dataset;
            // Bind values to controls rows and columns
            GridViewShippingDetails.DataBind();
            // Set control visible

            GridViewShippingDetails.Visible = true;
        }
        else
        {
            //lbErrorViewPBI.Text = "Sql sentence was not successful.";
        }
    }
    private void CreateShippinDetailId()
    {
        bool successful = false;

        // Dataset containing



        ShippingType.serShippingType shippingdetail_id = new ShippingType.serShippingType();
        DataSet dataset = shippingdetail_id.ShippingType_CreateShippingtypeId();


        try
        {
            foreach (DataRow dr in dataset.Tables[0].Rows)
            {
                successful = true;
                string s = dr["ShippingId"].ToString();

                tbShippingId.Text = dr["ShippingId"].ToString();
            }
        }
        catch
        {
        }
        if (successful)
        {
            //lbPBIErrorMessage.Text = "Task Id created";
            // New  list must be created
            //loadTask();
            // Initial values to screen
            //setInitialValues();
        }
        else
        {
            LabelErr.Text = "Problem with customer number";
        }
    }
Пример #4
0
    private void populateGridViewShippingDetails()
    {
        int prodId;

        // Take productId from screen
        try
        {
            prodId = Convert.ToInt32(lbSessionProdId.Text);
        }
        catch
        {
            prodId = 0;
        }


        ShippingType.serShippingType oneProShippingDetail = new ShippingType.serShippingType();
        DataSet dataset = oneProShippingDetail.ShippingType_GetProductShippingDetail(prodId);


        // Create a DataSet from Database

        if (dataset != null)
        {
            // A user can select a person from the grid
            //GridViewStock.AutoGenerateSelectButton = true;
            // Set the DataSet to cotrols DataSource
            GridViewShippingDetails.DataSource = dataset;
            // Bind values to controls rows and columns
            GridViewShippingDetails.DataBind();
            // Set control visible

            GridViewShippingDetails.Visible = true;
        }
        else
        {
            //lbErrorViewPBI.Text = "Sql sentence was not successful.";
        }
    }
    private void CreateShippinDetailId()
    {
        bool successful = false;
        // Dataset containing 



        ShippingType.serShippingType shippingdetail_id = new ShippingType.serShippingType();
        DataSet dataset = shippingdetail_id.ShippingType_CreateShippingtypeId();


        try
        {
            foreach (DataRow dr in dataset.Tables[0].Rows)
            {
                successful = true;
                string s = dr["ShippingId"].ToString();

                tbShippingId.Text = dr["ShippingId"].ToString();
            }
        }
        catch
        {
        }
        if (successful)
        {
            //lbPBIErrorMessage.Text = "Task Id created";
            // New  list must be created
            //loadTask();
            // Initial values to screen
            //setInitialValues();
        }
        else
        {
            LabelErr.Text = "Problem with customer number";
        }
    }
    protected void btSaveShippinDetail_Click(object sender, EventArgs e)
    {
        //ShippingType deatils
        ShippingType.serShippingType inboundshippingdetail = new ShippingType.serShippingType();
        DataSet dataset = inboundshippingdetail.ShippingType_GetAll();

        DataRow dr = dataset.Tables[0].NewRow();

        bool successfull = false;

        if (fromScreenToEntityShippingType(dr))
        {
            dataset.Tables[0].Rows.Add(dr);
            successfull = inboundshippingdetail.UpdateShippingType(dataset);
        }
        if (successfull)
        {
            LabelErr.Text = "Shipping details was added";
        }
        else
        {
            LabelErr.Text = "Transaction rolled back";
        }
    }