こんにちは私はifelseステートメントを実行しようとしています:
@{
if(isset(Request["approve"])) {
var sql6 = "UPDATE Medical SET NurseDecision = 1, NurseCDSID = @0, NurseDate = GetDate() WHERE MedId = @1 AND AppId = @2 AND CDSID = @3";
var appMedical = new[]{myCDSID, medicalData.MedId, permitAppAppId, employeeCDSID};
db.Execute(sql6,appMedical);
var sql7 = "UPDATE PermitApp SET NurseDecision = 1, NurseCDSID = @0, NurseDate = GetDate() WHERE MedId = @1 AND AppId = @2 AND CDSID = @3";
var appPermitApp =new[]{myCDSID, reqPermit.MedId, permitAppAppId, employeeCDSID};
db.Execute(sql7,appPermitApp);
} elseif(isset(Request["reject"])){
var sql8 = "UPDATE Medical SET NurseDecision = -1, NurseCDSID = @0, NurseDate = GetDate() WHERE MedId = @1 AND AppId = @2 AND CDSID = @3";
var appMedical1 = new[]{myCDSID, medicalData.MedId, permitAppAppId, employeeCDSID};
db.Execute(sql8,appMedical1);
var sql9 = "UPDATE PermitApp SET NurseDecision = -1, NurseCDSID = @0, NurseDate = GetDate() WHERE MedId = @1 AND AppId = @2 AND CDSID = @3";
var appPermitApp1 =new[]{myCDSID, reqPermit.MedId, permitAppAppId, employeeCDSID};
db.Execute(sql9,appPermitApp1);
}
}
次のような1つのフォームの2つの送信ボタンの場合:
<form>
<input class="button" type="submit" style="margin:10px auto;" name="reject" value="Reject" />
<input class="button" type="submit" style="margin:10px auto; margin-left:400px;" name="approve" value="Approve" />
</form>
ただし、これはエラーです。
CS1026: ; expected on this line>> } elseif(isset(Request["reject"])){
誰かが私の間違いを私に指摘できますか?ありがとう