Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            drSubsidiary.Attributes.Add("required", "required");
            txtInsurerd.Attributes.Add("required", "required");
            txtTypePolicy.Attributes.Add("required", "required");


            if (!this.IsPostBack)
            {
                HttpCookie ck = Request.Cookies["MaGDV"];
                if (ck != null)
                {
                    load_DropList();
                    lblThongBao.Text = "";
                    int manbh = int.Parse(drInsurer.SelectedItem.Value.ToString());
                    load_DonViBaoHiem(manbh);
                }
                else
                {
                    Response.Redirect("~/Pages/Login.aspx");
                }
            }
            string ma = cldao.LayMa();

            txtMaClaim.Text = ma;
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                HttpCookie ck = Request.Cookies["MaGDV"];
                if (ck != null)
                {
                    load_DropList();
                    lblThongBao.Text    = "";
                    lblThongBaoLoi.Text = "";
                    #region Old_Code Not use anymore
                    //int maNhaBH = int.Parse(drInsurer.SelectedItem.Value.ToString());
                    //load_DonViBaoHiem(maNhaBH);
                    //tenthamchieu = Session["ThamChieu"].ToString();
                    //claim = Request.QueryString["Claim"];
                    //if (claim == "No")
                    //    //btnCapNhat.Visible = false;
                    //else
                    //    if (tenthamchieu != null)
                    //    {
                    //        //loadBCDTCapNhat(tenthamchieu);
                    //        //btnThem.Visible = false;
                    //    }

                    //load_SLGDV();
                    #endregion
                }
                else
                {
                    Response.Redirect("~/Pages/Login.aspx");
                }
            }
            string ma = cldao.LayMa();
            txtMaClaim.Text = ma;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                load_DropList();
                int maNhaBH = int.Parse(drNBH.SelectedItem.Value.ToString());
                load_DonViBaoHiem(maNhaBH);
                load_SLGDV();
            }
            string ma = cldao.LayMa();

            txtMaClaim.Text = ma;
        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            HttpCookie ck = Request.Cookies["MaGDV"];

            if (ck == null)
            {
                Response.Redirect("~/Pages/Login.aspx");
            }
            if (Session["ThamChieu"] == null)
            {
                Response.Redirect("~/Pages/Home.aspx");
            }
            else
            {
                string thamchieu = Session["ThamChieu"].ToString();
                lblThamChieu.Text = thamchieu;
                mathamchieu       = cldao.LayMa(thamchieu);
                loadDS(mathamchieu);
            }
        }
Example #5
0
 protected void btnThemMoi_Click(object sender, EventArgs e)
 {
     try {
         string tc = txtThamChieu.Text.Trim();
         bool   kt = clda.KiemTraThamChieu(tc);
         if (kt == true)
         {
             bool kttcsu = sdao.KiemTraClaim(txtThamChieu.Text);
             if (kttcsu == false)
             {
                 string mathamchieu = clda.LayMa(tc);
                 sdao.Them(mathamchieu);
             }
             lblThamChieu.Text = tc;
         }
         else
         {
             lblThamChieu.Text = "Tham chiếu này chưa có ở Claim!";
         }
     }
     catch (Exception ex)
     { lblThamChieu.Text = ex.Message; }
 }