protected void btnRefresh_Click(object sender, EventArgs e) { Page.Validate("Search"); if (Page.IsValid) { var letter = ConfirmationLetterService.GetConfirmationLetter(txtConfirmationLetterNo.Text); if (letter == null) { WebFormHelper.SetLabelTextWithCssClass(lblStatus, String.Format("Cannot find Confirmation Letter {0}", txtConfirmationLetterNo.Text), LabelStyleNames.ErrorMessage); return; } else { if (letter.VoidDate.HasValue) { WebFormHelper.SetLabelTextWithCssClass(lblStatus, String.Format("Confirmation Letter {0} has been marked as void.", txtConfirmationLetterNo.Text), LabelStyleNames.ErrorMessage); return; } } txtConfirmationLetterNo.ReadOnly = true; ConfirmationLetterDetail1.LoadConfirmationLetter(txtConfirmationLetterNo.Text); pnlReceiveDate.Visible = true; txtReason.Focus(); } }
protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e) { if (e.CommandName == "EditRow") { mvwForm.SetActiveView(viwAddEdit); RowID = Convert.ToInt32(e.CommandArgument); hidLetterID.Value = Convert.ToString(RowID); var letter = ConfirmationLetterService.GetConfirmationLetter(RowID); ViewState["LetterNo"] = letter.LetterNo; ConfirmationLetterDetail1.LoadConfirmationLetter(letter.LetterNo); FillDropDown(); } }