protected void btnUpdate_Click(object sender, EventArgs e)
    {
        Inv_Production inv_Production = new Inv_Production();

        inv_Production = Inv_ProductionManager.GetInv_ProductionByID(Int32.Parse(Request.QueryString["inv_ProductionID"]));
        Inv_Production tempInv_Production = new Inv_Production();

        tempInv_Production.Inv_ProductionID = inv_Production.Inv_ProductionID;

        tempInv_Production.ProductionDate = txtProductionDate.Text;
        tempInv_Production.IssueIDs       = Int32.Parse(ddlIssue.SelectedValue);
        tempInv_Production.WorkSatationID = Int32.Parse(ddlWorkSatation.SelectedValue);
        tempInv_Production.ExtraField1    = txtExtraField1.Text;
        tempInv_Production.ExtraField2    = txtExtraField2.Text;
        tempInv_Production.ExtraField3    = txtExtraField3.Text;
        tempInv_Production.ExtraField4    = txtExtraField4.Text;
        tempInv_Production.ExtraField5    = txtExtraField5.Text;
        tempInv_Production.AddedBy        = Int32.Parse(txtAddedBy.Text);
        tempInv_Production.AddedDate      = DateTime.Now;
        tempInv_Production.UpdatedBy      = Int32.Parse(txtUpdatedBy.Text);
        tempInv_Production.UpdatedDate    = txtUpdatedDate.Text;
        tempInv_Production.RowStatusID    = Int32.Parse(ddlRowStatus.SelectedValue);
        bool result = Inv_ProductionManager.UpdateInv_Production(tempInv_Production);

        Response.Redirect("AdminInv_ProductionDisplay.aspx");
    }
Exemplo n.º 2
0
    protected void lbDelete_Click(object sender, EventArgs e)
    {
        LinkButton linkButton = new LinkButton();

        linkButton = (LinkButton)sender;
        bool result = Inv_ProductionManager.DeleteInv_Production(Convert.ToInt32(linkButton.CommandArgument));

        showInv_ProductionGrid();
    }
    private void showInv_ProductionData()
    {
        Inv_Production inv_Production = new Inv_Production();

        inv_Production = Inv_ProductionManager.GetInv_ProductionByID(Int32.Parse(Request.QueryString["inv_ProductionID"]));

        txtProductionDate.Text        = inv_Production.ProductionDate;
        ddlIssue.SelectedValue        = inv_Production.IssueIDs.ToString();
        ddlWorkSatation.SelectedValue = inv_Production.WorkSatationID.ToString();
        txtExtraField1.Text           = inv_Production.ExtraField1;
        txtExtraField2.Text           = inv_Production.ExtraField2;
        txtExtraField3.Text           = inv_Production.ExtraField3;
        txtExtraField4.Text           = inv_Production.ExtraField4;
        txtExtraField5.Text           = inv_Production.ExtraField5;
        txtAddedBy.Text            = inv_Production.AddedBy.ToString();
        txtUpdatedBy.Text          = inv_Production.UpdatedBy.ToString();
        txtUpdatedDate.Text        = inv_Production.UpdatedDate;
        ddlRowStatus.SelectedValue = inv_Production.RowStatusID.ToString();
    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        Inv_Production inv_Production = new Inv_Production();

        inv_Production.ProductionDate = txtProductionDate.Text;
        inv_Production.IssueIDs       = Int32.Parse(ddlIssue.SelectedValue);
        inv_Production.WorkSatationID = Int32.Parse(ddlWorkSatation.SelectedValue);
        inv_Production.ExtraField1    = txtExtraField1.Text;
        inv_Production.ExtraField2    = txtExtraField2.Text;
        inv_Production.ExtraField3    = txtExtraField3.Text;
        inv_Production.ExtraField4    = txtExtraField4.Text;
        inv_Production.ExtraField5    = txtExtraField5.Text;
        inv_Production.AddedBy        = Int32.Parse(txtAddedBy.Text);
        inv_Production.AddedDate      = DateTime.Now;
        inv_Production.UpdatedBy      = Int32.Parse(txtUpdatedBy.Text);
        inv_Production.UpdatedDate    = txtUpdatedDate.Text;
        inv_Production.RowStatusID    = Int32.Parse(ddlRowStatus.SelectedValue);
        int resutl = Inv_ProductionManager.InsertInv_Production(inv_Production);

        Response.Redirect("AdminInv_ProductionDisplay.aspx");
    }
Exemplo n.º 5
0
 private void showInv_ProductionGrid()
 {
     gvInv_Production.DataSource = Inv_ProductionManager.GetAllInv_Productions();
     gvInv_Production.DataBind();
 }