protected void btnUpdate_Click(object sender, EventArgs e)
 {
     ClaimDTO cldto = new ClaimDTO();
     cldto.MaClaim=Session["ThamChieu"].ToString();
     cldto.TenClaim = txtTenClaim.Text;
     string fr = txtDateFR.Text.Trim();
     if (fr != "")
         cldto.BaoCaoTruocFR = fr;
     else
         cldto.BaoCaoTruocFR = "";
     string thiethaihoply = txtTonThatHopLy.Text;
     if (thiethaihoply != "")
         cldto.ThietHaiHopLy = thiethaihoply;
     else
         cldto.ThietHaiHopLy = "";
     string tonthathople = txtThuocPhamViBH.Text;
     if (tonthathople != "")
         cldto.TonThatHopLe = tonthathople;
     else
         cldto.TonThatHopLe = "";
     string gtthuhoi = txtTruGiaTriThuHoi.Text;
     if (gtthuhoi != "")
         cldto.TruGiaTriThuHoi = gtthuhoi;
     else
         cldto.TruGiaTriThuHoi = "";
     string trumienthuong = txtTruMucMienThuong.Text;
     if (trumienthuong != "")
         cldto.TruMienThuong = trumienthuong;
     else
         cldto.TruMienThuong = "";
     string tamung = txtTamUngBT.Text;
     if (tamung != "")
         cldto.TamUngBoiThuong = tamung;
     else
         cldto.TamUngBoiThuong = "Không tạm ứng";
     string boithuong = txtDeXuatBoiThuong.Text;
     if (boithuong != "")
         cldto.BoiThuong = boithuong;
     else
         cldto.BoiThuong = "";
     bool up = cl.UpdateInfoFR(cldto);
     if (up == true)
     {
         sm.CapNhatInfoBasicFR(cldto);
         int maGDV = int.Parse(Request.Cookies["MaGDV"].Value);
         string noidung = gdv.LayTenTheoMa(maGDV) + " edited cover final report of case " + txtTenClaim.Text + " .";
         SaveLogTracking(maGDV, noidung, txtTenClaim.Text);
         Response.Write("<script>parent.closeDialog();</script>");
         Response.Write("<script>parent.reloaData();</script>");
     }
     else
     {
         sm.CapNhatInfoBasicFR(cldto);
         int maGDV = int.Parse(Request.Cookies["MaGDV"].Value);
         string noidung = gdv.LayTenTheoMa(maGDV) + " falied to edit cover final report of case " + txtTenClaim.Text + " .";
         SaveLogTracking(maGDV, noidung, txtTenClaim.Text);
         Response.Write("<script> alert('Error Update!');</script>");
     }
 }
Exemple #2
0
        public bool InsertShort(ClaimDTO cl)
        {
            string sql = "sp_Claim_SortInsert";
            List<SqlParameter> ds = new List<SqlParameter>();

            SqlParameter ma = new SqlParameter("@maclaim", SqlDbType.VarChar);
            ma.Value = cl.MaClaim;
            ds.Add(ma);

            SqlParameter ten = new SqlParameter("@tenclaim", SqlDbType.NVarChar);
            ten.Value = cl.TenClaim;
            ds.Add(ten);

            SqlParameter madonvi = new SqlParameter("@madv", SqlDbType.Int);
            madonvi.Value = cl.MaDonVi;
            ds.Add(madonvi);

            SqlParameter maGDV1 = new SqlParameter("@idgdv", SqlDbType.Int);
            maGDV1.Value = cl.MaGDV1;
            ds.Add(maGDV1);

            SqlParameter maKH = new SqlParameter("@maKH", SqlDbType.Int);
            maKH.Value = cl.MaKhachHang;
            ds.Add(maKH);

            SqlParameter maloaihinhtonthat = new SqlParameter("@maloaihinhtonthat", SqlDbType.Int);
            maloaihinhtonthat.Value = cl.MaloaiHinhTonThat;
            ds.Add(maloaihinhtonthat);

            SqlParameter ghichu = new SqlParameter("@note", SqlDbType.NVarChar);
            ghichu.Value = cl.GhiChu;
            ds.Add(ghichu);

            SqlParameter chidinh = new SqlParameter("@dateasigned", SqlDbType.VarChar);
            chidinh.Value = cl.AssignedDate;
            ds.Add(chidinh);
            return SqlDataAcessHelper.exNonStoreParas(sql, ds);
        }
Exemple #3
0
 public DataRow GetInfoPRIRFR(string maclaim)
 {
     ClaimDTO cl = new ClaimDTO();
     string sql = "sp_Claim_InforPRIRFR";
     List<SqlParameter> ds = new List<SqlParameter>();
     SqlParameter macl = new SqlParameter("@maclaim", SqlDbType.VarChar);
     macl.Value = maclaim;
     ds.Add(macl);
     DataTable dt = new DataTable();
     dt = SqlDataAcessHelper.exStoreParas(sql, ds);
     if (dt.Rows.Count > 0)
     {
         return dt.Rows[0];
     }
     return null;
 }
