protected void grDSClaim_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow row = grDSClaim.SelectedRow; if (row != null) { //string temp = row.Cells[0].Text; string thamchieu = row.Cells[1].Text; string ma = cldao.LayMaTheoTen(thamchieu); Session["ThamChieu"] = ma; //int magdv = int.Parse(Session["MaGDV"].ToString()); int magdv = 0; magdv = int.Parse(Request.Cookies["MaGDV"].Value); int pub = gdvdao.LayMaPub(magdv); //bool kt = cldao.KiemTraTruyCap(pub, ma); bool kt = CheckPub(magdv, ma); if (kt == true) { Response.Redirect("~/Pages/Layout.aspx"); } else { Response.Write("<script> alert('You can't acess on this case!');</script>"); } } else { Response.Write("<script> alert('Claim chưa có trong dữ liệu!');</script>"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { HttpCookie ck = Request.Cookies["MaGDV"]; if (ck != null) { thamchieu = Request.QueryString["viewthamchieu"]; lblThongBaoTS.Visible = false; string matc = cldao.LayMaTheoTen(thamchieu); ClaimID = matc; loadLoaiDR(ClaimID); if (thamchieu != null) { chitietwr(thamchieu); loadTimeSheet(matc); Session["ThamChieu"] = matc; } else { thamchieu = Session["ThamChieu"].ToString(); string matc1 = cldao.LayMaTheoTen(thamchieu); Session["ThamChieu"] = matc1; chitietwr(thamchieu); loadTimeSheet(matc1); } } else { Response.Redirect("~/Pages/Login.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { thamchieu = Request.QueryString["viewthamchieu"]; lblThongBaoTS.Visible = false; if (thamchieu != null) { string matc = cldao.LayMaTheoTen(thamchieu); ClaimID = matc; chitietwr(thamchieu); loadTimeSheet(matc); loadLoaiDR(matc); } else { thamchieu = Session["ThamChieu"].ToString(); ClaimID = thamchieu; string tenclaim = cldao.TenClaim(thamchieu); chitietwr(tenclaim); loadTimeSheet(thamchieu); loadLoaiDR(thamchieu); } } }
protected string GETMaThamChieu() { string matc = cldao.LayMaTheoTen(txtReferencenumber.Text); bool kttc = cldao.KiemTraThamChieu(matc); if (kttc == true) { return(matc); } else { return("NULL"); } }
protected void btnCreatnew_Click(object sender, EventArgs e) { if (IsPostBack) { string id = cl.LayMaTheoTen(lblThamChieu.Text); string dienbien = ckDienBienTonThat.Text; string phamvi = ckExtentofloss.Text; string duphong = txtintitialreserve.Text; string dephong = ckDePhongTonThatVaKhuyenCao.Text; string ykien = ckYKienGDV.Text; string tendd = txtTenNguoiLienHe.Text; string dienT = txtDienThoai.Text; string email = txtEmail.Text; int makh = int.Parse(lblIDKH.Text); KhachHangDAO kh = new KhachHangDAO(); bool upkh = kh.CapNhatDaiDien(makh, tendd, dienT, email); bool up = cl.CapNhatBCDT(id, dienbien, phamvi, duphong, dephong, ykien); if (up == true && upkh == true) { Session["ThamChieu"] = id; Response.Redirect("~/Pages/reportILA.aspx"); } else { Response.Write("<script>alert('Error!');</script>"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { HttpCookie ck = Request.Cookies["MaGDV"]; if (ck == null) { Response.Redirect("~/Pages/Login.aspx"); } else { mathamchieu = Request.QueryString["ThamChieu"]; string thamchieu = Request.QueryString["Claim"]; if (thamchieu != null) { loadClaim(thamchieu); string maclaim = cl.LayMaTheoTen(thamchieu); LoadTienDoXuLy(maclaim); loadDeXuatBoiThuong(maclaim); KiemMaLinhVuc(maclaim); } else { thamchieu = cl.TenClaim(mathamchieu); loadClaim(thamchieu); LoadTienDoXuLy(mathamchieu); loadDeXuatBoiThuong(mathamchieu); KiemMaLinhVuc(mathamchieu); } } } }
protected void grDSClaim_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow row = grDSClaim.SelectedRow; if (row != null) { //string temp = row.Cells[0].Text; string thamchieu = row.Cells[1].Text; string ma = cldao.LayMaTheoTen(thamchieu); Session["ThamChieu"] = ma; //Response.Redirect("~/Pages/ManageClaim.aspx?Claim=" + ma); // Response.Redirect("~/Pages/InformationForm.aspx?Reference=" + ma); Response.Redirect("~/mobile/InformationForm.aspx?1v5tdadefojhwty"); } else { Response.Write("<script> alert('Claim chưa có trong dữ liệu!');</script>"); } }