Exemple #1
0
    protected void gvRequisitionInquiry_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        // Get the index of the clicked row
        int rowindex = Convert.ToInt32(e.CommandArgument);

        switch (e.CommandName)
        {
        case "SelectRequisition":
            mvSupplyTransactions.SetActiveView(vwRequisitionTransaction);
            //Response.Write(gvRequisitionInquiry.DataKeys[rowindex].Value);
            BindGridRTransaction(Convert.ToDecimal(gvRequisitionInquiry.DataKeys[rowindex].Value));
            chkShowClosedRequisition.Visible = false;
            tblRequisitionTableAdapter SetToActiveAdapter = new tblRequisitionTableAdapter();
            SetToActiveAdapter.spUpdateRequestStatusToActive(Convert.ToDecimal(gvRequisitionInquiry.DataKeys[rowindex].Value));

            break;

        case "SelectItem":
            mvSupplyTransactions.SetActiveView(vwItemTransaction);
            break;
        }
    }