Exemple #4
0
        public bool CreateNew(ClaimDTO clm)
        {
            string sql = "sp_Claim_New";
            List<SqlParameter> list = new List<SqlParameter>();

            SqlParameter ma = new SqlParameter("@ma", SqlDbType.VarChar);
            ma.Value = clm.MaClaim;
            list.Add(ma);

            SqlParameter ten = new SqlParameter("@ten", SqlDbType.VarChar);
            ten.Value = clm.TenClaim;
            list.Add(ten);

            SqlParameter maGDV = new SqlParameter("@maGDV", SqlDbType.Int);
            maGDV.Value = clm.MaGDV1;
            list.Add(maGDV);
            SqlParameter maDV = new SqlParameter("@maDVBH", SqlDbType.Int);
            maDV.Value = clm.MaDonVi;
            list.Add(maDV);

            SqlParameter handler = new SqlParameter("@nguoiphutrach", SqlDbType.NVarChar);
            handler.Value = clm.NguoiPhuTrach;
            list.Add(handler);

            SqlParameter maKH = new SqlParameter("@idkh", SqlDbType.Int);
            maKH.Value = clm.MaKhachHang;
            list.Add(maKH);

            SqlParameter policy = new SqlParameter("@policyno", SqlDbType.NVarChar);
            policy.Value = clm.PolicyNo;
            list.Add(policy);

            SqlParameter effecive = new SqlParameter("@effective", SqlDbType.NVarChar);
            effecive.Value = clm.Effective;
            list.Add(effecive);

            SqlParameter idtypeofloss = new SqlParameter("@idtypeofloss", SqlDbType.Int);
            idtypeofloss.Value = clm.MaloaiHinhTonThat;
            list.Add(idtypeofloss);

            SqlParameter note = new SqlParameter("@note", SqlDbType.NVarChar);
            note.Value = clm.GhiChu;
            list.Add(note);

            SqlParameter dateofloss = new SqlParameter("@dateofloss", SqlDbType.VarChar);
            dateofloss.Value = clm.Dol;
            list.Add(dateofloss);

            SqlParameter premises = new SqlParameter("@premises", SqlDbType.NVarChar);
            premises.Value = clm.Premises;
            list.Add(premises);

            SqlParameter assigeddate = new SqlParameter("@assigeddate", SqlDbType.VarChar);
            assigeddate.Value = clm.AssignedDate;
            list.Add(assigeddate);

            SqlParameter typepo = new SqlParameter("@typepolicy", SqlDbType.VarChar);
            typepo.Value = clm.TypePolicy;
            list.Add(typepo);

            SqlParameter dienbientt = new SqlParameter("@dienbientonthat", SqlDbType.NVarChar);
            dienbientt.Value = clm.DienBienTonThat1;
            list.Add(dienbientt);
            SqlParameter thongbaoCQCN = new SqlParameter("@thongbaoCQCN", SqlDbType.NVarChar);
            thongbaoCQCN.Value = clm.ThongBaoCQCN1;
            list.Add(thongbaoCQCN);
            SqlParameter ghichuTBCQCN = new SqlParameter("@ghichuTBCQCN",SqlDbType.NVarChar);
            ghichuTBCQCN.Value = clm.GhiChuTBCQCN;
            list.Add(ghichuTBCQCN);
            SqlParameter phamviTT = new SqlParameter("@phamvitonthat", SqlDbType.NVarChar);
            phamviTT.Value = clm.PhamViTonThat;
            list.Add(phamviTT);
            SqlParameter duphong = new SqlParameter("@duphongtonthat",SqlDbType.NVarChar);
            duphong.Value = clm.DuPhongTonThat;
            list.Add(duphong);
            SqlParameter phulucdinhkem = new SqlParameter("@phulucdinhkem",SqlDbType.NVarChar);
            phulucdinhkem.Value = clm.PhuLucDinhKem1;
            list.Add(phulucdinhkem);
            SqlParameter dephongvakhuyencao = new SqlParameter("@dephongvakhuyencao",SqlDbType.NVarChar);
            dephongvakhuyencao.Value = clm.DePhongVaKhuyenCao;
            list.Add(dephongvakhuyencao);
            SqlParameter ykiengdv = new SqlParameter("@ykienGDV", SqlDbType.NVarChar);
            ykiengdv.Value = clm.YKienGDV;
            list.Add(ykiengdv);
            SqlParameter giokhaosat = new SqlParameter("@giokhaosat",SqlDbType.NVarChar);
            giokhaosat.Value = clm.GioKhaoSatHienTruong;
            list.Add(giokhaosat);
            SqlParameter follower = new SqlParameter("@follower", SqlDbType.NVarChar);
            follower.Value = clm.Follower;
            list.Add(follower);
            bool kq = SqlDataAcessHelper.exNonStoreParas(sql, list);
            return kq;
        }
Exemple #5
0
        public bool UpdateInfoPRIRFR(ClaimDTO cl, KhachHangDTO kh)
        {
            bool kq = false;
            string sql = "sp_Claim_InforPRIRFR_Update";
            List<SqlParameter> ds = new List<SqlParameter>();
            SqlParameter ma = new SqlParameter("@maclaim", SqlDbType.VarChar);
            ma.Value = cl.MaClaim;
            ds.Add(ma);

            SqlParameter date = new SqlParameter("@dateILA", SqlDbType.NVarChar);
            date.Value = cl.ILADATE;
            ds.Add(date);

            SqlParameter pono = new SqlParameter("@policyno", SqlDbType.NVarChar);
            pono.Value = cl.PolicyNo;
            ds.Add(pono);
            SqlParameter dol = new SqlParameter("@dol", SqlDbType.NVarChar);
            dol.Value = cl.Dol;
            ds.Add(dol);
            SqlParameter sc = new SqlParameter("@sortcause", SqlDbType.NVarChar);
            sc.Value = cl.SortCause;
            ds.Add(sc);

            SqlParameter pv = new SqlParameter("@phamvitt", SqlDbType.NVarChar);
            pv.Value = cl.PhamViTonThat;
            ds.Add(pv);

            SqlParameter napo = new SqlParameter("@namepolicy", SqlDbType.NVarChar);
            napo.Value = cl.NamePolicy;
            ds.Add(napo);

            SqlParameter sum = new SqlParameter("@suminsured", SqlDbType.NVarChar);
            sum.Value = cl.SumInsured;
            ds.Add(sum);

            SqlParameter eff = new SqlParameter("@effective", SqlDbType.NVarChar);
            eff.Value = cl.Effective;
            ds.Add(eff);

            SqlParameter deduc = new SqlParameter("@deductible", SqlDbType.NVarChar);
            deduc.Value = cl.MucMienThuong;
            ds.Add(deduc);

            SqlParameter dkbs = new SqlParameter("@dkbs", SqlDbType.NVarChar);
            dkbs.Value = cl.DKBS;
            ds.Add(dkbs);

            SqlParameter kn = new SqlParameter("@khieunai", SqlDbType.NVarChar);
            kn.Value = cl.KhieuNai;
            ds.Add(kn);

            SqlParameter duphong = new SqlParameter("@duphongboithuong", SqlDbType.NVarChar);
            duphong.Value = cl.DuPhongBoiThuong;
            ds.Add(duphong);

            SqlParameter makh = new SqlParameter("@makhachhang", SqlDbType.Int);
            makh.Value = kh.MaKhachHang;
            ds.Add(makh);

            SqlParameter trade = new SqlParameter("@trade", SqlDbType.NVarChar);
            trade.Value = kh.LinhVucKinhDoanh;
            ds.Add(trade);
            kq = SqlDataAcessHelper.exNonStoreParas(sql, ds);
            return kq;
        }
