private static void _parse_titles(ref IDataReader reader, ref List <WikiTitle> lstTitles)
        {
            while (reader.Read())
            {
                try
                {
                    WikiTitle title = new WikiTitle();

                    if (!string.IsNullOrEmpty(reader["TitleID"].ToString()))
                    {
                        title.TitleID = (Guid)reader["TitleID"];
                    }
                    if (!string.IsNullOrEmpty(reader["OwnerID"].ToString()))
                    {
                        title.OwnerID = (Guid)reader["OwnerID"];
                    }
                    if (!string.IsNullOrEmpty(reader["Title"].ToString()))
                    {
                        title.Title = (string)reader["Title"];
                    }
                    if (!string.IsNullOrEmpty(reader["SequenceNumber"].ToString()))
                    {
                        title.SequenceNumber = (int)reader["SequenceNumber"];
                    }
                    if (!string.IsNullOrEmpty(reader["CreatorUserID"].ToString()))
                    {
                        title.CreatorUserID = (Guid)reader["CreatorUserID"];
                    }
                    if (!string.IsNullOrEmpty(reader["CreationDate"].ToString()))
                    {
                        title.CreationDate = (DateTime)reader["CreationDate"];
                    }
                    if (!string.IsNullOrEmpty(reader["LastModificationDate"].ToString()))
                    {
                        title.LastModificationDate = (DateTime)reader["LastModificationDate"];
                    }
                    if (!string.IsNullOrEmpty(reader["Status"].ToString()))
                    {
                        title.Status = (string)reader["Status"];
                    }

                    lstTitles.Add(title);
                }
                catch { }
            }

            if (!reader.IsClosed)
            {
                reader.Close();
            }
        }
        public static bool ModifyTitle(Guid applicationId, WikiTitle Info, bool?accept)
        {
            string spName = GetFullyQualifiedName("ModifyTitle");

            try
            {
                return(ProviderUtil.succeed(ProviderUtil.execute_reader(spName, applicationId,
                                                                        Info.TitleID, Info.Title, Info.LastModifierUserID, Info.LastModificationDate, accept)));
            }
            catch (Exception ex)
            {
                LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.WK);
                return(false);
            }
        }
Beispiel #3
0
 public static bool modify_title(Guid applicationId, WikiTitle Info, bool?accept)
 {
     return(DataProvider.ModifyTitle(applicationId, Info, accept));
 }
Beispiel #4
0
 public static bool add_title(Guid applicationId, WikiTitle Info, bool?accept)
 {
     return(DataProvider.AddTitle(applicationId, Info, accept));
 }