Example #1
0
        private void LoadData2TreeView(ThongTinHoSo value)
        {
            this.trvHoSo.Nodes.Clear();
            this._dictHoSo = new Dictionary <long, ThongTinHoSo>();
            this._dictHoSo.Add(value.ThongTinHoSoId, value);
            _rootId = value.RootId;
            long?num = value.KhoaChaId;

            while (num.HasValue)
            {
                ThongTinHoSoEntity thongTinHoSoEntity = ManageBase.SelectThongTinHoSoById(num.Value);
                num = null;
                bool flag = thongTinHoSoEntity != null;
                if (flag)
                {
                    ThongTinHoSo thongTinHoSo = ProcessData.MapThongTinHoSo(thongTinHoSoEntity);
                    num = thongTinHoSo.KhoaChaId;
                    this._dictHoSo.Add(thongTinHoSo.ThongTinHoSoId, thongTinHoSo);
                }
            }
            foreach (KeyValuePair <long, ThongTinHoSo> current in this._dictHoSo)
            {
                TreeNode node = this.AddData2TreeNode(current.Value);
                this.trvHoSo.Nodes.Add(node);
            }
            foreach (TreeNode node2 in this.trvHoSo.Nodes)
            {
                this.hideTreeNode(node2);
            }
            this.trvHoSo.ExpandAll();
        }
Example #2
0
        private void AddData2FirstTreeView(ThongTinHoSo value)
        {
            this._dictHoSo.Add(value.ThongTinHoSoId, value);
            TreeNode treeNode = this.AddData2TreeNode(value);

            this.trvHoSo.Nodes.Insert(0, treeNode);
            this.hideTreeNode(treeNode);
            treeNode.ExpandAll();
        }
Example #3
0
        private void FillData(int rowIndex)
        {
            DataGridViewRow             dataGridViewRow = this.dgvKetQua.Rows[rowIndex];
            ThongTinHoSo                thongTinHoSo    = (ThongTinHoSo)this.dgvKetQua.Rows[rowIndex].DataBoundItem;
            ChiTietHoSo                 thongTinChiTiet = thongTinHoSo.ThongTinChiTiet;
            bool                        flag            = thongTinChiTiet.ListGiayChungNhan != null;
            BindingList <GiayChungNhan> dataSource;

            if (flag)
            {
                dataSource = new BindingList <GiayChungNhan>(thongTinChiTiet.ListGiayChungNhan);
            }
            else
            {
                dataSource = new BindingList <GiayChungNhan>();
            }
            this.dgvGiayChungNhan.DataSource = dataSource;
            bool flag2 = thongTinChiTiet.ListChu != null;
            BindingList <ChuSuDung> dataSource2;

            if (flag2)
            {
                dataSource2 = new BindingList <ChuSuDung>(thongTinChiTiet.ListChu);
            }
            else
            {
                dataSource2 = new BindingList <ChuSuDung>();
            }
            this.dgvChu.DataSource = dataSource2;
            bool flag3 = thongTinChiTiet.ListThua != null;
            BindingList <ThuaDat> dataSource3;

            if (flag3)
            {
                dataSource3 = new BindingList <ThuaDat>(thongTinChiTiet.ListThua);
            }
            else
            {
                dataSource3 = new BindingList <ThuaDat>();
            }
            this.dgvThuaDat.DataSource = dataSource3;
            bool flag4 = thongTinChiTiet.ListNha != null;
            BindingList <Nha> dataSource4;

            if (flag4)
            {
                dataSource4 = new BindingList <Nha>(thongTinChiTiet.ListNha);
            }
            else
            {
                dataSource4 = new BindingList <Nha>();
            }
            this.dgvNha.DataSource = dataSource4;
        }
