void DeleteEntry()
 {
     if (MessageBox.Show("Do you wish to delete this entry?", "WinBlogX", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         BlogXEditing editing = new BlogXEditing();
         editing.Url = project.EditingUrl;
         string username = "******", password = "******";
         if (!editing.CanEdit(username, password))
         {
         }
         editing.BeginDeleteEntry(ViewingEntry.EntryId, username, password, new AsyncCallback(DeleteEntryCallback), editing);
         StartOperation();
     }
 }
Beispiel #2
0
        private void save_Click(object sender, System.EventArgs e)
        {
            BlogXEditing editing = new BlogXEditing();

            editing.Url = Project.EditingUrl;
            if (!editing.CanEdit(Username, Password))
            {
                MessageBox.Show("Invalid Username/Password Combination");
                return;
            }
            editing.Dispose();

            entry.Content = designDescription.Html;

            if (day == null)
            {
                DateTime timeCalc;
                DateTime dateCalc;
                timeCalc = DateTime.Now;
                dateCalc = DateTime.Now;

                entry.Created = new DateTime(dateCalc.Year, dateCalc.Month, dateCalc.Day, timeCalc.Hour, timeCalc.Minute, timeCalc.Second, timeCalc.Millisecond);
            }
            StringBuilder sb       = new StringBuilder();
            bool          needSemi = false;

            foreach (string category in categoryList.CheckedItems)
            {
                if (needSemi)
                {
                    sb.Append(";");
                }
                sb.Append(category);
                needSemi = true;
            }
            entry.Categories  = sb.ToString();
            entry.Title       = title.Text;
            entry.Description = description.Text;
            entry.Content     = designDescription.Html;
            entry.Modify();
            DialogResult = DialogResult.OK;
        }