// //////////////////////////////////////////////////////////////////////// // PUBLIC METHODS // public EmployeeInformationTDS.NoteInformationDataTable GetNotesNew() { employeeInformationNote = (EmployeeInformationTDS.NoteInformationDataTable)Session["employeesNotesDummy"]; if (employeeInformationNote == null) { employeeInformationNote = ((EmployeeInformationTDS)Session["employeeInformationTDS"]).NoteInformation; } return employeeInformationNote; }
protected void AddNotesNewEmptyFix(GridView grdView) { if (grdNotes.Rows.Count == 0) { int companyId = Int32.Parse(hdfCompanyId.Value); EmployeeInformationTDS.NoteInformationDataTable dt = new EmployeeInformationTDS.NoteInformationDataTable(); dt.AddNoteInformationRow(-1, -1, "", -1, DateTime.Now, "", false, companyId, false); Session["employeesNotesDummy"] = dt; grdNotes.DataBind(); } // Normally executes at all postbacks if (grdNotes.Rows.Count == 1) { EmployeeInformationTDS.NoteInformationDataTable dt = (EmployeeInformationTDS.NoteInformationDataTable)Session["employeesNotesDummy"]; if (dt != null) { grdNotes.Rows[0].Visible = false; grdNotes.Rows[0].Controls.Clear(); } } }