コード例 #1
0
ファイル: Office.cs プロジェクト: Confirmit/Portal
        /// <summary>
        /// Returns office from details.
        /// </summary>
        /// <param name="details">Office details.</param>
        /// <returns>Office from details.</returns>
        private static Office GetOfficeFromDetails(OfficeDetails details)
        {
            Office office = new Office();

            office.ID = details.ID;
            office.OfficeName = details.OfficeName;
            office.StatusesServiceURL = details.StatusesServiceURL;
            office.StatusesServiceUserName = details.StatusesServiceUserName;
            office.StatusesServicePassword = details.StatusesServicePassword;
            office.MeteoInformer = details.MeteoInformer;

            return office;
        }
コード例 #2
0
ファイル: OfficesProvider.cs プロジェクト: Confirmit/Portal
 /// <summary>
 /// Updates office information in database.
 /// </summary>
 /// <param name="details">Office details.</param>
 /// <returns>True if record was successfully updated; false, otherwise.</returns>
 public abstract bool UpdateOffice( OfficeDetails details );
コード例 #3
0
ファイル: Office.cs プロジェクト: Confirmit/Portal
        /// <summary>
        /// Updates office information.
        /// </summary>
        /// <param name="id">ID of office.</param>
        /// <param name="officeName">Name of office.</param>
        /// <param name="statusesServiceURL">URL of statuses service.</param>
        /// <param name="statusesServiceUserName">User name for statuses service.</param>
        /// <param name="statusesServicePassword">Password for statuses service.</param>
        /// <param name="meteoInformer">URL of meteo informer.</param>
        /// <returns>True if office was successfully updated; false, otherwise.</returns>
        public static bool UpdateOffice(
            int id,
            string officeName,
            string statusesServiceURL,
            string statusesServiceUserName,
            string statusesServicePassword,
            string meteoInformer
            )
        {
            OfficeDetails details = new OfficeDetails();
            details.ID = id;
            details.OfficeName = officeName;
            details.StatusesServiceURL = statusesServiceURL;
            details.StatusesServiceUserName = statusesServiceUserName;
            details.StatusesServicePassword = statusesServicePassword;
            details.MeteoInformer = meteoInformer;

            return SiteProvider.Offices.UpdateOffice(details);
        }
コード例 #4
0
ファイル: OfficesProvider.cs プロジェクト: Confirmit/Portal
 /// <summary>
 /// Creates new office record in database.
 /// </summary>
 /// <param name="details">Office details.</param>
 /// <returns>ID of new record.</returns>
 public abstract int CreateOffice( OfficeDetails details );