Exemplo n.º 1
0
 private void BindReplyCombo()
 {
     replyList = MailDetailService.getAllIncomingwithNoReplied();
     foreach (var item in replyList)
     {
         item.replyAgaist = item.Id + "-" + item.Subject;
     }
     cmb_Replyaginst.ItemsSource = replyList;
 }
Exemplo n.º 2
0
        private void btn_save_Click(object sender, RoutedEventArgs e)
        {
            if (!Validate())
            {
                MessageBox.Show(errorMsg, "ERROR", MessageBoxButton.OK);
                errorMsg = null;
                return;
            }
            MailDetail obj = new MailDetail()
            {
                Subject  = txt_subject.Text,
                Date     = dtp_mail.SelectedDate,
                FiledIn  = txt_fileIn.Text,
                MailType = (int)cmb_mailType.SelectedValue,
                Type     = cmb_mailDetailType.SelectedItem.ToString(),

                PageNo      = Convert.ToInt32(txt_pageNo.Text),
                ScannedCopy = destinationPath
            };

            if (obj.Type == "Replied")
            {
                int index = cmb_Replyaginst.SelectedIndex;
                if (replyList.Count == 0 && cmb_Replyaginst.SelectedIndex < 0)
                {
                    errorMsg = errorMsg + "Please Select Email to whcih you are Replying \n";
                    MessageBox.Show(errorMsg, "ERROR", MessageBoxButton.OK);
                    return;
                }
                obj.RepliedEmailId = replyList[cmb_Replyaginst.SelectedIndex].Id;
            }
            MailDetailService.addMailDetail(obj);
            destinationPath = "";

            cmb_mailType.SelectedIndex       = -1;
            cmb_mailDetailType.SelectedIndex = -1;
            txt_pageNo.Text       = "";
            txt_subject.Text      = "";
            txt_fileIn.Text       = "";
            dtp_mail.SelectedDate = new DateTime();
            dtp_mail.DisplayDate  = DateTime.Now;
            BindDataGrid();
        }
Exemplo n.º 3
0
        private void BindDataGrid()
        {
            List <MailDetail> list = MailDetailService.getAllMailDetails();

            dataGrid.ItemsSource = list;
        }
Exemplo n.º 4
0
        private void BindDataGrid()
        {
            listMailDetail = MailDetailService.filterMails(mailType, toDate, fromDate, type);

            dataGrid.ItemsSource = listMailDetail;
        }