Exemple #6
0
        public bool UpdateInfoFR(ClaimDTO cl)
        {
            string sql = "sp_Claim_UpdateBasicFR";
            List<SqlParameter> ds = new List<SqlParameter>();
            SqlParameter ma = new SqlParameter("@maclaim", SqlDbType.VarChar);
            ma.Value = cl.MaClaim;
            ds.Add(ma);

            SqlParameter date = new SqlParameter("@datefr", SqlDbType.NVarChar);
            date.Value = cl.BaoCaoTruocFR;
            ds.Add(date);

            SqlParameter thhl = new SqlParameter("@thiethaihoply", SqlDbType.NVarChar);
            thhl.Value = cl.ThietHaiHopLy;
            ds.Add(thhl);

            SqlParameter tthl = new SqlParameter("@tonthathople", SqlDbType.NVarChar);
            tthl.Value = cl.TonThatHopLe;
            ds.Add(tthl);

            SqlParameter trugtthuhoi = new SqlParameter("@trugiatrithuhoi", SqlDbType.NVarChar);
            trugtthuhoi.Value = cl.TruGiaTriThuHoi;
            ds.Add(trugtthuhoi);

            SqlParameter trumienthuong = new SqlParameter("@trumienthuong", SqlDbType.NVarChar);
            trumienthuong.Value = cl.TruMienThuong;
            ds.Add(trumienthuong);

            SqlParameter tamung = new SqlParameter("@tamungboithuong", SqlDbType.NVarChar);
            tamung.Value = cl.TamUngBoiThuong;
            ds.Add(tamung);

            SqlParameter boithuong = new SqlParameter("@boithuong", SqlDbType.NVarChar);
            boithuong.Value = cl.BoiThuong;
            ds.Add(boithuong);
            return SqlDataAcessHelper.exNonStoreParas(sql, ds);
        }
Exemple #7
0
        public bool UpdateInfo(ClaimDTO cl, KhachHangDTO kh)
        {
            bool kq = false;
            string sql = "sp_Claim_KhachHang_UpdateInfo";
            List<SqlParameter> ds = new List<SqlParameter>();
            SqlParameter ma = new SqlParameter("@idclaim", SqlDbType.VarChar);
            ma.Value = cl.MaClaim;
            ds.Add(ma);
            SqlParameter tenclaim = new SqlParameter("@tenclaim", SqlDbType.VarChar);
            tenclaim.Value = cl.TenClaim;
            ds.Add(tenclaim);

            SqlParameter pres = new SqlParameter("@presmises", SqlDbType.NVarChar);
            pres.Value = cl.Premises;
            ds.Add(pres);
            SqlParameter pono = new SqlParameter("@policyno", SqlDbType.NVarChar);
            pono.Value = cl.PolicyNo;
            ds.Add(pono);
            SqlParameter eff = new SqlParameter("@effective", SqlDbType.NVarChar);
            eff.Value = cl.Effective;
            ds.Add(eff);

            SqlParameter typo = new SqlParameter("@typepolicy", SqlDbType.VarChar);
            typo.Value = cl.TypePolicy;
            ds.Add(typo);
            SqlParameter dol = new SqlParameter("@dateofloss", SqlDbType.VarChar);
            dol.Value = cl.Dol;
            ds.Add(dol);

            SqlParameter tenndbh = new SqlParameter("@ndbh",SqlDbType.NVarChar);
            tenndbh.Value= kh.TenKhachHang;
            ds.Add(tenndbh);
            SqlParameter nguoilienhe = new SqlParameter("@contactpersonkh", SqlDbType.NVarChar);
            nguoilienhe.Value = kh.TenNguoiDaiDien;
            ds.Add(nguoilienhe);
            SqlParameter fax = new SqlParameter("@faxkh", SqlDbType.VarChar);
            fax.Value = kh.Fax;
            ds.Add(fax);
            SqlParameter dienthoai = new SqlParameter("@dienthoaikh", SqlDbType.VarChar);
            dienthoai.Value = kh.DienThoai;
            ds.Add(dienthoai);
            SqlParameter email = new SqlParameter("@emailkh", SqlDbType.VarChar);
            email.Value = kh.Email; ;
            ds.Add(email);
            SqlParameter diachi = new SqlParameter("@diachikh", SqlDbType.NVarChar);
            diachi.Value = kh.DiaChi;
            ds.Add(diachi);
            kq = SqlDataAcessHelper.exNonStoreParas(sql, ds);
            return kq;
        }
