/// <summary> /// Updates the record and closes page is loaded in a modal window /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void SaveRecord(object sender, EventArgs e) { addFormControl.Save(loiId); string qs = "?projectId=" + ProjectId; base.RegisterUpdatePageScript(qs, true); }
protected void BtnSave_Click(object sender, ImageClickEventArgs e) { if (LOIField.Text.Length > MAX_FIELD_LENGTH) { labelErrMsg.Visible = true; labelErrMsg.Text = "The field length is limited to " + MAX_FIELD_LENGTH + ". Current field length is " + LOIField.Text.Length.ToString(); return; } else { labelErrMsg.Visible = false; } //ProjectLetterOfIntent biz = new ProjectLetterOfIntent(); if (projectId == -1 && !string.IsNullOrEmpty(strLOIField)) { return; } //biz.GetByParent(projectId); ProjectLetterOfIntent biz = BusinessObject.GetByParent <ProjectLetterOfIntent>(projectId).First(); biz[strLOIField] = LOIField.Text; biz.Save(); if (addFormControl != null) { int loiId = int.Parse(biz[ProjectLetterOfIntent.ProjectLetterOfIntentId].ToString()); addFormControl.Save(loiId); } RefreshMainList(); }