Example #4
0
        public static ThongTinHoSo MapThongTinHoSo(ThongTinHoSoEntity entity)
        {
            ThongTinHoSo thongTinHoSo = new ThongTinHoSo();

            thongTinHoSo.SoBienNhan           = entity.SoBienNhan;
            thongTinHoSo.NgayNop              = entity.NgayNop;
            thongTinHoSo.NgayHenTra           = entity.NgayHenTra;
            thongTinHoSo.NgayTraHoSo          = entity.NgayTraHoSo;
            thongTinHoSo.NgayKiemTraNoiNghiep = entity.NgayKiemTraNoiNghiep;
            thongTinHoSo.SoBanVe              = entity.SoBanVe;
            thongTinHoSo.PhiDoVe              = entity.PhiDoVe;
            thongTinHoSo.GhiChu            = entity.GhiChu;
            thongTinHoSo.GioiTinhNguoiNop  = entity.GioiTinhNguoiNop.Value;
            thongTinHoSo.NguoiNopHoSo      = entity.NguoiNopHoSo;
            thongTinHoSo.SoGiayToNguoiNop  = entity.SoGiayToNguoiNop;
            thongTinHoSo.IsNew             = false;
            thongTinHoSo.IsSuccess         = false;
            thongTinHoSo.LaHoSoMoiNhat     = entity.HoSoMoiNhat;
            thongTinHoSo.KhoaChaId         = entity.KhoaChaId;
            thongTinHoSo.LoaiBienDongId    = entity.LoaiBienDongId;
            thongTinHoSo.ThongTinChiTiet   = JsonConvert.DeserializeObject <ChiTietHoSo>(entity.ChiTietHoSo);
            thongTinHoSo.ThongTinHoSoId    = entity.ThongTinHoSoId;
            thongTinHoSo.PhiThamDinh       = entity.PhiThamDinh;
            thongTinHoSo.ChuyenVienId      = entity.ChuyenVienId;
            thongTinHoSo.ChuyenVienKiemTra = entity.ChuyenVienKiemTra;
            thongTinHoSo.CongTyDoVeId      = entity.CongTyDoVeId;
            thongTinHoSo.CongTyDoVe        = entity.CongTyDoVe;
            thongTinHoSo.HoSoChuaDat       = entity.HoSoChuaDat;
            thongTinHoSo.HoSoDaKiemTra     = entity.HoSoDaKiemTra;
            thongTinHoSo.HoSoKhongHopLy    = entity.HoSoKhongHopLy;
            thongTinHoSo.RootId            = entity.RootId;
            thongTinHoSo.NgayChinhSua      = entity.NgayChinhSua;
            bool flag3 = !string.IsNullOrEmpty(entity.LichSuCapNhat);

            if (flag3)
            {
                thongTinHoSo.LichSuCapNhat = JsonConvert.DeserializeObject <UserLog>(entity.LichSuCapNhat);
            }
            bool hasValue = entity.NguoiDungId.HasValue;

            if (hasValue)
            {
                NguoiDungEntity nguoiDungEntity = ManageBase.SelectNguoiDungById(entity.NguoiDungId.Value);
                thongTinHoSo.NguoiCapNhat = nguoiDungEntity.HoTenNguoiDung;
                bool flag4 = string.IsNullOrEmpty(thongTinHoSo.NguoiCapNhat);
                if (flag4)
                {
                    thongTinHoSo.NguoiCapNhat = nguoiDungEntity.TenDangNhap;
                }
            }
            return(thongTinHoSo);
        }
Example #5
0
 private void btnKhoiTao_Click(object sender, EventArgs e)
 {
     this.txtSoBienNhan.Text   = "";
     this.txtHoTen.Text        = "";
     this.txtSoGiayTo.Text     = "";
     this.txtSoSerial.Text     = "";
     this.txtSoThua.Text       = "";
     this.txtSoTo.Text         = "";
     this.dgvKetQua.DataSource = null;
     this.dgvChu.Rows.Clear();
     this.dgvGiayChungNhan.Rows.Clear();
     this.dgvNha.Rows.Clear();
     this.dgvThuaDat.Rows.Clear();
     this._thongTinHS = null;
 }