Exemple #8
0
        public bool CapNhatBaoCaoSoBo(ClaimDTO cl )
        {
            string sql= "sp_CapNhatClaimTuBaoCaoSoBo";
            List<SqlParameter> ds = new List<SqlParameter>();
            SqlParameter thamChieu = new SqlParameter("@thamchieu", SqlDbType.VarChar);
            thamChieu.Value = cl.TenClaim;
            ds.Add(thamChieu);
            SqlParameter thamchieuKH = new SqlParameter("@thamchieuKH", SqlDbType.VarChar);
            thamchieuKH.Value = cl.ThamChieuKhachHang;
            ds.Add(thamchieuKH);

            //SqlParameter soHDBH = new SqlParameter("@soHDBH", SqlDbType.NVarChar);
            //soHDBH.Value = cl.SoHDBH;
            //ds.Add(soHDBH);

            SqlParameter diadiem = new SqlParameter("@diadiemtonthat", SqlDbType.NVarChar);
            diadiem.Value = cl.DiaDiemTonThat;
            ds.Add(diadiem);

            SqlParameter ngaytonthat = new SqlParameter("@ngaytonthat", SqlDbType.VarChar);
            ngaytonthat.Value = cl.NgayTonThat;
            ds.Add(ngaytonthat);

            SqlParameter nguyennhan = new SqlParameter("@nguyennhan", SqlDbType.NVarChar);
            nguyennhan.Value = cl.NguyenNhan;
            ds.Add(nguyennhan);

            SqlParameter phamvi = new SqlParameter("@phamvitonthat", SqlDbType.NVarChar);
            phamvi.Value = cl.PhamViTonThat;
            ds.Add(phamvi);

            SqlParameter thongtin = new SqlParameter("@thongtinhdbh", SqlDbType.NVarChar);
            thongtin.Value = cl.ThongTinHDBH;
            ds.Add(thongtin);

            SqlParameter dieukhoan = new SqlParameter("@dieukhoanbosung", SqlDbType.NVarChar);
            dieukhoan.Value = cl.DieuKhoanBoSung;
            ds.Add(dieukhoan);

            SqlParameter khieuNai = new SqlParameter("@khieunaindbh", SqlDbType.NVarChar);
            khieuNai.Value = cl.KhieuNaiCuaNDBH;
            ds.Add(khieuNai);

            SqlParameter duphong = new SqlParameter("@duphongboithuong", SqlDbType.NVarChar);
            duphong.Value = cl.DuPhongBoiThuong;
            ds.Add(duphong);

            SqlParameter dienbien = new SqlParameter("@dienbienchitiet", SqlDbType.NVarChar);
            dienbien.Value = cl.DienBienChiTiet;
            ds.Add(dienbien);

            SqlParameter gioithieu = new SqlParameter("@gioithieuchung", SqlDbType.NVarChar);
            gioithieu.Value = cl.GioiThieuChung;
            ds.Add(gioithieu);

            SqlParameter ngayBC = new SqlParameter("@ngaybaocaosobo", SqlDbType.VarChar);
            ngayBC.Value = cl.NgayBCSB;
            ds.Add(ngayBC);

            SqlParameter NguoiDuocBH = new SqlParameter("@ndbh", SqlDbType.NVarChar);
            NguoiDuocBH.Value = cl.NDBH;
            ds.Add(NguoiDuocBH);

            SqlParameter Nguyennhan = new SqlParameter("@nguyennhanchitiet", SqlDbType.NVarChar);
            Nguyennhan.Value = cl.NguyenNhanChiTiet;
            ds.Add(Nguyennhan);

            SqlParameter PhamviBH = new SqlParameter("@phamvibh", SqlDbType.NVarChar);
            PhamviBH.Value = cl.PhamViBH;
            ds.Add(PhamviBH);

            SqlParameter Phamvivamucdothiethai = new SqlParameter("@phamvivamucdothiethai", SqlDbType.NVarChar);
            Phamvivamucdothiethai.Value = cl.PhamViMucDoThietHai;
            ds.Add(Phamvivamucdothiethai);

            SqlParameter DonBHKhac = new SqlParameter("@donbhkhac", SqlDbType.NVarChar);
            DonBHKhac.Value = cl.DonBHKhac;
            ds.Add(DonBHKhac);

            SqlParameter Giatrithuhoi = new SqlParameter("@giatrithuhoi", SqlDbType.NVarChar);
            Giatrithuhoi.Value = cl.GiaTriThuHoi;
            ds.Add(Giatrithuhoi);

            SqlParameter Duphongboithuongchitiet = new SqlParameter("@duphongboithuongchitiet", SqlDbType.NVarChar);
            Duphongboithuongchitiet.Value = cl.DuPhongBoiThuongChiTiet;
            ds.Add(Duphongboithuongchitiet);

            bool kq = SqlDataAcessHelper.exNonStoreParas(sql, ds);
            return kq;
        }
