コード例 #1
0
        protected void SaveButton_Click(object sender, EventArgs e)
        {
            int   orderId = AlwaysConvert.ToInt(HiddenOrderId.Value);
            Order order   = OrderDataSource.Load(orderId);

            if (MarkReadOnReply.Checked)
            {
                foreach (OrderNote note in order.Notes)
                {
                    note.IsRead = true;
                }
            }

            AbleContext.Current.Database.BeginTransaction();
            OrderNote newNote = new OrderNote(orderId, AbleContext.Current.UserId, LocaleHelper.LocalNow, NoteText.Text, (PrivateNote.Checked ? NoteType.Private : NoteType.Public));

            order.Notes.Add(newNote);
            order.Save(false, false);
            AbleContext.Current.Database.CommitTransaction();

            NoteText.Text = String.Empty;
            AddPopup.Hide();

            OrderNotesGrid.DataBind();
            SearchResultAjax.Update();
        }
コード例 #2
0
 protected void HideProductForm()
 {
     AddProductId.Value = string.Empty;
     AddPopup.Hide();
     // HIDE THIS PANEL TO PREVENT VALUES FROM POSTED BACK
     AddProductPanel.Visible = false;
 }