Exemple #1
0
        /// <summary>
        /// Add schedule to accesslevel
        /// </summary>
        /// <param name="accessLvId">ID of access level need add</param>
        /// <param name="scheduleId">id of schedule need add</param>
        /// <param name="creator">user login id</param>
        /// <returns>OK or error from DB</returns>
        public static string AddSchedule(string accessLvId, string scheduleId, string creator)
        {
            string    result = "OK";
            DataTable dt     = null;

            try
            {
                ServiceReference1.WSACUSoapClient client = new ServiceReference1.WSACUSoapClient();
                DataSet ds = client.AccessLevelSSave("A", accessLvId, scheduleId, creator, DateTime.Now);
                dt     = ds.Tables[0];
                result = dt.Rows[0][0].ToString();

                return(result);
            }
            catch (Exception ex)
            {
                return(string.Format("Access level class - Add schedule: {0}", ex.ToString()));
            }
        }