Exemple #9
0
        public bool CapNhatBaoCaoCuoiCung(ClaimDTO cl)
        {
            string sql="sp_CapNhatBaoCaoCuoiCung";
            List<SqlParameter> ds = new List<SqlParameter>();
            SqlParameter ten = new SqlParameter("@thamchieu", SqlDbType.VarChar);
            ten.Value = cl.TenClaim;
            ds.Add(ten);
            SqlParameter thamChieuKH = new SqlParameter("@thamchieuKH", SqlDbType.NVarChar);
            thamChieuKH.Value = cl.ThamChieuKhachHang;
            ds.Add(thamChieuKH);
            SqlParameter diadiemtt = new SqlParameter("@diadiemtonthat", SqlDbType.NVarChar);
            diadiemtt.Value = cl.DiaDiemTonThat;
            ds.Add(diadiemtt);
            SqlParameter ngaytonthat = new SqlParameter("@ngaytonthat", SqlDbType.VarChar);
            ngaytonthat.Value = cl.NgayTonThat;
            ds.Add(ngaytonthat);
            SqlParameter nguyennhan = new SqlParameter("@nguyennhan", SqlDbType.NVarChar);
            nguyennhan.Value = cl.NguyenNhan;
            ds.Add(nguyennhan);

            SqlParameter phamvitonthat = new SqlParameter("@phamvitonthat", SqlDbType.NVarChar);
            phamvitonthat.Value = cl.PhamViTonThat;
            ds.Add(phamvitonthat);
            SqlParameter thongtinndbh = new SqlParameter("@thongtinhdbh", SqlDbType.NVarChar);
            thongtinndbh.Value = cl.ThongTinHDBH;
            ds.Add(thongtinndbh);
            SqlParameter dieukhoanbosung = new SqlParameter("@dieukhoanbosung", SqlDbType.NVarChar);
            dieukhoanbosung.Value = cl.DieuKhoanBoSung;
            ds.Add(dieukhoanbosung);
            SqlParameter khieunai = new SqlParameter("@khieunai", SqlDbType.NVarChar);
            khieunai.Value = cl.KhieuNaiCuaNDBH;
            ds.Add(khieunai);
            SqlParameter tinhtoantonthat = new SqlParameter("@tinhtoantonthat", SqlDbType.NVarChar);
            tinhtoantonthat.Value = cl.TonThatTinhToan;
            ds.Add(tinhtoantonthat);
            SqlParameter trugiatrithuhoi= new SqlParameter("@trugiatrithuhoi", SqlDbType.NVarChar);
            trugiatrithuhoi.Value = cl.TruGiaTriThuHoi;
            ds.Add(trugiatrithuhoi);

            SqlParameter trumucmienthuong = new SqlParameter("@trumucmienthuong", SqlDbType.NVarChar);
            trumucmienthuong.Value = cl.TruMucMienThuong;
            ds.Add(trumucmienthuong);

            SqlParameter sotienboithuong = new SqlParameter("@sotienboithuong", SqlDbType.NVarChar);
            sotienboithuong.Value = cl.SoTienBoiThuong;
            ds.Add(sotienboithuong);

            SqlParameter tomtatvuviec = new SqlParameter("@tomtatvuviec", SqlDbType.NVarChar);
            tomtatvuviec.Value = cl.TomTatVuViec;
            ds.Add(tomtatvuviec);
            SqlParameter nguyennhanchitiet = new SqlParameter("@nguyennhanchitiet", SqlDbType.NVarChar);
            nguyennhanchitiet.Value = cl.NguyenNhanChiTiet;
            ds.Add(nguyennhanchitiet);
            SqlParameter phamvibh = new SqlParameter("@phamvibaohiem", SqlDbType.NVarChar);
            phamvibh.Value = cl.PhamViBH;
            ds.Add(phamvibh);
            SqlParameter dienbienchitiet = new SqlParameter("@dienbienchitiet", SqlDbType.NVarChar);
            dienbienchitiet.Value = cl.DienBienChiTiet;
            ds.Add(dienbienchitiet);

            SqlParameter tinhtoangiatrithiethai = new SqlParameter("@tinhtoangiatrithiethai", SqlDbType.NVarChar);
            tinhtoangiatrithiethai.Value = cl.TinhToanGiaTriThietHai;
            ds.Add(tinhtoangiatrithiethai);

            SqlParameter giatrithuhoict = new SqlParameter("@giatrithuhoichitiet", SqlDbType.NVarChar);
            giatrithuhoict.Value = cl.GiaTriThuHoiChiTiet;
            ds.Add(giatrithuhoict);

            SqlParameter dexuatboithuongchitiet = new SqlParameter("@dexuatboithuong", SqlDbType.NVarChar);
            dexuatboithuongchitiet.Value = cl.DeXuatBoiThuongChiTiet;
            ds.Add(dexuatboithuongchitiet);

            SqlParameter ketluan = new SqlParameter("@ketluan", SqlDbType.NVarChar);
            ketluan.Value = cl.KetLuan;
            ds.Add(ketluan);

            SqlParameter ngaybaocao = new SqlParameter("@ngaybaocaocc", SqlDbType.VarChar);
            ngaybaocao.Value = cl.NgayBCCC;
            ds.Add(ngaybaocao);

            bool kq = SqlDataAcessHelper.exNonStoreParas(sql, ds);
            return kq;
        }
Exemple #10
0
        public bool UpdateBasicInforNotInsurer(ClaimDTO cl)
        {
            string sql = "sp_Claim_UpdateBasicInforNotInsure";
            List<SqlParameter> ds = new List<SqlParameter>();
            SqlParameter ma = new SqlParameter("@maclaim", SqlDbType.VarChar);
            ma.Value =cl.MaClaim ;
            ds.Add(ma);
            SqlParameter policy = new SqlParameter("@policy", SqlDbType.NVarChar);
            policy.Value = cl.PolicyNo;
            ds.Add(policy);
            SqlParameter hieuluc = new SqlParameter("@hieuluc", SqlDbType.NVarChar);
            hieuluc.Value = cl.Effective;
            ds.Add(hieuluc);
            SqlParameter ddtt = new SqlParameter("@premises", SqlDbType.NVarChar);
            ddtt.Value = cl.Premises;
            ds.Add(ddtt);
            SqlParameter dol = new SqlParameter("@dol", SqlDbType.NVarChar);
            dol.Value = cl.Dol;
            ds.Add(dol);

            return SqlDataAcessHelper.exNonStoreParas(sql, ds);
        }
