Ejemplo n.º 1
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            dt = new DataTable();
            cc = new ClaimClass();
            cc.getClaimRecordsByCriteria(dt, "", txtIntimationNo.Text, ddlBranch.SelectedItem.Text, ddlClient.SelectedItem.Text, ddlInsuranceType.SelectedItem.Text, ddlgihyear.SelectedItem.Text);


            GridView1.DataSource = dt;
            GridView1.DataBind();
        }
Ejemplo n.º 2
0
 public void fillCalimStatusDropDown()
 {
     try
     {
         db = new dal();
         dt = new DataTable();
         cc = new ClaimClass();
         ddlClaimStatus.DataValueField = "idx";
         ddlClaimStatus.DataTextField  = "ClaimStatus";
         cc.getClaimStatus(dt);
         ddlClaimStatus.DataSource = dt;
         ddlClaimStatus.DataBind();
         ddlClaimStatus.Items.Insert(0, new ListItem("Select Claim Status."));
     }
     catch (Exception ex)
     {
         lblError.Text = ex.Message.ToString();
     }
 }
Ejemplo n.º 3
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                cc           = new ClaimClass();
                dt           = new DataTable();
                cc.statusIdx = int.Parse(ddlClaimStatus.SelectedValue.ToString());
                cc.userIdx   = "Kashif";
                cc.holdIdx   = int.Parse(ddlClaimHold.SelectedValue.ToString());
                cc.desc      = txtdescription.Text;
                cc.Date      = DateTime.Now.ToShortDateString();
                cc.claimIdx  = int.Parse(Session["claimIdx"].ToString());
                cc.insertClaims(dt);

                lblMsg.Text                = "Save Successfully";
                txtdescription.Text        = "";
                ddlClaimHold.SelectedIndex = ddlClaimStatus.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                lblError.Text = ex.Message.ToString();
            }
        }
Ejemplo n.º 4
0
        public void fillgrid()
        {
            try
            {
                db = new dal();
                dt = new DataTable();
                cc = new ClaimClass();
                cc.getClaimRecordDemo(dt);
                DataTable brdt = dt.DefaultView.ToTable(true, new String[] { "BR_CODE", "BR_DESC" });

                ddlBranch.DataTextField  = "BR_DESC";
                ddlBranch.DataValueField = "BR_CODE";

                DataRow row = brdt.NewRow();
                row[0] = "";


                row[1] = "";

                brdt.Rows.InsertAt(row, 0);
                brdt.AcceptChanges();

                ddlBranch.DataSource = brdt;
                ddlBranch.DataBind();

                DataTable cldt = dt.DefaultView.ToTable(true, new String[] { "INSURED" });
                row    = cldt.NewRow();
                row[0] = "";

                cldt.Rows.InsertAt(row, 0);
                cldt.AcceptChanges();


                ddlClient.DataTextField  = "INSURED";
                ddlClient.DataValueField = "INSURED";
                ddlClient.DataSource     = cldt;
                ddlClient.DataBind();

                DataTable cltype = dt.DefaultView.ToTable(true, new String[] { "piydesc" });

                row    = cltype.NewRow();
                row[0] = "";

                cltype.Rows.InsertAt(row, 0);
                cltype.AcceptChanges();

                ddlInsuranceType.DataTextField  = "piydesc";
                ddlInsuranceType.DataValueField = "piydesc";
                ddlInsuranceType.DataSource     = cltype;
                ddlInsuranceType.DataBind();

                DataTable dtStaut = new DataTable();
                dtStaut.Columns.Add("Status");
                row    = dtStaut.NewRow();
                row[0] = "Intimated";
                dtStaut.Rows.Add(row);
                row    = dtStaut.NewRow();
                row[0] = "Settlement";
                dtStaut.Rows.Add(row);
                row    = dtStaut.NewRow();
                row[0] = "Settled";
                dtStaut.Rows.Add(row);



                ddlStatus.DataTextField  = "Status";
                ddlStatus.DataValueField = "Status";
                ddlStatus.DataSource     = dtStaut;
                ddlStatus.DataBind();

                DataTable dtYear = dt.DefaultView.ToTable(true, new String[] { "GIH_YEAR" });
                row    = dtYear.NewRow();
                row[0] = "";
                dtYear.Rows.InsertAt(row, 0);
                dtYear.AcceptChanges();
                ddlgihyear.DataTextField  = "GIH_YEAR";
                ddlgihyear.DataValueField = "GIH_YEAR";
                ddlgihyear.DataSource     = dtYear;
                ddlgihyear.DataBind();


                GridView1.DataSource = dt;
                GridView1.DataBind();
            }
            catch (Exception ex)
            {
                lblMsg.Text = ex.Message.ToString();
            }
        }