예제 #1
0
        public void DeleteMessage(MailMessage message, bool permanent = false)
        {
            message.Flags |= MailFlags.Deleted; // marke the message as deleted

            //first simuate deleting the item by moving it to the deleted folders
            if (!DeletedItems.Contains(message))
            {
                DeletedItems.Add(message);
            }

            if (InboxItems.Contains(message))
            {
                InboxItems.Remove(message);
            }

            if (DraftItems.Contains(message))
            {
                DraftItems.Remove(message);
            }

            if (SentItems.Contains(message))
            {
                SentItems.Remove(message);
            }

            if (permanent)
            {
                if (DeletedItems.Contains(message))
                {
                    DeletedItems.Remove(message);
                }
            }
        }
예제 #2
0
        public async void ReadInboxItems()
        {
            var inboxItems = await FirestoreInboxHelper.ReadInboxItems();

            InboxItems.Clear();
            foreach (var i in inboxItems)
            {
                InboxItems.Add(i);
            }
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack != true)
            {
                if (Session["WarehouseInboxItemName"] != null && Session["Inboxpath"] != null)
                {
                    this.lblInboxItemName.Text = Session["WarehouseInboxItemName"].ToString();
                }
                else
                {
                    return;
                }
                // Load GIN Information.
                List <TransactionDetail> listDisplay = new List <TransactionDetail>();
                InboxItems item      = new InboxItems();
                XMLHelper  objHelper = new XMLHelper(Session["Inboxpath"].ToString());
                item        = objHelper.SearchByInboxItemName(Session["WarehouseInboxItemName"].ToString());
                listDisplay = item.GetTransactions();
                if ("Select Trucks For Sampling" == Session["WarehouseInboxItemName"].ToString())
                {
                    TransactionDetail obj = new TransactionDetail("", "");
                    obj.DisplayName = "Select Trucks for Sampling";
                    obj.TrackNo     = "GetTrucksReadyForSam";
                    listDisplay.RemoveAll(RemovePredicate);
                    listDisplay.Add(obj);
                }
                else if ("Confirm Trucks For Sampling" == Session["WarehouseInboxItemName"].ToString())
                {
                    TransactionDetail obj = new TransactionDetail("", "");
                    obj.DisplayName = "Confirm Truks For Sampling";
                    obj.TrackNo     = "ConfirmTrucksForSamp";
                    listDisplay.RemoveAll(RemovePredicate);
                    listDisplay.Add(obj);
                }
                else if ("Assign Sampler".Trim() == Session["WarehouseInboxItemName"].ToString().Trim())
                {
                    TransactionDetail obj = new TransactionDetail("", "");
                    obj.DisplayName = "Assign Sampler";
                    obj.TrackNo     = "GetSampleTicket";
                    listDisplay.RemoveAll(RemovePredicate);
                    listDisplay.Add(obj);
                }

                this.gvDetail.DataSource = listDisplay;
                this.gvDetail.DataBind();
            }
        }