Exemple #11
0
 public DataRow LayInFoReportILA(string maclaim)
 {
     ClaimDTO cl = new ClaimDTO();
     string sql = "sp_Claim_SiteSurveyRecord";
     List<SqlParameter> ds = new List<SqlParameter>();
     SqlParameter macl = new SqlParameter("@idclaim", SqlDbType.VarChar);
     macl.Value = maclaim;
     ds.Add(macl);
     DataTable dt = new DataTable();
     dt = SqlDataAcessHelper.exStoreParas(sql, ds);
     if (dt.Rows.Count > 0)
     {
         return dt.Rows[0];
     }
     return null;
 }
 protected void loadClaim(string maclaim)
 {
     ClaimDTO cl = new ClaimDTO();
     cl = cldao.LayInFo(maclaim);
     lblThamChieuHead.Text = cl.TenClaim.ToString();
     txtReferencenumber.Text = cl.TenClaim.ToString();
     txtDateofloss.Text = cl.Dol.ToString();
     txtPremises.Text = cl.Premises.ToString();
     txtTypeOfloss.Text = cl.TypePolicy.ToString();
     txtbrief.Text = cl.TomTatVuViec.ToString();
     txtNote.Text = cl.GhiChu.ToString();
     txtPolicyNo.Text = cl.PolicyNo.ToString();
     txtEffective.Text = cl.Effective.ToString();
     txtA1.Text = cl.A1.ToString();
     txtA2.Text = cl.A2.ToString();
     txtC1.Text = cl.C1.ToString();
     txtC2.Text = cl.C2.ToString();
     txtC3.Text = cl.C3.ToString();
     txtE1.Text = cl.E1.ToString();
     txtE2.Text = cl.E2.ToString();
     txtG.Text = cl.G.ToString();
     txtH.Text = cl.H.ToString();
     txtI.Text = cl.I.ToString();
     txtK.Text = cl.K.ToString();
     ckDiscuss.Text = cl.Discuss.ToString();
     txtD1.Text = cl.D1.ToString();
     txtLossHistory.Text = cl.LossHistory.ToString();
     txtGioiThieu.Text = cl.GioiThieuNDBH.ToString();
 }
 protected void btnCapNhatInfoBasic_Click(object sender, EventArgs e)
 {
     KhachHangDTO khm1 = new KhachHangDTO();
         ClaimDTO clm1 = new ClaimDTO();
         string maclaim = cldao.LayMaTheoTen(lblThamChieuHead.Text);
         if (maclaim != null)
         {
             clm1.MaClaim = maclaim;
             clm1.TenClaim = txtReferencenumber.Text;
             clm1.Premises = txtPremises.Text;
             clm1.PolicyNo = txtPolicyNo.Text;
             clm1.Effective = txtEffective.Text;
             clm1.TypePolicy = txtTypeOfloss.Text;
             khm1.TenKhachHang = txtInsured.Text;
             khm1.TenNguoiDaiDien = txtContactPerson.Text;
             khm1.Fax = txtFaxno.Text;
             khm1.DienThoai = txtPhone.Text;
             khm1.Email = txtEmail.Text;
             khm1.DiaChi = txtAddress.Text;
             clm1.Dol = txtDateofloss.Text;
             bool up = cldao.UpdateInfo(clm1, khm1);
             if (up == true)
             {
                 string m=sm.CapNhatInfoBasic(clm1, khm1);
                 Response.Write("<script>alert('Updated!');</script>");
             }
         }
 }
Exemple #14
0
        public bool CapNhatBaoCaoDauTien(ClaimDTO cl)
        {
            string sql = "sp_Claim_updateBCDT";
            List<SqlParameter> ds = new List<SqlParameter>();
            SqlParameter ten = new SqlParameter("@tenclaim", SqlDbType.NVarChar);
            ten.Value = cl.TenClaim;
            ds.Add(ten);

            SqlParameter madonvi = new SqlParameter("@madonvi", SqlDbType.Int);
            madonvi.Value = cl.MaDonVi;
            ds.Add(madonvi);

            //SqlParameter soHDBH = new SqlParameter("@sohdbh", SqlDbType.NVarChar);
            //soHDBH.Value = cl.SoHDBH;
            //ds.Add(soHDBH);

            //SqlParameter hieuluc = new SqlParameter("@hieuluc", SqlDbType.NVarChar);
            //hieuluc.Value = cl.HieuLuc;
            //ds.Add(hieuluc);

            SqlParameter maKH = new SqlParameter("@maKH", SqlDbType.Int);
            maKH.Value = cl.MaKhachHang;
            ds.Add(maKH);

            SqlParameter maloaihinhtonthat = new SqlParameter("@maloaihinhtonthat", SqlDbType.Int);
            maloaihinhtonthat.Value = cl.MaloaiHinhTonThat;
            ds.Add(maloaihinhtonthat);

            SqlParameter diadiemtonthat = new SqlParameter("@diadiemtt", SqlDbType.NVarChar);
            diadiemtonthat.Value = cl.DiaDiemTonThat;
            ds.Add(diadiemtonthat);

            SqlParameter phamvitonthat = new SqlParameter("@phamvitt", SqlDbType.NVarChar);
            phamvitonthat.Value = cl.PhamViTonThat;
            ds.Add(phamvitonthat);

            //SqlParameter dienbientonthat = new SqlParameter("@dienbientonthat", SqlDbType.NVarChar);
            //dienbientonthat.Value = cl.DienBienTonThat;
            //ds.Add(dienbientonthat);

            //SqlParameter thongbaocqcn = new SqlParameter("@thongbaocqcn", SqlDbType.NVarChar);
            //thongbaocqcn.Value = cl.ThongBaoCQCN;
            //ds.Add(thongbaocqcn);

            SqlParameter ghichu = new SqlParameter("@ghichu", SqlDbType.NVarChar);
            ghichu.Value = cl.GhiChu;
            ds.Add(ghichu);
            SqlParameter maGDV1 = new SqlParameter("@magdv1", SqlDbType.Int);
            maGDV1.Value = cl.MaGDV1;
            ds.Add(maGDV1);

            SqlParameter ngaytonthat = new SqlParameter("@ngaytonthat", SqlDbType.VarChar);
            ngaytonthat.Value = cl.NgayTonThat;
            ds.Add(ngaytonthat);

            SqlParameter ngayBDGD = new SqlParameter("@ngaybatdaugiamdinh", SqlDbType.VarChar);
            ngayBDGD.Value = cl.NgayBatDauGiamDinh;
            ds.Add(ngayBDGD);

            //SqlParameter phulucdinhkem = new SqlParameter("@phulucdinhkem", SqlDbType.NVarChar);
            //phulucdinhkem.Value = cl.PhuLucDinhKem;
            //ds.Add(phulucdinhkem);

            SqlParameter uoctinhduphong = new SqlParameter("@uoctinhduphong", SqlDbType.NVarChar);
            uoctinhduphong.Value = cl.UocTinhDuPhong;
            ds.Add(uoctinhduphong);

            SqlParameter khuyencao = new SqlParameter("@khuyencaogiamdinhvien", SqlDbType.NVarChar);
            khuyencao.Value = cl.KhuyenCaoGDV;
            ds.Add(khuyencao);

            SqlParameter yKienGD = new SqlParameter("@ykienGD", SqlDbType.NVarChar);
            yKienGD.Value = cl.YKienGD;
            ds.Add(yKienGD);
            bool kq = SqlDataAcessHelper.exNonStoreParas(sql, ds);
            return kq;
        }
