Exemple #1
0
        public NewDocLayoutViewModel(bool isedit, CongVan cv)
        {
            edit = isedit;

            editID         = cv.Id;
            SoVao          = (int)cv.SoCongVan;
            NgayNhan       = cv.NgayXuLi;
            TrichYeu       = cv.TrichYeu;
            NoiGui         = cv.NoiGui;
            VisibleButton  = "Visible";
            VisibleTextBox = "Collapsed";
            foreach (NoiNhan item in cv.DanhSachNoiNhan)
            {
                DSNoiNhan.Add(new LienHeShort()
                {
                    Email = item.LienHe.Email, TenLienHe = item.LienHe.Name
                });
            }
            NgayTrenCongVan = (DateTime)cv.NgayCongVan;
            GhiChu          = cv.GhiChu;

            listLoaiCongVan = new ObservableCollection <string>();

            ResetListCongVan();
            ResetListMaKyHieu();
            SoKyHieu            = cv.SoKyHieu.Remove(cv.SoKyHieu.IndexOf("/"));
            MaKyHieu            = cv.SoKyHieu.Remove(0, cv.SoKyHieu.IndexOf("/") + 1);
            selectedLoaiCongVan = cv.LoaiCongVan.Id;

            filename = showFileName = cv.PDFScanLocation;

            IsVisibleHuy = "Visible";
        }
Exemple #2
0
        public async void GetLienHeNoiNhan(ContactLayout contactLayout)
        {
            LienHe a = await((ContactLayoutViewModel)contactLayout.DataContext).getSelectedLienHe();

            if (a == null)
            {
                return;
            }
            LienHeShort lh = new LienHeShort();

            lh.Email     = a.Email;
            lh.TenLienHe = a.Name;
            DSNoiNhan.Add(lh);
            NoiNhan = "";
        }