Esempio n. 1
0
        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>");
                }
            }
        }
Esempio n. 2
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            maclaim       = Session["ThamChieu"].ToString();
            cldto.MaClaim = maclaim;
            string policy = txtPolicyNo.Text.Trim();

            if (policy != "")
            {
                cldto.PolicyNo = policy;
            }
            else
            {
                cldto.PolicyNo = "";
            }
            string hieuluc = txtPeriodfrom.Text.Trim();

            if (hieuluc != "")
            {
                cldto.Effective = hieuluc;
            }
            else
            {
                cldto.Effective = "";
            }
            string ddtt = txtPremises.Text.Trim();

            if (ddtt != "")
            {
                cldto.Premises = ddtt;
            }
            else
            {
                cldto.Premises = "";
            }
            string dol = txtDateofloss.Text.Trim();

            if (dol != "")
            {
                cldto.Dol = dol;
            }
            else
            {
                cldto.Dol = "";
            }
            int maKH = cl.ClaimMaKH(maclaim);

            if (maKH != 0)
            {
                khdto.MaKhachHang = maKH;
            }
            else
            {
                Response.Write("<script> alert('Error ID Insured!');</script>");
            }
            string tenkh = txtTenKhachHang.Text.Trim();

            if (tenkh != "")
            {
                khdto.TenKhachHang = tenkh;
            }
            else
            {
                khdto.TenKhachHang = "";
            }
            string diachi = txtDiaChi.Text.Trim();

            if (diachi != "")
            {
                khdto.DiaChi = diachi;
            }
            else
            {
                khdto.DiaChi = "";
            }
            string trade = txtKinhDoanh.Text.Trim();

            if (trade != "")
            {
                khdto.LinhVucKinhDoanh = trade;
            }
            else
            {
                khdto.LinhVucKinhDoanh = "";
            }
            string daidien = txtNguoiDaiDien.Text.Trim();

            if (daidien != "")
            {
                khdto.TenNguoiDaiDien = daidien;
            }
            else
            {
                khdto.TenNguoiDaiDien = "";
            }
            string dienthoai = txtPhone.Text.Trim();

            if (dienthoai != "")
            {
                khdto.DienThoai = dienthoai;
            }
            else
            {
                khdto.DienThoai = "";
            }
            string fax = txtFax.Text.Trim();

            if (fax != "")
            {
                khdto.Fax = fax;
            }
            else
            {
                khdto.Fax = "";
            }
            string email = txtEmail.Text.Trim();

            if (email != "")
            {
                khdto.Email = email;
            }
            else
            {
                khdto.Email = "";
            }
            bool up = false;

            if (drloaihinhtonthat.Visible == true)
            {
                int idlhtt = int.Parse(drloaihinhtonthat.SelectedItem.Value.ToString());
                UpdateLHTT(maclaim, idlhtt);
            }
            if (btnChangeInsurer.Visible == true)
            {
                up = cl.UpdateBasicInforNotInsurer(cldto);
            }
            else
            {
                cldto.MaDonVi = int.Parse(drDonvi.SelectedItem.Value.ToString());
                up            = cl.UpdateBasicInforInsure(cldto);
            }
            bool upkh  = kh.UpdateKHBasic(khdto);
            int  maGDV = int.Parse(Request.Cookies["MaGDV"].Value);

            if (up == true && upkh == true)
            {
                sm.CapNhatInfoBasicFR(cldto);

                string noidung = gdv.LayTenTheoMa(maGDV) + " edited cover site survey report of case " + maclaim + " .";
                SaveLogTracking(maGDV, noidung, maclaim);

                Response.Write("<script>window.parent.location = '../Pages/Layout.aspx'</script>");
                sm.CapNhatInfoBasic(cldto, khdto);
            }
            if (up == true && upkh == false)
            {
                string noidung = gdv.LayTenTheoMa(maGDV) + " failed to edit Insured of site survey report of case " + maclaim + " .";
                SaveLogTracking(maGDV, noidung, maclaim);
                Response.Write("<script> alert('Error Update Isured!');</script>");
            }
            if (up == false && upkh == true)
            {
                Response.Write("<script> alert('Error ID Claim Infor!');</script>");
            }
            if (up == false && upkh == false)
            {
                string noidung = gdv.LayTenTheoMa(maGDV) + " failed to edit cover site survey report of case " + maclaim + " .";
                SaveLogTracking(maGDV, noidung, maclaim);
                Response.Write("<script> alert('Error Update!');</script>");
            }
        }
Esempio n. 3
0
        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>");
            }
        }