protected void btnUpdate_Click(object sender, EventArgs e) { Inv_ItemTransaction inv_ItemTransaction = new Inv_ItemTransaction(); inv_ItemTransaction = Inv_ItemTransactionManager.GetInv_ItemTransactionByID(Int32.Parse(Request.QueryString["inv_ItemTransactionID"])); Inv_ItemTransaction tempInv_ItemTransaction = new Inv_ItemTransaction(); tempInv_ItemTransaction.Inv_ItemTransactionID = inv_ItemTransaction.Inv_ItemTransactionID; tempInv_ItemTransaction.ItemID = Int32.Parse(ddlItem.SelectedValue); tempInv_ItemTransaction.Quantity = Decimal.Parse(txtQuantity.Text); tempInv_ItemTransaction.ItemTrasactionTypeID = Int32.Parse(ddlItemTrasactionType.SelectedValue); tempInv_ItemTransaction.ReferenceID = Int32.Parse(ddlReference.SelectedValue); tempInv_ItemTransaction.ExtraField1 = txtExtraField1.Text; tempInv_ItemTransaction.ExtraField2 = txtExtraField2.Text; tempInv_ItemTransaction.ExtraField3 = txtExtraField3.Text; tempInv_ItemTransaction.ExtraField4 = txtExtraField4.Text; tempInv_ItemTransaction.ExtraField5 = txtExtraField5.Text; tempInv_ItemTransaction.AddedBy = getLogin().LoginID; tempInv_ItemTransaction.AddedDate = DateTime.Now; tempInv_ItemTransaction.UpdatedBy = getLogin().LoginID; tempInv_ItemTransaction.UpdatedDate = DateTime.Now; tempInv_ItemTransaction.RowStatusID = 1; bool result = Inv_ItemTransactionManager.UpdateInv_ItemTransaction(tempInv_ItemTransaction); Response.Redirect("AdminInv_ItemTransactionDisplay.aspx"); }
private void showInv_ItemTransactionData() { Inv_ItemTransaction inv_ItemTransaction = new Inv_ItemTransaction(); inv_ItemTransaction = Inv_ItemTransactionManager.GetInv_ItemTransactionByID(Int32.Parse(Request.QueryString["inv_ItemTransactionID"])); ddlItem.SelectedValue = inv_ItemTransaction.ItemID.ToString(); txtQuantity.Text = inv_ItemTransaction.Quantity.ToString(); ddlItemTrasactionType.SelectedValue = inv_ItemTransaction.ItemTrasactionTypeID.ToString(); ddlReference.SelectedValue = inv_ItemTransaction.ReferenceID.ToString(); txtExtraField1.Text = inv_ItemTransaction.ExtraField1; txtExtraField2.Text = inv_ItemTransaction.ExtraField2; txtExtraField3.Text = inv_ItemTransaction.ExtraField3; txtExtraField4.Text = inv_ItemTransaction.ExtraField4; txtExtraField5.Text = inv_ItemTransaction.ExtraField5; txtAddedBy.Text = inv_ItemTransaction.AddedBy.ToString(); txtUpdatedBy.Text = inv_ItemTransaction.UpdatedBy.ToString(); txtUpdatedDate.Text = inv_ItemTransaction.UpdatedDate; ddlRowStatus.SelectedValue = inv_ItemTransaction.RowStatusID.ToString(); }