Example #6
0
        private void btnChon_Click(object sender, EventArgs e)
        {
            bool flag = this.dgvKetQua.SelectedRows != null && this.dgvKetQua.SelectedRows.Count > 0;

            if (flag)
            {
                this._thongTinHS           = (ThongTinHoSo)this.dgvKetQua.SelectedRows[0].DataBoundItem;
                this._thongTinHS.IsNew     = false;
                this._thongTinHS.IsSuccess = false;
                base.Close();
            }
            else
            {
                MessageBox.Show("Không có bản ghi nào được chọn!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                this._thongTinHS = null;
            }
        }
Example #7
0
        private void btnThemMoi_Click(object sender, EventArgs e)
        {
            bool flag = this.frmNhapHoSo == null;

            if (flag)
            {
                this.frmNhapHoSo = new FormNhapHoSo();
            }
            long         num   = 0L;
            bool         flag2 = this.chkLayThongTinCu.Checked && this.trvHoSo.Nodes.Count > 0;
            ThongTinHoSo thongTinHoSo;

            if (flag2)
            {
                TreeNode treeNode = this.trvHoSo.Nodes[0];
                num                               = Convert.ToInt64(treeNode.Tag.ToString().Substring(2));
                thongTinHoSo                      = JsonConvert.DeserializeObject <ThongTinHoSo>(JsonConvert.SerializeObject(this._dictHoSo[num]));
                thongTinHoSo.SoBienNhan           = "";
                thongTinHoSo.NgayHenTra           = null;
                thongTinHoSo.NgayTraHoSo          = null;
                thongTinHoSo.NgayKiemTraNoiNghiep = null;
                thongTinHoSo.NgayNop              = null;
                thongTinHoSo.GhiChu               = "";
                thongTinHoSo.LoaiBienDongId       = null;
                thongTinHoSo.SoBanVe              = "";
                thongTinHoSo.PhiDoVe              = null;
                thongTinHoSo.PhiThamDinh          = null;
                thongTinHoSo.ChuyenVienId         = null;
                thongTinHoSo.ChuyenVienKiemTra    = "";
                thongTinHoSo.HoSoKhongHopLy       = false;
                thongTinHoSo.HoSoDaKiemTra        = false;
                thongTinHoSo.HoSoChuaDat          = false;
                thongTinHoSo.CongTyDoVeId         = null;
                thongTinHoSo.CongTyDoVe           = "";
                thongTinHoSo.NgayChinhSua         = null;
                thongTinHoSo.NguoiCapNhat         = "";
                thongTinHoSo.LichSuCapNhat        = null;
                bool flag3 = thongTinHoSo.ThongTinChiTiet != null;
                if (flag3)
                {
                    thongTinHoSo.ThongTinChiTiet.ListFile = null;
                }
            }
            else
            {
                thongTinHoSo = new ThongTinHoSo();
            }
            if (trvHoSo.Nodes.Count == 0)
            {
                _rootId = ManageBase.GetRootId();
                if (_rootId == 0)
                {
                    MessageBox.Show("Không thể khởi tạo dữ liệu Root!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }
            }

            thongTinHoSo.RootId         = _rootId;
            thongTinHoSo.ThongTinHoSoId = 0L;
            thongTinHoSo.IsNew          = true;
            thongTinHoSo.IsSuccess      = false;
            thongTinHoSo.LaHoSoMoiNhat  = true;
            bool flag4 = num > 0L;

            if (flag4)
            {
                thongTinHoSo.KhoaChaId = new long?(num);
            }
            this.frmNhapHoSo._thongTinHoSo = thongTinHoSo;
            this.frmNhapHoSo.ShowDialog();
            bool isSuccess = this.frmNhapHoSo._thongTinHoSo.IsSuccess;

            if (isSuccess)
            {
                thongTinHoSo = JsonConvert.DeserializeObject <ThongTinHoSo>(JsonConvert.SerializeObject(this.frmNhapHoSo._thongTinHoSo));
                bool flag5 = num > 0L;
                if (flag5)
                {
                    this._dictHoSo[num].LaHoSoMoiNhat = false;
                    this.AddData2FirstTreeView(thongTinHoSo);
                }
                else
                {
                    this.LoadData2TreeView(thongTinHoSo);
                }
            }
        }
Example #8
0
        private TreeNode AddData2TreeNode(ThongTinHoSo hoSoInfo)
        {
            string        text  = "";
            List <string> list  = new List <string>();
            List <string> list2 = new List <string>();
            bool          flag  = hoSoInfo.ThongTinChiTiet.ListThua != null;

            if (flag)
            {
                foreach (ThuaDat current in hoSoInfo.ThongTinChiTiet.ListThua)
                {
                    bool flag2 = !list.Contains(current.SoThuTuThua);
                    if (flag2)
                    {
                        list.Add(current.SoThuTuThua);
                    }
                    bool flag3 = !list2.Contains(current.SoHieuToBanDo);
                    if (flag3)
                    {
                        list2.Add(current.SoHieuToBanDo);
                    }
                }
                text = " thửa đất số " + string.Join(",", list) + " tờ " + string.Join(",", list2);
            }
            bool flag4 = hoSoInfo.ThongTinChiTiet.ListNha != null;

            if (flag4)
            {
                list = new List <string>();
                foreach (Nha current2 in hoSoInfo.ThongTinChiTiet.ListNha)
                {
                    bool flag5 = current2.LaCanHo && current2.SoNha != "" && !list.Contains(current2.SoNha.ToString());
                    if (flag5)
                    {
                        list.Add(current2.SoNha.ToString());
                    }
                }
                bool flag6 = list.Count > 0;
                if (flag6)
                {
                    bool flag7 = text == "";
                    if (flag7)
                    {
                        text = " căn hộ " + string.Join(",", list);
                    }
                    else
                    {
                        text = text + "; căn hộ " + string.Join(",", list);
                    }
                }
            }
            string text2 = "";
            bool   flag8 = !string.IsNullOrEmpty(hoSoInfo.NguoiCapNhat);

            if (flag8)
            {
                text2 += hoSoInfo.NguoiCapNhat;
            }
            DateTime?dateTime = hoSoInfo.NgayChinhSua;
            bool     hasValue = dateTime.HasValue;

            if (hasValue)
            {
                string arg_236_0 = text2;
                string arg_236_1 = " cập nhật ngày ";
                dateTime = hoSoInfo.NgayChinhSua;
                text2    = arg_236_0 + arg_236_1 + (dateTime.HasValue ? dateTime.GetValueOrDefault().ToString("dd/MM/yyyy HH:mm:ss") : null);
            }
            TreeNode treeNode = new TreeNode(string.Concat(new string[]
            {
                "Hồ sơ bản vẽ",
                text,
                "; ",
                GlobalVariable.TenXa,
                "; ",
                text2,
                "                    "
            }));

            treeNode.Tag      = "ID" + hoSoInfo.ThongTinHoSoId;
            treeNode.NodeFont = this.font;
            List <string> list3 = new List <string>();
            bool          flag9 = !string.IsNullOrEmpty(hoSoInfo.SoBienNhan);

            if (flag9)
            {
                list3.Add("Số biên nhận: " + hoSoInfo.SoBienNhan);
            }
            bool flag10 = !string.IsNullOrEmpty(hoSoInfo.SoBanVe);

            if (flag10)
            {
                list3.Add("Số bản vẽ: " + hoSoInfo.SoBanVe);
            }
            dateTime = hoSoInfo.NgayNop;
            bool hasValue2 = dateTime.HasValue;

            if (hasValue2)
            {
                List <string> arg_352_0 = list3;
                string        arg_34D_0 = "Ngày nộp: ";
                dateTime = hoSoInfo.NgayNop;
                arg_352_0.Add(arg_34D_0 + (dateTime.HasValue ? dateTime.GetValueOrDefault().ToString("dd/MM/yyyy") : null));
            }
            dateTime = hoSoInfo.NgayKiemTraNoiNghiep;
            bool hasValue3 = dateTime.HasValue;

            if (hasValue3)
            {
                List <string> arg_3A2_0 = list3;
                string        arg_39D_0 = "Ngày kiểm tra: ";
                dateTime = hoSoInfo.NgayKiemTraNoiNghiep;
                arg_3A2_0.Add(arg_39D_0 + (dateTime.HasValue ? dateTime.GetValueOrDefault().ToString("dd/MM/yyyy") : null));
            }
            TreeNode node = new TreeNode("Thông tin bản vẽ: " + string.Join(", ", list3));

            treeNode.Nodes.Add(node);
            bool flag11 = !string.IsNullOrEmpty(hoSoInfo.NguoiNopHoSo);

            if (flag11)
            {
                List <string> list4 = new List <string>();
                list4.Add((hoSoInfo.GioiTinhNguoiNop ? "Ông " : "Bà ") + hoSoInfo.NguoiNopHoSo);
                bool flag12 = !string.IsNullOrEmpty(hoSoInfo.SoGiayToNguoiNop);
                if (flag12)
                {
                    list4.Add("Số giấy tờ: " + hoSoInfo.SoGiayToNguoiNop);
                }
                TreeNode node2 = new TreeNode("Người nộp hồ sơ: " + string.Join(", ", list4));
                treeNode.Nodes.Add(node2);
            }
            bool flag13 = hoSoInfo.ThongTinChiTiet.ListGiayChungNhan != null && hoSoInfo.ThongTinChiTiet.ListGiayChungNhan.Count > 0;

            if (flag13)
            {
                TreeNode treeNode2 = new TreeNode("Giấy chứng nhận");
                treeNode.Nodes.Add(treeNode2);
                foreach (GiayChungNhan current3 in hoSoInfo.ThongTinChiTiet.ListGiayChungNhan)
                {
                    List <string> list5  = new List <string>();
                    bool          flag14 = !string.IsNullOrEmpty(current3.SoSerial);
                    if (flag14)
                    {
                        list5.Add("Số hiệu: " + current3.SoSerial);
                    }
                    bool flag15 = !string.IsNullOrEmpty(current3.SoVaoSo);
                    if (flag15)
                    {
                        list5.Add("Số vào sổ: " + current3.SoVaoSo);
                    }
                    dateTime = current3.NgayVaoSo;
                    bool hasValue4 = dateTime.HasValue;
                    if (hasValue4)
                    {
                        dateTime = current3.NgayVaoSo;
                        string str = dateTime.HasValue ? dateTime.GetValueOrDefault().ToString("dd/MM/yyyy") : null;
                        list5.Add("Ngày VS: " + str);
                    }
                    bool flag16 = !string.IsNullOrEmpty(current3.MaVach);
                    if (flag16)
                    {
                        list5.Add("Mã vạch: " + current3.MaVach);
                    }
                    TreeNode node3 = new TreeNode(string.Join(", ", list5));
                    treeNode2.Nodes.Add(node3);
                }
            }
            bool flag17 = hoSoInfo.ThongTinChiTiet.ListChu != null && hoSoInfo.ThongTinChiTiet.ListChu.Count > 0;

            if (flag17)
            {
                TreeNode treeNode3 = new TreeNode("Chủ sử dụng:");
                treeNode.Nodes.Add(treeNode3);
                foreach (ChuSuDung current4 in hoSoInfo.ThongTinChiTiet.ListChu)
                {
                    List <string> list6  = new List <string>();
                    bool          toChuc = current4.ToChuc;
                    if (toChuc)
                    {
                        list6.Add(current4.HoTen);
                    }
                    else
                    {
                        list6.Add((current4.GioiTinh ? "Ông " : "Bà ") + current4.HoTen);
                    }
                    bool flag18 = !string.IsNullOrEmpty(current4.SoGiayTo);
                    if (flag18)
                    {
                        list6.Add("Số giấy tờ: " + current4.SoGiayTo);
                    }
                    bool flag19 = !string.IsNullOrEmpty(current4.DiaChi);
                    if (flag19)
                    {
                        list6.Add("Địa chỉ: " + current4.DiaChi);
                    }
                    TreeNode node4 = new TreeNode(string.Join(", ", list6));
                    treeNode3.Nodes.Add(node4);
                }
            }
            bool flag20 = hoSoInfo.ThongTinChiTiet.ListThua != null && hoSoInfo.ThongTinChiTiet.ListThua.Count > 0;

            if (flag20)
            {
                TreeNode treeNode4 = new TreeNode("Thửa đất:");
                treeNode.Nodes.Add(treeNode4);
                foreach (ThuaDat current5 in hoSoInfo.ThongTinChiTiet.ListThua)
                {
                    List <string> list7 = new List <string>();
                    list7.Add("Số thửa: " + current5.SoThuTuThua);
                    list7.Add("Tờ bản đồ: " + current5.SoHieuToBanDo);
                    bool flag21 = !string.IsNullOrEmpty(current5.DiaChi);
                    if (flag21)
                    {
                        list7.Add("Địa chỉ: " + current5.DiaChi);
                    }
                    TreeNode node5 = new TreeNode(string.Join(", ", list7));
                    treeNode4.Nodes.Add(node5);
                }
            }
            bool flag22 = hoSoInfo.ThongTinChiTiet.ListNha != null && hoSoInfo.ThongTinChiTiet.ListNha.Count > 0;

            if (flag22)
            {
                TreeNode treeNode5 = new TreeNode("Địa chỉ nhà/căn hộ:");
                treeNode.Nodes.Add(treeNode5);
                foreach (Nha current6 in hoSoInfo.ThongTinChiTiet.ListNha)
                {
                    bool   laCanHo = current6.LaCanHo;
                    string str2;
                    if (laCanHo)
                    {
                        str2 = "Căn hộ: ";
                    }
                    else
                    {
                        str2 = "Nhà ở: ";
                    }
                    List <string> list8  = new List <string>();
                    bool          flag23 = !string.IsNullOrEmpty(current6.SoNha);
                    if (flag23)
                    {
                        list8.Add("Số nhà: " + current6.SoNha);
                    }
                    bool flag24 = !string.IsNullOrEmpty(current6.TenChungCu);
                    if (flag24)
                    {
                        list8.Add("Thuộc chung cư: " + current6.TenChungCu);
                    }
                    bool flag25 = !string.IsNullOrEmpty(current6.DiaChi);
                    if (flag25)
                    {
                        list8.Add("Địa chỉ: " + current6.DiaChi);
                    }
                    TreeNode node6 = new TreeNode(str2 + string.Join(", ", list8));
                    treeNode5.Nodes.Add(node6);
                }
            }
            bool flag26 = hoSoInfo.ThongTinChiTiet.ListFile != null && hoSoInfo.ThongTinChiTiet.ListFile.Count > 0;

            if (flag26)
            {
                TreeNode treeNode6 = new TreeNode("Danh sách file:");
                treeNode.Nodes.Add(treeNode6);
                foreach (FileScan current7 in hoSoInfo.ThongTinChiTiet.ListFile)
                {
                    List <string> list9  = new List <string>();
                    bool          flag27 = this._dictLoaiGiayToFileScan.ContainsKey(current7.LoaiGiayToId);
                    if (flag27)
                    {
                        list9.Add(this._dictLoaiGiayToFileScan[current7.LoaiGiayToId] + ": ");
                    }
                    else
                    {
                        list9.Add("Giấy tờ khác: ");
                    }
                    bool flag28 = !string.IsNullOrEmpty(current7.MoTa);
                    if (flag28)
                    {
                        list9.Add(current7.MoTa);
                    }
                    else
                    {
                        list9.Add(current7.FileName);
                    }
                    TreeNode treeNode7 = new TreeNode(string.Join(" ", list9));
                    treeNode7.Tag = "File" + current7.FilePath;
                    treeNode6.Nodes.Add(treeNode7);
                }
            }
            return(treeNode);
        }
Example #9
0
        public static bool SaveThongTinHoSo(ref ThongTinHoSo value)
        {
            bool result = true;

            try
            {
                DateTime           dateNow            = ManageBase.GetDateNow();
                ThongTinHoSoEntity thongTinHoSoEntity = new ThongTinHoSoEntity();
                thongTinHoSoEntity.ThongTinHoSoId       = value.ThongTinHoSoId;
                thongTinHoSoEntity.IsNew                = value.IsNew;
                thongTinHoSoEntity.XaId                 = GlobalVariable.XaId;
                thongTinHoSoEntity.SoBienNhan           = value.SoBienNhan;
                thongTinHoSoEntity.NgayNop              = value.NgayNop;
                thongTinHoSoEntity.NgayHenTra           = value.NgayHenTra;
                thongTinHoSoEntity.NgayTraHoSo          = value.NgayTraHoSo;
                thongTinHoSoEntity.NgayKiemTraNoiNghiep = value.NgayKiemTraNoiNghiep;
                thongTinHoSoEntity.SoBanVe              = value.SoBanVe;
                thongTinHoSoEntity.PhiDoVe              = value.PhiDoVe;
                thongTinHoSoEntity.GioiTinhNguoiNop     = new bool?(value.GioiTinhNguoiNop);
                thongTinHoSoEntity.NguoiNopHoSo         = value.NguoiNopHoSo;
                thongTinHoSoEntity.SoGiayToNguoiNop     = value.SoGiayToNguoiNop;
                thongTinHoSoEntity.PhiThamDinh          = value.PhiThamDinh;
                thongTinHoSoEntity.ChuyenVienId         = value.ChuyenVienId;
                thongTinHoSoEntity.ChuyenVienKiemTra    = value.ChuyenVienKiemTra;
                thongTinHoSoEntity.CongTyDoVeId         = value.CongTyDoVeId;
                thongTinHoSoEntity.CongTyDoVe           = value.CongTyDoVe;
                thongTinHoSoEntity.HoSoChuaDat          = value.HoSoChuaDat;
                thongTinHoSoEntity.HoSoDaKiemTra        = value.HoSoDaKiemTra;
                thongTinHoSoEntity.HoSoKhongHopLy       = value.HoSoKhongHopLy;
                thongTinHoSoEntity.RootId               = value.RootId;
                UserLog userLog = new UserLog();
                userLog.NguoiDungId              = new int?(GlobalVariable.NguoiDungId);
                userLog.NgayChinhSua             = new DateTime?(dateNow);
                userLog.LogHistory               = value.LichSuCapNhat;
                thongTinHoSoEntity.LichSuCapNhat = JsonConvert.SerializeObject(userLog);
                List <string> list = new List <string>();
                bool          flag = value.ThongTinChiTiet.ListGiayChungNhan != null;
                if (flag)
                {
                    foreach (GiayChungNhan current in value.ThongTinChiTiet.ListGiayChungNhan)
                    {
                        bool flag2 = !string.IsNullOrEmpty(current.SoSerial);
                        if (flag2)
                        {
                            list.Add(current.SoSerial);
                        }
                    }
                }
                thongTinHoSoEntity.SoHieuGiayChungNhan = string.Join(" ", list);
                list = new List <string>();
                List <string> list2 = new List <string>();
                bool          flag3 = value.ThongTinChiTiet.ListChu != null;
                if (flag3)
                {
                    foreach (ChuSuDung current2 in value.ThongTinChiTiet.ListChu)
                    {
                        bool flag4 = !string.IsNullOrEmpty(current2.HoTen);
                        if (flag4)
                        {
                            list.Add(current2.HoTen);
                        }
                        bool flag5 = !string.IsNullOrEmpty(current2.SoGiayTo);
                        if (flag5)
                        {
                            list2.Add(current2.SoGiayTo);
                        }
                    }
                }
                thongTinHoSoEntity.HoTen    = string.Join(" ", list);
                thongTinHoSoEntity.SoGiayTo = string.Join(" ", list2);
                list  = new List <string>();
                list2 = new List <string>();
                List <string> list3 = new List <string>();
                bool          flag6 = value.ThongTinChiTiet.ListThua != null;
                if (flag6)
                {
                    foreach (ThuaDat current3 in value.ThongTinChiTiet.ListThua)
                    {
                        bool flag7 = !list.Contains(current3.SoThuTuThua);
                        if (flag7)
                        {
                            list.Add(current3.SoThuTuThua);
                        }
                        bool flag8 = !list2.Contains(current3.SoHieuToBanDo);
                        if (flag8)
                        {
                            list2.Add(current3.SoHieuToBanDo);
                        }
                    }
                }
                thongTinHoSoEntity.SoThuTuThua    = string.Join(" ", list);
                thongTinHoSoEntity.SoHieuToBanDo  = string.Join(" ", list2);
                thongTinHoSoEntity.GhiChu         = value.GhiChu;
                thongTinHoSoEntity.LoaiBienDongId = value.LoaiBienDongId;
                bool isNew = value.IsNew;
                if (isNew)
                {
                    thongTinHoSoEntity.HoSoMoiNhat = true;
                }
                else
                {
                    thongTinHoSoEntity.HoSoMoiNhat = value.LaHoSoMoiNhat;
                }
                thongTinHoSoEntity.NguoiDungId = new int?(GlobalVariable.NguoiDungId);
                thongTinHoSoEntity.ChiTietHoSo = JsonConvert.SerializeObject(value.ThongTinChiTiet);
                thongTinHoSoEntity.KhoaChaId   = value.KhoaChaId;
                value.ThongTinHoSoId           = ManageBase.SaveThongTinHoSo(thongTinHoSoEntity);
                value.IsSuccess    = true;
                value.NguoiCapNhat = GlobalVariable.HoTenNguoiDung;
                bool flag9 = string.IsNullOrEmpty(value.NguoiCapNhat);
                if (flag9)
                {
                    value.NguoiCapNhat = GlobalVariable.TenDangNhap;
                }
                value.NgayChinhSua  = new DateTime?(dateNow);
                value.LichSuCapNhat = userLog;
                value.LaHoSoMoiNhat = thongTinHoSoEntity.HoSoMoiNhat;
                bool flag10 = value.IsNew && value.KhoaChaId.HasValue;
                if (flag10)
                {
                    ManageBase.Update(new ThongTinHoSoEntity
                    {
                        HoSoMoiNhat = false,
                        NguoiDungId = new int?(GlobalVariable.NguoiDungId)
                    }, new RelationPredicateBucket
                    {
                        PredicateExpression =
                        {
                            ThongTinHoSoFields.ThongTinHoSoId == value.KhoaChaId
                        }
                    });
                }
                value.IsNew = false;
            }
            catch (Exception var_27_4C1)
            {
                result = false;
            }
            return(result);
        }