protected void grdAllGstrName_RowCommand(object sender, GridViewCommandEventArgs e) { int RowIndex = 0; RowIndex = int.Parse(e.CommandArgument.ToString()); int data = int.Parse(grdAllGstrName.DataKeys[RowIndex][0].ToString()); foreach (GridViewRow grow in grdAllGstrName.Rows) { LinkButton lnkbtn1 = (LinkButton)grow.FindControl("lblGSTRName"); lnkbtn1.CssClass = "list-group-item"; } LinkButton lnkbtn = (LinkButton)grdAllGstrName.Rows[RowIndex].FindControl("lblGSTRName"); lnkbtn.CssClass = "list-group-item active"; DropDownList ddlMonthYear = (DropDownList)wucTaxPayerStrip.FindControl("ddlMonthYear"); PL_TaxPayerNew objpl = new PL_TaxPayerNew(); objpl.Ind = 1; objpl.ClientCode = int.Parse(Session["ClientCode"].ToString()); objpl.ClientCodeOdp = int.Parse(Session["ClientCodeOdp"].ToString()); objpl.ClientGSTNNO = Session["ClientGSTNNO"].ToString(); objpl.RecordNo = data.ToString(); objpl.MonthCD = ddlMonthYear.SelectedValue.ToString(); DataTable dt = CLSCommon.CallApiPost("api/TaxPayeNew/GetAllData", objpl); if (dt.Rows.Count > 0) { GridView1.DataSource = dt; GridView1.DataBind(); } }
void GetStatus(int RowIndex) { if (grdAllGstrName.Rows.Count > 0) { int data = int.Parse(grdAllGstrName.DataKeys[RowIndex][0].ToString()); foreach (GridViewRow grow in grdAllGstrName.Rows) { LinkButton lnkbtn1 = (LinkButton)grow.FindControl("lnkbtn"); lnkbtn1.CssClass = "list-group-item text-center brdno"; } LinkButton lnkbtn = (LinkButton)grdAllGstrName.Rows[RowIndex].FindControl("lnkbtn"); lnkbtn.CssClass = "list-group-item text-center brdno active"; //DropDownList ddlMonthYear = (DropDownList)wucTaxPayerStrip.FindControl("ddlMonthYear"); PL_TaxPayerNew objpl = new PL_TaxPayerNew(); objpl.Ind = 1; objpl.ClientCode = int.Parse(Session["ClientCode"].ToString()); objpl.ClientCodeOdp = int.Parse(Session["ClientCodeOdp"].ToString()); objpl.ClientGSTNNO = Session["ClientGSTNNO"].ToString(); objpl.RecordNo = data.ToString(); objpl.MonthCD = Session["MonthYrCode"].ToString(); DataTable dt = CLSCommon.CallApiPost("api/TaxPayeNew/GetAllData", objpl); li3bGenerated.Attributes.Remove("class"); liSaved.Attributes.Remove("class"); liSubmit.Attributes.Remove("class"); liFiled.Attributes.Remove("class"); step1.Attributes.Remove("class"); step2.Attributes.Remove("class"); step3.Attributes.Remove("class"); if (dt.Rows.Count > 0) { if (int.Parse(dt.Rows[0]["TotalCompleted"].ToString()) > 0) { li3bGenerated.Attributes.Add("class", "active"); } if (int.Parse(dt.Rows[0]["TotalSaved"].ToString()) > 0) { liSaved.Attributes.Add("class", "active"); step1.Attributes.Add("class", "step active"); } if (int.Parse(dt.Rows[0]["TotalSubmit"].ToString()) > 0) { liSubmit.Attributes.Add("class", "active"); step2.Attributes.Add("class", "step active"); } if (int.Parse(dt.Rows[0]["TotalFiled"].ToString()) > 0) { liFiled.Attributes.Add("class", "active"); step3.Attributes.Add("class", "step active"); } } } }