protected void btnGstr2Summary_Click(object sender, EventArgs e)
    {
        lblmsg.Text = "";
        PL_GSTR2Summary obj = new PL_GSTR2Summary();
        DataTable       dt  = new DataTable();

        obj.Ind    = 1;
        obj.CaCode = Convert.ToInt32(Session["CaCode"]);
        // obj.CaCode = 38;
        obj.CaCodeOdp = Convert.ToInt32(Session["CaCodeOdp"]);
        //DropDownList ddlMonthYear = (DropDownList)wucTaxPayerStrip.FindControl("ddlMonthYear");
        obj.MonthCD = Convert.ToInt32(Session["MonthYrCode"].ToString());
        if (Session["ClientCode"] != null && Session["ClientCodeOdp"] != null)
        {
            obj.ClientCode    = Convert.ToInt32(Session["ClientCode"].ToString());
            obj.ClientCodeOdp = Convert.ToInt32(Session["ClientCodeOdp"].ToString());
            obj.ClientGSTIN   = Session["ClientGSTNNO"].ToString();
            // obj.ClientGSTIN = "33GSPTN3741G1Z9";
            dt = CLSCommon.CallApiPost("api/GSTR2Summary/GetGSTR2Summary/", obj);
            if (dt != null)
            {
                GridGSTR2Summ.DataSource = dt;
                GridGSTR2Summ.DataBind();
            }
        }
        else
        {
            lblmsg.Text = "Please Select Client";
        }
    }
Пример #2
0
    protected void btnGetSummary_Click(object sender, EventArgs e)
    {
        GridGSTR2Summ.DataSource = null;
        GridGSTR2Summ.DataBind();

        objpl               = new PL_APILog();
        objpl.Ind           = 6;
        objpl.ClientCode    = int.Parse(Session["ClientCode"].ToString());
        objpl.ClientCodeOdp = int.Parse(Session["ClientCodeOdp"].ToString());
        objpl.CaCode        = int.Parse(Session["CaCode"].ToString());
        objpl.CaCodeOdp     = int.Parse(Session["CaCodeOdp"].ToString());
        objpl.GSTNNO        = Session["ClientGSTNNo"].ToString();
        objpl.LogId         = Convert.ToInt64(hfLogId.Value.ToString());
        objpl.RecordNo      = 3;
        objpl.MonthCD       = int.Parse(Session["MonthYrCode"].ToString());
        DataTable dt = CLSCommon.CallApiPost("api/GSTR2File/GetSummary", objpl);

        if (dt != null)
        {
            if (dt.Rows[0]["res"].ToString() == "1")
            {
                // txtSummary.Text = dt.Rows[0]["Summary"].ToString();
                ViewState["Summary"] = dt.Rows[0]["Summary"].ToString();
                GSTR2Summ objGstr2summ = JsonConvert.DeserializeObject <GSTR2Summ>(dt.Rows[0]["Summary"].ToString());
                GridGSTR2Summ.DataSource = objGstr2summ.section_summary;
                GridGSTR2Summ.DataBind();

                ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "ShowSummModal();", true);
                //  Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "ShowSummModal();", true);
            }
            else
            {
                lblSummMessage.Text = dt.Rows[0]["Error"].ToString();
            }
        }
        else
        {
            lblSummMessage.Text = "Some Error Occured try Again.";
        }
    }