Laserfiche WebLink
<br />tJUOtJ85 <br /> <br />eheeksheeCreeord <br /> <br />Cheeksheet OMI <br />functions <br /> <br />37 <br /> <br />. edi t_day: A number showing the day of the checksheet being edited. <br />. date: The date of the checksheet (year and month). <br /> <br />. inher i t_da te: The date from which the checksheet was copied, if the new <br />flag is true. <br /> <br />. number_checksheet_yows: The number of rows in the checksheet. <br /> <br />. data: An aTTay of checksheet rows. <br /> <br />typedef struct row_struct { <br />charrd_on1y_f1ag <br />intid; <br />introw_type; <br />char *forrnula; <br />charname [ 21 ] ; <br />f1oatday_va1ue[32] ; <br />int currently_edited; <br />checksheet_record; <br /> <br />Where: <br /> <br />. rd_only _f lag: A flag indicating that the user may not edit the row. <br /> <br />. i d: The ID of the row, from the Checksheet fonnat file. <br /> <br />. row_type: A number indicating the type of the row. <br /> <br />. formula: A character string containing the formula from the Checksheet formal <br />file. <br /> <br />. name: The name, or printed title, of the row. <br /> <br />. day_value: An array of daily numbers for the row, one for each day in the <br />sheet. <br /> <br />. currently_edited: A flag indicating that the row has been edited. <br /> <br />The GUl manipulates a loaded checksheet directly. The sheet is loaded by a call to the <br />DMI function LoadChecksheet () and archived by the function SaveCheck~ <br />sheet ( ) . <br /> <br />LoadChecksheet () first calls CreateChecksheet () which reads the <br />checksheet fonnat file and initializes the structures which comprise the Checksheet. <br />The result is a set of data structures that have the appropriate number of rows, each of <br />the correct type and with proper writability, but which lack any data values. <br /> <br />LoadChecksheet () then checks to see if the requested sheet is saved in the data- <br />base. If it is not, it creates a blank sheet and selS the new flag to I. Otherwise, the <br />application reads the values from the database, using the function LoadCheck- <br />sheetFromDate ( ), and sets the new flag to O. <br /> <br />Several DMI routines are used for the data retrieval, all of which fetch values for rows <br />in the sheet. Unlike the Water Infonnation Sheet, the Checksheet has no header infor- <br />mation. Rows of type flow are loaded by the function SQLLoadCsF1owRow (). <br />