Exemple #15
0
        public bool UpdateClaimCover(ClaimDTO cl)
        {
            bool kq = false;
            string sql = "sp_Claim_CoverUpdate";
            List<SqlParameter> ds = new List<SqlParameter>();
            SqlParameter id = new SqlParameter("@idclaim", SqlDbType.VarChar);
            id.Value = cl.MaClaim;
            ds.Add(id);
            SqlParameter bctruoc = new SqlParameter("@baocaotruoc", SqlDbType.NVarChar);
            bctruoc.Value = cl.BaoCaoTruoc;
            ds.Add(bctruoc);
            SqlParameter HDBH = new SqlParameter("@policy", SqlDbType.NVarChar);
            HDBH.Value = cl.PolicyNo;
            ds.Add(HDBH);
            SqlParameter pres = new SqlParameter("@presmises", SqlDbType.NVarChar);
            pres.Value = cl.Premises;
            ds.Add(pres);
            SqlParameter dol = new SqlParameter("@dol", SqlDbType.NVarChar);
            dol.Value = cl.Dol;
            ds.Add(dol);
            SqlParameter nguyennhan = new SqlParameter("@sortcause", SqlDbType.NVarChar);
            nguyennhan.Value = cl.SortCause;
            ds.Add(nguyennhan);
            SqlParameter phamvi = new SqlParameter("@phamvitt", SqlDbType.NVarChar);
            phamvi.Value = cl.PhamViTonThat;
            ds.Add(phamvi);
            SqlParameter SumI = new SqlParameter("@suminsured", SqlDbType.NVarChar);
            SumI.Value = cl.SumInsured;
            ds.Add(SumI);
            SqlParameter Effec = new SqlParameter("@effective", SqlDbType.NVarChar);
            Effec.Value = cl.Effective;
            ds.Add(Effec);
            SqlParameter mienthuong = new SqlParameter("@mucmienthuong", SqlDbType.NVarChar);
            mienthuong.Value = cl.MucMienThuong;
            ds.Add(mienthuong);
            SqlParameter dkbs = new SqlParameter("@dkbs", SqlDbType.NVarChar);
            dkbs.Value = cl.DKBS;
            ds.Add(dkbs);
            SqlParameter khieunai = new SqlParameter("@khieunai", SqlDbType.NVarChar);
            khieunai.Value = cl.KhieuNai;
            ds.Add(khieunai);
            SqlParameter duphong = new SqlParameter("@duphongboithuong", SqlDbType.NVarChar);
            duphong.Value = cl.DuPhongBoiThuong;
            ds.Add(duphong);
            SqlParameter dieuchinh = new SqlParameter("@dieuchinh", SqlDbType.NVarChar);
            dieuchinh.Value = cl.DieuChinh;
            ds.Add(dieuchinh);
            SqlParameter boithuong = new SqlParameter("@boithuong", SqlDbType.NVarChar);
            boithuong.Value = cl.BoiThuong;
            ds.Add(boithuong);
            SqlParameter trumienthuong = new SqlParameter("@trumucmienthuong", SqlDbType.NVarChar);
            trumienthuong.Value = cl.TruMienThuong;
            ds.Add(trumienthuong);
            SqlParameter namepolicy = new SqlParameter("@namepolicy", SqlDbType.NVarChar);
            namepolicy.Value= cl.NamePolicy;
            ds.Add(namepolicy);

            kq = SqlDataAcessHelper.exNonStoreParas(sql, ds);
            return kq;
        }
