protected void btnNew_Click(object sender, EventArgs e) { try { if (UsrCntSelector.IsChangedSHID) { Common.AppHelper.ShowWarning((HtmlGenericControl)Master.FindControl("divWarning"), "You changed the SHID without pressing the Find button. Please press Find."); return; } WSCSecurity auth = Globals.SecurityState; if (!UsrCntSelector.IsOwner) { Common.AppHelper.ShowWarning((HtmlGenericControl)Master.FindControl("divWarning"), "Sorry, you are not authorized to update this information"); return; } NewContractAlertOn(); // This process creates a temporary new field, but Does Not clear or reset // the sequence list for any current contract. int seqMax = UsrCntSelector.SequenceNumberMax; UsrCntSelector.ResetField(); UsrCntSelector.SetSequenceNumber(seqMax, 0); ClearFieldDetail(); //txtOtherLldContracts.Text = ""; } catch (Exception ex) { ShowError(ex, "Unable to generate a New Field at this time."); } }
protected void btnReset_Click(object sender, EventArgs e) { try { if (UsrCntSelector.IsChangedSHID) { Common.AppHelper.ShowWarning((HtmlGenericControl)Master.FindControl("divWarning"), "You changed the SHID without pressing the Find button. Please press Find."); return; } int seqMax = UsrCntSelector.SequenceNumberMax; UsrCntSelector.ResetField(); UsrCntSelector.SetSequenceNumber(seqMax, 0); ClearFieldDetail(); NewContractAlertOff(); } catch (Exception ex) { ShowError(ex, "Unable to Resest the Field at this time."); } }
protected void btnSvrFindField_Click(object sender, EventArgs e) { const string METHOD_NAME = "btnSvrFindField_Click"; try { if (txtLldID.Text.Length > 0) { int lldID = Convert.ToInt32(txtLldID.Text); txtLldID.Text = ""; int maxFields = UsrCntSelector.SequenceNumberMax; UsrCntSelector.ResetField(); UsrCntSelector.SetSequenceNumber(maxFields, 0); ShowFieldDetail(lldID); } } catch (Exception ex) { Common.CException wex = new Common.CException(MOD_NAME + METHOD_NAME, ex); ((PrimaryTemplate)Page.Master).ShowWarning(ex); } }