Ejemplo n.º 1
0
        public FileDB LoadFileDB()
        {
            if (db == null)
            {
                FileInfo fileInfo = new FileInfo(this.fileDbPath);

                var bytes = fileInfo.ReadBinary();

                db = FormatterMg.XMLDerObjectFromBytes(typeof(FileDB), bytes) as FileDB;
            }

            return db;
        }
Ejemplo n.º 2
0
 public FileRepositoryBase(FileDBMgr fileDbmgr)
 {
     this.fileDbmgr = fileDbmgr;
     FileDB = fileDbmgr.LoadFileDB();
 }
Ejemplo n.º 3
0
        private void QueryMain_Shown(object sender, EventArgs e)
        {

            fileDbMgr = new FileDBMgr();
            this.fileDb = fileDbMgr.LoadFileDB();

            var recipient = this.fileDb.RecipientList.Single(x => x.ID == AppInputParameters.Current.RecipientID);

            this.label2.Text =   string.Format("{0}  {1}  {2}  {3}  {4}",
                      recipient.Name,
                      recipient.CnAddress,
                      recipient.PostCode,
                      recipient.MainTel,
                      recipient.OtherTels
                      );

            string bpostTempalte = "http://www.bpost2.be/bpi/track_trace/find.php?search=s&lng=en&trackcode={0}";
            string dhlTemplate = "http://nolp.dhl.de/nextt-online-public/set_identcodes.do?lang=en&idc={0}&rfn=&extendedSearch=true";

            this.webBrowser1.Navigate("http://www.ems.com.cn/mailtracking/you_jian_cha_xun.html");
            this.wbBpost.Navigate(string.Format(bpostTempalte, AppInputParameters.Current.BpostCode));

            this.wbDhl.Navigate(string.Format(dhlTemplate, AppInputParameters.Current.DHLCode));
        }