private void comboBox4_SelectedIndexChanged(object sender, EventArgs e) { enablePaperButtons(); AuthorizationOperations obj1 = new AuthorizationOperations(); button6.Enabled = true && obj1.isUserAccessible(OperationNames.TypeOfOperations.Mock_Exam); // button7.Enabled=true; dateTimePicker1.Enabled = true; label4.Text = "Exam Duration(HH:MM): *"; textBox2.Enabled = true; label12.Text = "Exam Pass Percentage Score: "; if (comboBox4.SelectedIndex == 1 || comboBox4.SelectedIndex == 2) { button2.Enabled = false; button3.Enabled = false; button4.Enabled = false; button5.Enabled = false; button7.Enabled = false; label12.Text = "Exam Pass Percentage Score: *"; } else if (comboBox4.SelectedIndex == 3) { button6.Enabled = false; dateTimePicker1.Text = "00:00"; label4.Text = "Exam Duration(HH:MM):"; dateTimePicker1.Enabled = false; textBox2.Enabled = false; } }
/// <summary> /// Adds the Authorization to the data store and logs accordingly. /// </summary> /// <returns> /// The ResultCode corresponding to the result of the operation. /// </returns> public ResultCode AddAuthorization() { ResultCode result; // Add the redemption event info to the data store. Context.Log.Verbose("Attempting to add the authorization to the data store."); result = AuthorizationOperations.AddAuthorization(); Context.Log.Verbose("ResultCode after adding the authorization to the data store: {0}", result); //TODO: Shouldn't this be in the CardLink layer? // If the authorization was successfully created, complete populating redeemed deal into fields. if (result == ResultCode.Created) { RedeemedDealInfo redeeemedDealInfo = (RedeemedDealInfo)Context[Key.RedeemedDealInfo]; int redemptionAmt = redeeemedDealInfo.DiscountAmount; double actualSavings = (double)redemptionAmt / 100; redeeemedDealInfo.DiscountText = String.Format("${0:F2}", actualSavings); } return(result); }