/// <summary>
        /// Delete
        /// </summary>
        /// <param name="costId">costId</param>        
        public void Delete(int costId, int unitId)
        {
            UnitInformationTDS.CostInformationRow row = GetRow(costId);
            row.Deleted = true;

            UnitInformationCostExceptionsInformation model = new UnitInformationCostExceptionsInformation(Data);
            model.DeleteAll(costId);
        }
        private void Delete()
        {
            Page.Validate();

            if (Page.IsValid)
            {
                // Delete
                int unitId = Int32.Parse(hdfUnitId.Value);
                int companyId = Int32.Parse(hdfCompanyId.Value);

                UnitInformationUnitDetails unitInformationUnitDetails = new UnitInformationUnitDetails(unitInformationTDS);
                unitInformationUnitDetails.Delete(unitId);

                UnitInformationChecklistDetails unitInformationChecklistDetails = new UnitInformationChecklistDetails(unitInformationTDS);
                unitInformationChecklistDetails.DeleteAll();

                UnitInformationInspectionDetails unitInformationInspectionDetails = new UnitInformationInspectionDetails(unitInformationTDS);
                unitInformationInspectionDetails.DeleteAll();

                UnitInformationCostExceptionsInformation unitInformationCostExceptionsInformation = new UnitInformationCostExceptionsInformation(unitInformationTDS);
                unitInformationCostExceptionsInformation.DeleteAll(unitId);

                UnitInformationCostInformation unitInformationCostInformation = new UnitInformationCostInformation(unitInformationTDS);
                unitInformationCostInformation.DeleteAll(unitId);

                // Update databse
                UpdateDatabase();

                // Store datasets
                Session["unitInformationTDS"] = unitInformationTDS;

                // Redirect
                string url = "";
                url = "./units_navigator2.aspx?source_page=units_delete.aspx" + GetNavigatorState() + "&update=yes";
                Response.Redirect(url);
            }
        }