protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { HttpCookie ck = Request.Cookies["MaGDV"]; if (ck == null) Response.Redirect("~/Pages/Login.aspx"); else { NhaBHDAO nbhdao = new NhaBHDAO(); DataTable dt = new DataTable(); dt = nbhdao.DSCongTyTong(); if (dt.Rows.Count > 0) { drBH.DataSource = dt; drBH.DataValueField = "ID_NhaBH"; drBH.DataTextField = "TenNhaBH"; drBH.DataBind(); int maNhaBH = int.Parse(drBH.SelectedItem.Value.ToString()); load_DonViBaoHiem(maNhaBH); } UcDaiDienDonViBaoHiemMoi1.Visible = false; UcDonViBaoHiemMoi2.Visible = false; } } }
protected void btnThem_Click(object sender, EventArgs e) { NhaBHDAO nbbhdao = new NhaBHDAO(); string ten = txtTenCongTy.Text; nbbhdao.ThemCongTy(ten); HienThiDanhSach(); txtTenCongTy.Text = ""; }
void loadDVNBH() { NhaBHDAO nbhdao = new NhaBHDAO(); drCTYTong.DataSource = nbhdao.DSCongTyTong(); drCTYTong.DataTextField = "TenNhaBH"; drCTYTong.DataValueField = "ID_NhaBH"; drCTYTong.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { try { lblThongBao.Text = ""; NhaBHDAO bhdao = new NhaBHDAO(); DataTable dt = bhdao.DSCongTyTong(); grDS.DataSource = dt; grDS.DataBind(); } catch (Exception ex) { lblThongBao.Text = ex.Message; } }
protected void gvDSCongTy_RowUpdating(object sender, GridViewUpdateEventArgs e) { GridViewRow row = gvDSCongTy.Rows[e.RowIndex]; TextBox txt2nd_column = row.Cells[1].Controls[0] as TextBox; int a = Int32.Parse(gvDSCongTy.DataKeys[e.RowIndex].Value.ToString()); string b = txt2nd_column.Text; NhaBHDAO nbbhdao = new NhaBHDAO(); nbbhdao.SuaCongTy(a, b); e.Cancel = true; gvDSCongTy.EditIndex = -1; HienThiDanhSach(); }
void load_DropList() { if (!this.IsPostBack) { // Giam dinh vien GiamDinhVienDAO gdv = new GiamDinhVienDAO(); DataTable dt = gdv.DanhSachGiamDinhVien(); drGDV1.DataSource = dt; drGDV1.DataValueField = "ID_GDV"; drGDV1.DataTextField = "TenGDV"; drGDV1.DataBind(); drGDV2.DataSource = dt; drGDV2.DataValueField = "ID_GDV"; drGDV2.DataTextField = "TenGDV"; drGDV2.DataBind(); drGDV3.DataSource = dt; drGDV3.DataValueField = "ID_GDV"; drGDV3.DataTextField = "TenGDV"; drGDV3.DataBind(); // nha bao hiem NhaBHDAO nbhdao = new NhaBHDAO(); drNBH.DataSource = nbhdao.DSCongTyTong(); drNBH.DataValueField = "ID_NhaBH"; drNBH.DataTextField = "TenNhaBH"; drNBH.DataBind(); // khach hang KhachHangDAO khdao = new KhachHangDAO(); drKH.DataSource = khdao.DSNguoiDuocBaoHiem(); drKH.DataValueField = "ID_KhachHang"; drKH.DataTextField = "TenKhachHang"; drKH.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { lblthongbao.Text = ""; try { NhaBHDAO nbhdao = new NhaBHDAO(); //drNBH.DataSource = nbhdao.DSCongTyTong(); //drNBH.DataValueField = "ID_NhaBH"; //drNBH.DataTextField = "TenNhaBH"; //drNBH.DataBind(); grDS.DataSource = dvdao.DonViBHInfo(); DataBind(); //load_GR(); } catch (Exception ex) { lblthongbao.Text = ex.Message; } } }
//void loadCK() //{ // ckDePhongTonThatVaKhuyenCao.config.toolbar = new object[] // { // new object[] { "Bold", "Italic", "-", "NumberedList", "BulletedList", "-", "Link", "Unlink", "-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","About" }, // new object[] { "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "Print", "SpellChecker", "Scayt" }, // new object[] { "Styles", "Format", "Font", "FontSize" }, // }; // ckYKienGDV.config.toolbar = new object[] // { // new object[] { "Bold", "Italic", "-", "NumberedList", "BulletedList", "-", "Link", "Unlink", "-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","About" }, // new object[] { "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "Print", "SpellChecker", "Scayt" }, // new object[] { "Styles", "Format", "Font", "FontSize" }, // }; // ckDienBienTonThat.config.toolbar = new object[] // { // new object[] { "Bold", "Italic", "-", "NumberedList", "BulletedList", "-", "Link", "Unlink", "-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","About" }, // new object[] { "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "Print", "SpellChecker", "Scayt" }, // new object[] { "Styles", "Format", "Font", "FontSize" }, // }; //} void load_DropList() { if (!this.IsPostBack) { // Giam dinh vien DataTable dt = gdv.DanhSachGiamDinhVien(); drSurveyor.DataSource = dt; drSurveyor.DataValueField = "ID_GDV"; drSurveyor.DataTextField = "TenGDV"; drSurveyor.DataBind(); // nha bao hiem NhaBHDAO nbhdao = new NhaBHDAO(); drInsurer.DataSource = nbhdao.DSCongTyTong(); drInsurer.DataValueField = "ID_NhaBH"; drInsurer.DataTextField = "TenNhaBH"; drInsurer.DataBind(); // loai hinh ton that drTypeofloss.DataSource = lhtt.DSLoaiHinhTT(); drTypeofloss.DataValueField = "ID_LoaiHinhTonThat"; drTypeofloss.DataTextField = "LoaiHinhTonThat"; drTypeofloss.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { HttpCookie ck = Request.Cookies["MaGDV"]; if (ck == null) { Response.Redirect("~/Pages/Login.aspx"); } else { NhaBHDAO nbhdao = new NhaBHDAO(); drNBH.DataSource = nbhdao.DSCongTyTong(); drNBH.DataValueField = "ID_NhaBH"; drNBH.DataTextField = "TenNhaBH"; drNBH.DataBind(); int maNhaBH = int.Parse(drNBH.SelectedItem.Value.ToString()); load_DonViBaoHiem(maNhaBH); lblThongBao.Text = ""; } } }
protected void HienThiDanhSach() { NhaBHDAO nbbhdao = new NhaBHDAO(); gvDSCongTy.DataSource = nbbhdao.DSCongTyTong(); gvDSCongTy.DataBind(); }
protected void Tim(string ten) { Session["Tim"] = txtProductList.Text; NhaBHDAO nbhdao = new NhaBHDAO(); gvDSCongTy.DataSource = nbhdao.CongTyTheoTen(ten); gvDSCongTy.DataBind(); }
void load_DropDownlist() { if (!this.IsPostBack) { GiamDinhVienDAO gdv = new GiamDinhVienDAO(); DataTable dt = gdv.DanhSachGiamDinhVien(); drGDV1.DataSource = dt; drGDV1.DataValueField = "ID_GDV"; drGDV1.DataTextField = "TenGDV"; drGDV1.DataBind(); drGDV2.DataSource = dt; drGDV2.DataValueField = "ID_GDV"; drGDV2.DataTextField = "TenGDV"; drGDV2.DataBind(); drGDV3.DataSource = dt; drGDV3.DataValueField = "ID_GDV"; drGDV3.DataTextField = "TenGDV"; drGDV3.DataBind(); drGDV4.DataSource = dt; drGDV4.DataValueField = "ID_GDV"; drGDV4.DataTextField = "TenGDV"; drGDV4.DataBind(); //các công ty tổng nha bao hiem NhaBHDAO nbhdao = new NhaBHDAO(); drNBH.DataSource = nbhdao.DSCongTyTong(); drNBH.DataValueField = "ID_NhaBH"; drNBH.DataTextField = "TenNhaBH"; drNBH.DataBind(); } }
void load_DropList() { if (!this.IsPostBack) { //Nha bao hiem NhaBHDAO nbhdao = new NhaBHDAO(); drCTYTong.DataSource = nbhdao.DSCongTyTong(); drCTYTong.DataTextField = "TenNhaBH"; drCTYTong.DataValueField = "ID_NhaBH"; drCTYTong.DataBind(); } }
void load_DropList() { if (!this.IsPostBack) { // Giam dinh vien GiamDinhVienDAO gdv = new GiamDinhVienDAO(); DataTable dt = gdv.DanhSachGiamDinhVien(); drGDV1.DataSource = dt; drGDV1.DataValueField = "ID_GDV"; drGDV1.DataTextField = "TenGDV"; drGDV1.DataBind(); drGDV2.DataSource = dt; drGDV2.DataValueField = "ID_GDV"; drGDV2.DataTextField = "TenGDV"; drGDV2.DataBind(); drGDV3.DataSource = dt; drGDV3.DataValueField = "ID_GDV"; drGDV3.DataTextField = "TenGDV"; drGDV3.DataBind(); // nha bao hiem NhaBHDAO nbhdao = new NhaBHDAO(); drNBH.DataSource = nbhdao.DSCongTyTong(); drNBH.DataValueField = "ID_NhaBH"; drNBH.DataTextField = "TenNhaBH"; drNBH.DataBind(); // khach hang KhachHangDAO khdao = new KhachHangDAO(); drKH.DataSource = khdao.DSNguoiDuocBaoHiem(); drKH.DataValueField = "ID_KhachHang"; drKH.DataTextField = "TenKhachHang"; drKH.DataBind(); // loai hinh ton that LoaiHinhTonThatDAO lhTTdao = new LoaiHinhTonThatDAO(); drLoaiHinhTonThat.DataSource = lhTTdao.DSLoaiHinhTT(); drLoaiHinhTonThat.DataValueField = "ID_LoaiHinhTonThat"; drLoaiHinhTonThat.DataTextField = "LoaiHinhTonThat"; drLoaiHinhTonThat.DataBind(); // giai doan thuc hien GiaiDoanDAO gddao = new GiaiDoanDAO(); } }
void LoadDRNBH() { if (this.IsPostBack) { NhaBHDAO nbh = new NhaBHDAO(); drNBH.DataSource = nbh.DSCongTyTong(); drNBH.DataTextField = "TenNhaBH"; drNBH.DataValueField = "ID_NhaBH"; drNBH.DataBind(); } }