コード例 #1
0
    protected void btnOk_Click(object sender, EventArgs e)
    {
        var id  = Convert.ToInt32(txtInvReqID.Text);
        var res = ObjInventory.ApproveRejectTyreRequisition(id, 2);

        if (res > 0)
        {
            var strFmsScript = "<script language=JavaScript>alert('" + "Tyre Request Approved" + "')</script>";
            ClientScript.RegisterStartupScript(GetType(), "Success", strFmsScript);
        }
        else
        {
            var strFmsScript = "<script language=JavaScript>alert('" + "Failure " + "')</script>";
            ClientScript.RegisterStartupScript(GetType(), "failure", strFmsScript);
        }

        FillGridTyrePendingForApproval(1, Convert.ToInt32(ddlVehicles.SelectedValue));
        FillGridTyreRequisition(Convert.ToInt32(ddlVehicles.SelectedValue));
        Show("New Tyre Request Approved");
    }