public bool ThemTaiKhoan(string TenDangNhap, string MatKhau, string HoTen, string MaQuyen, string NguoiQuanLy, string NgayTao, string ChucVu, string PhongBan, string DiaChi, string DienThoai) { try { tblUser newUser = new tblUser(); newUser.TenDangNhap = TenDangNhap; newUser.MatKhau = mahoa.GetMD5(MatKhau); newUser.TenDayDu = HoTen; if (MaQuyen != "") { newUser.MaQuyen = int.Parse(MaQuyen); } if (NguoiQuanLy != "") { newUser.NguoiQuanLy = int.Parse(NguoiQuanLy); } if (NgayTao != "") { newUser.NgayTaoUser = Convert.ToDateTime(NgayTao); } newUser.ChucVu = ChucVu; newUser.PhongBan = PhongBan; newUser.DiaChi = DiaChi; newUser.SoDienThoai = DienThoai; db.tblUsers.Add(newUser); db.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool ThemXacNhanCoQuanDangKy(string MaHoSo, string NgayKiemtra, string NguoiKiemTra, string ChucVuNguoiKiemTra, string NoiDungYKien, string GhiChu, string NgayKy, string GiamDoc) { try { tblXacNhanCoQuanDangKyDatDai kq = new tblXacNhanCoQuanDangKyDatDai(); kq.MaHoSo = long.Parse(MaHoSo); kq.NgayKiemTra = Convert.ToDateTime(NgayKiemtra); kq.NguoiKiemTra = NguoiKiemTra; kq.ChucVuNguoiKiemTra = ChucVuNguoiKiemTra; kq.NoiDungYKien = NoiDungYKien; kq.GhiChu = GhiChu; if (NgayKy.Trim() != "") { kq.NgayKy = Convert.ToDateTime(NgayKy); } kq.GiamDoc = GiamDoc; db.tblXacNhanCoQuanDangKyDatDais.Add(kq); db.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool TaoXacNhanCapCoSo(string MaHoSo, string NoiDungKeKhaiSoVoiHienTai, string NguonGocSuDungDat, string ThoiDiemSuDungDatVaoMucDichDangKy, string ThoiDiemTaoLapTaiSanGanLienVoiDat, string TinhTrangTranhChapDatDaiVaTaiSan, string SuPhuHopVoiQuyHoachSuDungDatVaQuyHoachXayDung, string NoiDungKhac, string DiaChinh_NgayXacNhan, string UBND_NgayXacNhan, string DiaChinh_TieuDeKy, string UBND_TieuDeKy, string DiaChinh_NguoiKy, string UBND_NguoiKy) { try { tblXacNhanCapCoSo xacnhan = new tblXacNhanCapCoSo(); xacnhan.MaHoSo = long.Parse(MaHoSo); xacnhan.NoiDungKeKhaiSoVoiHienTrang = NoiDungKeKhaiSoVoiHienTai; xacnhan.NguonGocSuDungDat = NguonGocSuDungDat; xacnhan.ThoiDiemSuDungDatVaoMucDichDangKy = Convert.ToDateTime(ThoiDiemSuDungDatVaoMucDichDangKy); xacnhan.ThoiDiemTaoLapTaiSanGanLienVoiDat = Convert.ToDateTime(ThoiDiemTaoLapTaiSanGanLienVoiDat); xacnhan.TinhTrangTranhChapDatDaiVaTaiSan = TinhTrangTranhChapDatDaiVaTaiSan; xacnhan.SuPhuHopVoiQuyHoachSuDungDatVaQuyHoachXayDung = SuPhuHopVoiQuyHoachSuDungDatVaQuyHoachXayDung; xacnhan.NoiDungKhac = NoiDungKhac; xacnhan.DiaChinh_NgayXacNhan = Convert.ToDateTime(DiaChinh_NgayXacNhan); xacnhan.UBND_NgayKy = Convert.ToDateTime(UBND_NgayXacNhan); xacnhan.DiaChinh_TieuDeKy = DiaChinh_TieuDeKy; xacnhan.UBND_TieuDeKy = UBND_TieuDeKy; xacnhan.DiaChinh_CanBo = DiaChinh_NguoiKy; xacnhan.UBND_NguoiKy = UBND_NguoiKy; db.tblXacNhanCapCoSoes.Add(xacnhan); db.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool TaoXacNhanCapCoSo(string MaDangKyBienDong, string NoiDungXacNhan, string NoiDungKhac, string DiaChinh_NgayXacNhan, string UBND_NgayXacNhan, string DiaChinh_TieuDeKy, string UBND_TieuDeKy, string DiaChinh_NguoiKy, string UBND_NguoiKy) { try { long _maBD = long.Parse(MaDangKyBienDong); tblXacNhanCapCoSoVeBienDong xacnhan = new tblXacNhanCapCoSoVeBienDong(); xacnhan.MaDangKyBienDong = _maBD; xacnhan.NoiDungXacNhan = NoiDungXacNhan; xacnhan.NoiDungKhac = NoiDungKhac; xacnhan.DiaChinh_NgayXacNhan = Convert.ToDateTime(DiaChinh_NgayXacNhan); xacnhan.UBND_NgayKy = Convert.ToDateTime(UBND_NgayXacNhan); xacnhan.DiaChinh_TieuDeKy = DiaChinh_TieuDeKy; xacnhan.UBND_TieuDeKy = UBND_TieuDeKy; xacnhan.DiaChinh_CanBo = DiaChinh_NguoiKy; xacnhan.UBND_NguoiKy = UBND_NguoiKy; db.tblXacNhanCapCoSoVeBienDongs.Add(xacnhan); db.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool ThemNhaO(string TenLoaiNha) { try{ tblLoaiNhaO_CongTrinh loainhamoi = new tblLoaiNhaO_CongTrinh(); loainhamoi.Ten = TenLoaiNha; db.tblLoaiNhaO_CongTrinh.Add(loainhamoi); db.SaveChanges(); return(true); } catch (Exception ex) { return(false); } }
public int TaoDonMoi(string MaDVHC) { int i = 0; try { tblHoSoKeKhaiDuBi hsNew = new tblHoSoKeKhaiDuBi(); hsNew.DonViHanhChinh = MaDVHC; db.tblHoSoKeKhaiDuBis.Add(hsNew); db.SaveChanges(); i = Convert.ToInt32(hsNew.MaHoSoKeKhai); } catch (Exception ex) { } return(i); }