Exemple #16
0
 public ClaimDTO LayInFo(string maclaim)
 {
     ClaimDTO cl = new ClaimDTO();
     string sql = "sp_Claim_SelectInfo";
     List<SqlParameter> ds = new List<SqlParameter>();
     SqlParameter macl = new SqlParameter("@maclaim", SqlDbType.VarChar);
     macl.Value = maclaim;
     ds.Add(macl);
     DataTable dt = new DataTable();
     dt = SqlDataAcessHelper.exStoreParas(sql, ds);
     if (dt.Rows.Count > 0)
     {
         DataRow dr = dt.Rows[0];
         cl.MaClaim = dr[0].ToString();
         cl.TenClaim = dr[1].ToString();
         cl.MaGDV1 = int.Parse(dr[2].ToString());
         cl.TomTatVuViec = dr[3].ToString();
         cl.MaDonVi=int.Parse(dr[4].ToString());
         cl.MaKhachHang = int.Parse(dr[5].ToString());
         cl.PolicyNo = dr[6].ToString();
         cl.Effective = dr[7].ToString();
         cl.Premises = dr[8].ToString();
         cl.Dol = dr[9].ToString();
         cl.MaloaiHinhTonThat = int.Parse(dr[10].ToString());
         cl.GhiChu = dr[11].ToString();
         cl.AssignedDate = dr[12].ToString();
         cl.A1 = dr[13].ToString();
         cl.A2 = dr[14].ToString();
         cl.B1 = dr[15].ToString();
         cl.B2 = dr[16].ToString();
         cl.C1 = dr[17].ToString();
         cl.C2 = dr[18].ToString();
         cl.C3 = dr[19].ToString();
         cl.D1 = dr[20].ToString();
         cl.D2 = dr[21].ToString();
         cl.E1=dr[22].ToString();
         cl.E2=dr[23].ToString();
         cl.F1=dr[24].ToString();
         cl.F2 = dr[25].ToString();
         cl.G = dr[26].ToString();
         cl.H = dr[27].ToString();
         cl.I = dr[28].ToString();
         cl.K = dr[29].ToString();
         //cl.MaSummary = int.Parse(dr[30].ToString());
         cl.NgayBatDauGiamDinh = dr[31].ToString();
         cl.MaGiaiDoanHoanThanh = int.Parse(dr[32].ToString());
         cl.NguoiPhuTrach = dr[33].ToString();
         cl.TypePolicy = dr[34].ToString();
         cl.LossHistory = dr[35].ToString();
         cl.Discuss = dr[49].ToString();
         cl.GioiThieuNDBH = dr[51].ToString();
     }
     return cl;
 }
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            ClaimDTO cldto = new ClaimDTO();
            KhachHangDTO khdto = new KhachHangDTO();
            string id=Session["ThamChieu"].ToString();
            if (id != "")
            {
                cldto.MaClaim = id;
                cldto.TenClaim = txtTenClaim.Text;
                string iladate = txtDateILA.Text.Trim();
                if (iladate != "")
                    cldto.ILADATE = iladate;
                else
                    cldto.ILADATE = "";
                string nameP = txtPolicyNo.Text.Trim();
                if (nameP != "")
                    cldto.PolicyNo = nameP;
                else
                    cldto.PolicyNo = "";
                string dol = txtDOL.Text.Trim();
                if (dol != "")
                    cldto.Dol = dol;
                else
                    cldto.Dol = "";
                string cause = txtCauseloss.Text.Trim();
                if (cause != "")
                    cldto.SortCause = cause;
                else
                    cldto.SortCause = "";
                string pvtt = txtExtendofloss.Text.Trim();
                if (pvtt != "")
                    cldto.PhamViTonThat = pvtt;
                else
                    cldto.PhamViTonThat = "";
                string nametypo = txtTypepolicy.Text.Trim();
                if (nametypo != "")
                    cldto.NamePolicy = nametypo;
                else
                    cldto.NamePolicy = "";
                string sumI = txtSuminsured.Text.Trim();
                if (sumI != "")
                    cldto.SumInsured = sumI;
                else
                    cldto.SumInsured = "";
                string gd = txtperiod.Text.Trim();
                if (gd != "")
                    cldto.Effective = gd;
                else
                    cldto.Effective = "";
                string mmt = txtDeductible.Text.Trim();
                if (mmt != "")
                    cldto.MucMienThuong = mmt;
                else
                    cldto.MucMienThuong = "";
                string dkbs = txtExtensionclaise.Text.Trim();
                if (dkbs != "")
                    cldto.DKBS = dkbs;
                else
                    cldto.DKBS = "";
                string kn = txtKhieuNai.Text.Trim();
                if (kn != "")
                    cldto.KhieuNai = kn;
                else
                    cldto.KhieuNai = "";
                string dpbt = txtInterimreserve.Text;
                if (dpbt!="")
                    cldto.DuPhongBoiThuong = dpbt;
                else
                    cldto.DuPhongBoiThuong = "";
                int maKH = cl.ClaimMaKH(id);
                if (maKH != 0)
                    khdto.MaKhachHang = maKH;
                khdto.LinhVucKinhDoanh = txtTrade.Text.Trim();
                bool up = cl.UpdateInfoPRIRFR(cldto, khdto);
                int maGDV = int.Parse(Request.Cookies["MaGDV"].Value);
                if (up == true)
                {
                    sm.CapNhatInfoBasicPR(cldto, khdto);
                    sm.CapNhatInfoBasicFR(cldto);

                    string noidung = gdv.LayTenTheoMa(maGDV) + " edited cover preliminary report of case " + id + " .";
                    SaveLogTracking(maGDV, noidung, id);
                    Response.Write("<script>parent.closeDialog();</script>");
                    Response.Write("<script>parent.reloaData();</script>");
                }
                else
                {
                    string noidung = gdv.LayTenTheoMa(maGDV) + " faild to edit cover preliminary report of case " + id + " .";
                    SaveLogTracking(maGDV, noidung, id);
                    Response.Write("<script> alert('Error Update!');</script>");
                }
            }
        }