Ejemplo n.º 1
0
    protected void btnRefresh_Click(object sender, EventArgs e)
    {
        objpl                = new PL_APILog();
        objpl.Ind            = 6;
        objpl.ReferenceId    = lblreferenceId.Text;
        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());
        tblInvoice.Visible   = false;
        lblUploadStatus.Text = "";
        btnRefresh.Visible   = false;
        DataTable dt = CLSCommon.CallApiPost("api/GSTR2File/TrackStatus", objpl);

        if (dt != null)
        {
            lblTotalInvoices.Text = dt.Rows[0]["TotalInvoice"].ToString();
            if (dt.Rows[0]["res"].ToString() == "1")
            {
                divSubmit.Visible        = true;
                divSummary.Visible       = true;
                tblInvoice.Visible       = true;
                btnView.Enabled          = false;
                lblUploadStatus.Text     = "Prcoess";// +dt.Rows[0]["referenceID"].ToString();
                lblUploadStatus.CssClass = "text-success";
                lblreferenceId.Text      = dt.Rows[0]["referenceID"].ToString();
                lblUploaded.Text         = (int.Parse(dt.Rows[0]["TotalInvoice"].ToString())).ToString();
                lblErrorInvoice.Text     = "0";
            }
            else if (dt.Rows[0]["res"].ToString() == "2")
            {
                divSubmit.Visible        = true;
                divSummary.Visible       = true;
                btnView.Enabled          = true;
                lblUploaded.Text         = (int.Parse(dt.Rows[0]["TotalInvoice"].ToString()) - int.Parse(dt.Rows[0]["ErrorInvoice"].ToString())).ToString();
                lblErrorInvoice.Text     = dt.Rows[0]["ErrorInvoice"].ToString();
                lblreferenceId.Text      = dt.Rows[0]["referenceID"].ToString();
                tblInvoice.Visible       = true;
                lblUploadStatus.Text     = "Error";// +dt.Rows[0]["referenceID"].ToString();
                lblUploadStatus.CssClass = "text-danger";
                grd.DataSource           = dt;
                grd.DataBind();
            }
            else if (dt.Rows[0]["res"].ToString() == "3")
            {
                lblreferenceId.Text      = dt.Rows[0]["referenceID"].ToString();
                lblUploadStatus.Text     = "In Process";
                lblUploadStatus.CssClass = "text-danger";
                btnRefresh.Visible       = true;
            }
            else
            {
                lblUploadStatus.Text = dt.Rows[0]["Error"].ToString();
            }
        }
    }
Ejemplo n.º 2
0
    protected void btnConnectTOGSTIN_Click(object sender, EventArgs e)
    {
        objpl               = new PL_APILog();
        objpl.Ind           = 1;
        objpl.ActivityId    = 6;
        objpl.ActivityDesc  = "GSTR3B SAVE";
        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();
        DataTable dt = CLSCommon.CallApiPost("api/OTPRequest/GenerateOTP", objpl);

        if (dt != null)
        {
            if (dt.Rows[0]["res"].ToString() == "1")
            {
                divOTP.Visible     = true;
                lblOTPMessage.Text = "OTP Has Been Sent To your Mobile Number And EmailId Registered With GSTN..";
                hfLogId.Value      = dt.Rows[0]["LogId"].ToString();
            }
            else
            {
                lblOTPMessage.Text = "Some Error Occured In Process Please Try Again..";
            }
        }
        else
        {
            lblOTPMessage.Text = "Some Error Occured In Process Please Try Again..";
        }
        Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$(document).ready(function(){$('#OTPModal').modal('show');});", true);
    }
Ejemplo n.º 3
0
    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();
        }
    }
    public void GetClientstatusDashboard()
    {
        DropDownList       ddl   = (DropDownList)wucTaxPayerStrip.FindControl("ddlMonthYear");
        PL_ClientDashboard objpl = new PL_ClientDashboard();

        objpl.ind        = 1;
        objpl.ClientCode = Convert.ToInt32(HttpContext.Current.Session["ClientCode"]);
        // objpl.ClientCode = 52;
        objpl.ClientCodeOdp = Convert.ToInt32(HttpContext.Current.Session["ClientCodeOdp"]);
        // objpl.ClientCodeOdp = 136;
        objpl.GSTIN = HttpContext.Current.Session["ClientGSTNNO"].ToString();
        //objpl.GSTIN = "23CYBER1234I1ZA";
        objpl.MonthInd = Convert.ToInt32(ddl.SelectedValue.ToString());
        objpl.YearInd  = 0;
        DataTable dt = new DataTable();

        dt = CLSCommon.CallApiPost("api/ClientDashboard/GetClientstatusDashboard", objpl);
        if (dt.Rows.Count > 0)
        {
            // " Record Inserted Successfully"
        }
        else
        {
            // "Not Inserted"
        }
    }
Ejemplo n.º 5
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        //DropDownList ddl = (DropDownList)wucTaxPayerStrip.FindControl("ddlMonthYear");
        objpl               = new PL_APILog();
        objpl.Ind           = 5;
        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/ctrlGSTR3B/SaveGSTR3B", objpl);

        if (dt != null)
        {
            if (dt.Rows[0]["res"].ToString() == "1")
            {
                lblGSTR3B.Text = "Data Saved To GSTIN Refrence ID " + dt.Rows[0]["referenceID"].ToString();
            }
            else
            {
                lblGSTR3B.Text = dt.Rows[0]["Error"].ToString();
            }
        }
    }
    protected void btnUploadSummary_Click(object sender, EventArgs e)
    {
        objpl = new PL_APILog();
        //  DropDownList ddl = (DropDownList)wucTaxPayerStrip.FindControl("ddlMonthYear");

        objpl.Ind = 1;
        //  objplSigned.ReferenceId = lblreferenceId.Text;
        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.MonthCD       = int.Parse(Session["MonthYrCode"].ToString());
        DataTable dt = CLSCommon.CallApiPost("api/GSTR1File/GetSignedData", objpl);

        if (dt != null)
        {
            if (dt.Rows[0]["res"].ToString() == "1")
            {
                lblFileMessage.CssClass = "text-danger";
                ViewState["Summary"]    = dt.Rows[0]["Summary"].ToString();
                // JObject obj = JObject.Parse(dt.Rows[0]["Error"].ToString());
                lblFileMessage.Text = dt.Rows[0]["Message"].ToString();
            }
            else
            {
                lblFileMessage.CssClass = "text-danger";
                // JObject obj = JObject.Parse(dt.Rows[0]["Error"].ToString());
                lblFileMessage.Text = dt.Rows[0]["Error"].ToString();
            }
        }
    }
    protected void btnGetSummary_Click(object sender, EventArgs e)
    {
        divOTPSuccess.Style.Add("display", "none");

        // DropDownList ddl = (DropDownList)wucTaxPayerStrip.FindControl("ddlMonthYear");
        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();
                Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$(document).ready(function(){$('#viewsubmit').modal('show');});", true);
            }
            else
            {
                lblSummMessage.Text = dt.Rows[0]["Error"].ToString();
            }
        }
        else
        {
            lblSummMessage.Text = "Some Error Occured try Again.";
        }
    }
    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";
        }
    }
Ejemplo n.º 9
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        //  divOTPSuccess.Style.Add("display", "none");
        //DropDownList ddl = (DropDownList)wucTaxPayerStrip.FindControl("ddlMonthYear");
        objpl                = new PL_APILog();
        objpl.Ind            = 1;
        objpl.ReferenceId    = lblreferenceId.Text;
        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());
        tblInvoice.Visible   = false;
        lblUploadStatus.Text = "";
        btnRefresh.Visible   = false;
        DataTable dt = CLSCommon.CallApiPost("api/GSTR2File/SubmitGSTR2", objpl);

        if (dt != null)
        {
            if (dt.Rows[0]["res"].ToString() == "1")
            {
                lblSubmitMsg.CssClass = "text-success";
                lblSubmitMsg.Text     = "Data Submitted Successfully.";
            }
            else
            {
                lblSubmitMsg.CssClass = "text-danger";
                JObject obj = JObject.Parse(dt.Rows[0]["Error"].ToString());
                lblSubmitMsg.Text = obj.GetValue("message").ToString();
            }
        }
    }
Ejemplo n.º 10
0
    protected void btnUploadSummary_Click(object sender, EventArgs e)
    {
        objpl               = new PL_APILog();
        objpl.Ind           = 1;
        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.MonthCD       = int.Parse(Session["MonthYrCode"].ToString());
        DataTable dt = CLSCommon.CallApiPost("api/GSTR2File/GetSignedData", objpl);

        if (dt != null)
        {
            if (dt.Rows[0]["res"].ToString() == "1")
            {
                lblFileMessage.CssClass = "text-danger";
                ViewState["Summary"]    = dt.Rows[0]["Summary"].ToString();
                lblFileMessage.Text     = dt.Rows[0]["Message"].ToString();
            }
            else
            {
                lblFileMessage.CssClass = "text-danger";
                lblFileMessage.Text     = dt.Rows[0]["Error"].ToString();
            }
        }
    }
Ejemplo n.º 11
0
    protected void btnGetB2B_Click(object sender, EventArgs e)
    {
        divOTPSuccess.Attributes.Add("class", "col-sm-12 col-xs-12 alert alert-success success");

        objGSTR2A = new PL_GSTR2A();

        objGSTR2A.Ind           = 1;
        objGSTR2A.ClientCode    = int.Parse(Session["ClientCode"].ToString());
        objGSTR2A.ClientCodeOdp = int.Parse(Session["ClientCodeOdp"].ToString());
        objGSTR2A.CaCode        = int.Parse(Session["CaCode"].ToString());
        objGSTR2A.CaCodeOdp     = int.Parse(Session["CaCodeOdp"].ToString());
        objGSTR2A.GSTNNO        = Session["ClientGSTNNo"].ToString();
        objGSTR2A.LogId         = Convert.ToInt64(hfLogId.Value.ToString());
        objGSTR2A.MonthCD       = Convert.ToInt32(Session["MonthYrCode"].ToString());

        divOTPSuccess.Style.Add("display", "block");
        DataTable dt = CLSCommon.CallApiPost("api/GSTR2A/GetGSTR2AData", objGSTR2A);

        if (dt != null)
        {
            if (dt.Rows[0]["res"].ToString() == "1")
            {
                lblGSTR2AStatus.CssClass = "text-success";
                DataTable dtGroupFilte = new DataTable();
                ViewState["AllData"] = dt;
                if (rbtn_All.Checked == true)
                {
                    pnlGroupFilter.Visible   = false;
                    pnlUniqe.Visible         = false;
                    PnlAlldata.Visible       = true;
                    grdGSTR2AData.DataSource = dt;
                    grdGSTR2AData.DataBind();
                }
                else
                {
                    PnlAlldata.Visible     = false;
                    pnlGroupFilter.Visible = true;
                    pnlUniqe.Visible       = false;
                }

                if (dt.Rows.Count > 0)
                {
                    dtGroupFilte = dt.DefaultView.ToTable(true, "PurchGSTIN");

                    GridGroupFilter.DataSource = dtGroupFilte;
                    GridGroupFilter.DataBind();
                }
                //  ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "ShowSummModal();", true);
                // Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$('#GSTR2AModal').modal('show');", true);
                // lblGSTR2AStatus.Text = dt.Rows[0]["data"].ToString();
            }
            else
            {
                lblGSTR2AStatus.CssClass = "text-danger";
                lblGSTR2AStatus.Text     = dt.Rows[0]["Error"].ToString();
            }
        }
    }
    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");
                }
            }
        }
    }
Ejemplo n.º 13
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        lblMsg.Text     = "";
        lblMsg.CssClass = "";
        DataTable dt = CreatGridDtItem();

        foreach (ListItem lst in chkListMainMenu.Items)
        {
            if (lst.Selected)
            {
                DataRow dr = dt.NewRow();
                dr["MenuId"]   = lst.Value;
                dr["MenuDesc"] = lst.Text;
                dt.Rows.Add(dr);
            }
        }
        if (ddlUserLevel.SelectedIndex <= 0)
        {
            ShowMessage("Please Select User Level", false);
            ddlUserLevel.Focus();
            return;
        }
        if (ddlClient_Ca_Arti.SelectedIndex <= 0)
        {
            ShowMessage("Please Select CA / Article / Client", false);
            ddlUserLevel.Focus();
            return;
        }
        if (dt.Rows.Count <= 0)
        {
            ShowMessage("Please Select At Least One Menu", false);
            return;
        }

        if (VsdtGvItemDetail == null || VsdtGvItemDetail.Rows.Count <= 0)
        {
            ShowMessage("Please Add Menu In Grid First", false);
            return;
        }
        plob.Ind           = 5;
        plob.UserLevelId   = Convert.ToInt32(ddlUserLevel.SelectedValue);
        plob.UserLevelDesc = ddlUserLevel.SelectedItem.Text;
        plob.ClientId      = Convert.ToInt32(Session["CaCode"]);
        plob.ClientIdOdp   = Convert.ToInt32(Session["CaCodeOdp"]);
        plob.LoginId       = Convert.ToInt32(Session["UserCode"]);
        plob.CAAdminCode   = Convert.ToInt32(Session["CaCode"]);
        plob.dt_Menu       = VsdtGvItemDetail;
        DataTable dtApi = new DataTable();

        dtApi = CLSCommon.CallApiPost("api/MenuAllotment/MenuAllotmentSave", plob);
        if (dtApi.Rows.Count > 0)
        {
            Clear();
            ShowMessage("Record Save Successfully....!!!!", true);
        }
    }
Ejemplo n.º 14
0
    protected void btnVerify_Click(object sender, EventArgs e)
    {
        if (txtOtp.Text.Trim() == "")
        {
            return;
        }
        else if (hfLogId.Value.ToString() == "")
        {
            return;
        }
        else
        {
            objpl               = new PL_APILog();
            objpl.Ind           = 3;
            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.OTP           = txtOtp.Text;

            divOTPSuccess.Attributes.Remove("class");
            divOTPSuccess.Style.Add("display", "block");
            DataTable dt = CLSCommon.CallApiPost("api/OTPRequest/VerifyOTP", objpl);
            if (dt != null)
            {
                if (dt.Rows[0]["res"].ToString() == "1")
                {
                    lblSuccess.InnerText = "Verified Successfully.";
                    divOTP.Enabled       = false;
                    divOTPSuccess.Attributes.Add("class", "col-sm-12 col-xs-12 alert alert-success success");
                    divSaveTOGSTN.Visible = true;
                    pnlFile.Visible       = true;
                    divSubmit.Visible     = true;
                    divSummary.Visible    = true;
                    CheckSession();
                }
                else
                {
                    lblSuccess.InnerText = dt.Rows[0]["Message"].ToString();
                    divOTPSuccess.Attributes.Add("class", "col-sm-12 col-xs-12 alert alert-danger denger");
                    divOTP.Visible = true;
                    divOTP.Enabled = true;
                }
            }
            else
            {
                lblSuccess.InnerText = "Error Occured In verifying OTP Try Again.";
                divOTPSuccess.Attributes.Add("class", "col-sm-12 col-xs-12 alert alert-danger denger");
                divOTP.Visible = true;
                divOTP.Enabled = true;
            }
        }
    }
    protected void btnRegisterDSC_Click(object sender, EventArgs e)
    {
        if (hfLogId.Value.ToString() == "")
        {
            return;
        }
        else
        {
            objdscpl               = new PL_DSCRegByTrueCopy();
            objdscpl.Ind           = 3;
            objdscpl.ClientCode    = int.Parse(Session["ClientCode"].ToString());
            objdscpl.ClientCodeOdp = int.Parse(Session["ClientCodeOdp"].ToString());
            objdscpl.CaCode        = int.Parse(Session["CaCode"].ToString());
            objdscpl.CaCodeOdp     = int.Parse(Session["CaCodeOdp"].ToString());
            objdscpl.GSTNNO        = Session["ClientGSTNNo"].ToString();
            objdscpl.LogId         = Convert.ToInt64(hfLogId.Value.ToString());
            //objpl.OTP = txtOtp.Text;
            DataTable dt = CLSCommon.CallApiPost("api/DSCRegByTrueCopy/RegisterDSC", objdscpl);
            if (dt != null)
            {
                if (dt.Rows[0]["res"].ToString() == "1")
                {
                    lblUploadStatus.Text     = "DSC Regitration Successfully With GSTN.";
                    lblUploadStatus.CssClass = "text-success";
                    divOTP.Enabled           = false;
                    // divOTPSuccess.Attributes.Add("class", "col-sm-12 col-xs-12 alert alert-success success");
                    divRegisterDSC.Visible = true;
                }
                else
                {
                    lblUploadStatus.CssClass = "text-danger";

                    if (dt.Rows[0]["Error"].ToString() == "PENDING")
                    {
                        lblUploadStatus.Text = "Uploaded Hash is pending for Approval, Please Approve Uploaded Hash.";
                    }
                    else
                    {
                        lblUploadStatus.Text = dt.Rows[0]["Error"].ToString();
                    }
                    //divOTPSuccess.Attributes.Add("class", "col-sm-12 col-xs-12 alert alert-danger denger");
                }
            }
            else
            {
                lblUploadStatus.Text     = "Error Occured In Registering DSC.";
                lblUploadStatus.CssClass = "text-danger";
                //divOTPSuccess.Attributes.Add("class", "col-sm-12 col-xs-12 alert alert-danger denger");
            }
        }
    }
Ejemplo n.º 16
0
    protected void btnValidate_Click(object sender, EventArgs e)
    {
        X509Store store = new X509Store(StoreLocation.CurrentUser);

        store.Open(OpenFlags.ReadOnly);
        X509CertificateCollection certificates = X509Certificate2UI.SelectFromCollection(store.Certificates,
                                                                                         "Select Certificate",
                                                                                         "Select Certificate for encrypting return",
                                                                                         X509SelectionFlag.SingleSelection
                                                                                         );

        X509Certificate2 mycert = null;

        foreach (X509Certificate2 cert in store.Certificates)
        {
            if (cert.Subject.Contains("CN=BHAGWAT SINGH NAGORI"))
            {
                //byte[] certbyte = Encoding.ASCII.GetBytes(cert.ToString());
                mycert = cert;
                break;
            }
        }
        store.Close();
        objpl                = new PL_APILog();
        objpl.Ind            = 3;
        objpl.ReferenceId    = lblreferenceId.Text;
        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());
        tblInvoice.Visible   = false;
        lblUploadStatus.Text = "";
        btnRefresh.Visible   = false;
        DataTable dt = CLSCommon.CallApiPost("api/GetSignedData/GetSignedData", objpl);

        if (dt != null)
        {
            if (dt.Rows[0]["res"].ToString() == "1")
            {
                byte[] SignByte = Convert.FromBase64String(dt.Rows[0]["SignedData"].ToString());
                //byte[] SignByte = Encoding.ASCII.GetBytes(EDecodedStringnc);
                bool Check = ClsSignUtil.Verify(SignByte, mycert);
            }
        }
    }
Ejemplo n.º 17
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        objpl                      = new PL_ClientProfile();
        objpl.Ind                  = 1;
        objpl.StateCode            = int.Parse(ddlState.SelectedValue.ToString());
        objpl.DistrictCode         = 0;
        objpl.CityCode             = int.Parse(ddlCity.SelectedIndex < 0 ? "0" : ddlCity.SelectedValue.ToString());
        objpl.ClientType           = 0;
        objpl.FirmName             = txtOrganisationName.Text;
        objpl.ClientNameE          = txtName.Text;
        objpl.ClientNameH          = txtName.Text;
        objpl.ClientDesg           = txtDesignation.Text;
        objpl.ClientMobileNo1      = txtMobileNo.Text;
        objpl.ClientMobileNo2      = txtAlternateMobile.Text;
        objpl.LandLineNo           = txtLandLineNo.Text;
        objpl.EmailId              = txtEmailId.Text;
        objpl.ClientPANNo          = txtPanNo.Text.ToUpper();
        objpl.AadhaarNo            = txtAadhaarNo.Text;
        objpl.AlternateContactName = txtAlternatePerson.Text;
        objpl.AlternateMobileNo    = txtAlternateMobile.Text;
        objpl.AlternateEmailid     = txtEmailId.Text;
        objpl.BankName             = txtBankName.Text;
        objpl.BranchName           = txtBranchName.Text;
        objpl.IFSCCode             = IFSCCode.Text.ToUpper();
        objpl.AccountNo            = txtAccountNo.Text;
        objpl.DependentInd         = 1;
        objpl.CACode               = int.Parse(Session["CACode"].ToString());
        objpl.CACodeOdp            = 0;
        objpl.ActiveInd            = 1;
        objpl.LoginUserCode        = 0;
        objpl.RefnoOtherSys        = 0;
        objpl.BussinessTypeId      = int.Parse(ddlBussinessType.SelectedValue.ToString());
        objpl.BussinessNatureId    = int.Parse(ddlBussinessNature.SelectedValue.ToString());
        objpl.FullAddress          = txtFullAddress.Text;
        objpl.PinCode              = txtPinCode.Text;
        objpl.RegNo                = 0;//int.Parse(Session["RegNo"].ToString());
        objpl.GSTINNo              = txtGSTINNo.Text.ToUpper();
        DataTable dt = CLSCommon.CallApiPost("api/ClientProfile/SaveClientData/", objpl);

        if (dt.Rows.Count > 0)
        {
            pnlError.Visible    = true;
            Session["ErrorMsg"] = dt.Rows[0]["ErrorMsg"].ToString();
            Response.Redirect("frmSubmitted.aspx");
            lblMsg.Text = "Record Saved Successfully. Client Code : " + dt.Rows[0]["ClientCode"].ToString();
            clear();
        }
    }
Ejemplo n.º 18
0
    protected void btnGetSummary_Click(object sender, EventArgs e)
    {
        GridGSTR1Summ.DataSource = null;
        GridGSTR1Summ.DataBind();
        //  divOTPSuccess.Style.Add("display", "none");

        //   DropDownList ddl = (DropDownList)wucTaxPayerStrip.FindControl("ddlMonthYear");
        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/GSTR1File/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();
                ClsGSTR1Summ objGstr1summ = JsonConvert.DeserializeObject <ClsGSTR1Summ>(dt.Rows[0]["Summary"].ToString());

                GridGSTR1Summ.DataSource = objGstr1summ.sec_sum;
                GridGSTR1Summ.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.";
        }
    }
Ejemplo n.º 19
0
    //protected void ddlState_SelectedIndexChanged(object sender, EventArgs e)
    //{
    //    DataSet ds = CLSCommon.CallApiGet("api/AddCAAdmin/FillDdlState?Ind=3&StateCode=" + ddlState.SelectedValue.ToString());
    //    if (ds.Tables.Count > 0)
    //    {
    //        ddlCity.DataSource = ds.Tables[0];
    //        ddlCity.DataTextField = "CityDesc";
    //        ddlCity.DataValueField = "CityCode";
    //        ddlCity.DataBind();
    //        ddlCity.Items.Insert(0, new ListItem("Select", "0"));
    //        ddlCity.Focus();
    //        Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$(document).ready(function(){ $('#ContentPlaceHolder1_ddlCity_chzn').focus();});", true);
    //    }
    //}
    protected void btnSave_Click1(object sender, EventArgs e)
    {
        PL_AddCaAdmin objpl = new PL_AddCaAdmin();

        objpl.Ind = 1;
        // objpl.StateCode = int.Parse(ddlState.SelectedValue.ToString());
        objpl.DistrictCode = 0;
        // objpl.CityCode = ddlCity.SelectedIndex == -1 ? 0 : int.Parse(ddlCity.SelectedValue.ToString());
        objpl.CACode    = 0;
        objpl.CaCodeOdp = 0;
        //   objpl.CaFirmType = int.Parse(ddlConsultantType.SelectedValue.ToString());
        objpl.CaNameE = txtName.Text.Trim();
        objpl.CaNameH = txtName.Text.Trim();
        //  objpl.CaFirmNm = txtOrganisationName.Text.Trim();
        //  objpl.CaFirmAddress = txtFullAddress.Text.Trim();
        //  objpl.CaFirmCityCode = ddlCity.SelectedIndex == -1 ? 0 : int.Parse(ddlCity.SelectedValue.ToString());
        // objpl.CaFirmPinCode = txtPinCode.Text.Trim();
        //  objpl.CaFirmStateCode = int.Parse(ddlState.SelectedValue.ToString());
        objpl.CaMobileNo1 = txtMobileNo.Text.Trim();
        //  objpl.CaMobileNo2 = txtAlternateMobile.Text.Trim();
        //  objpl.CaLandlineNo = txtLandLineNo.Text.Trim();
        //objpl.CaadhaarNo = txtAadhaarNo.Text.Trim();
        objpl.CaEmailid = txtEmailId.Text.Trim();
        // objpl.AlternativeContactname = txtAlternatePerson.Text.Trim();
        //   objpl.AlternateMobileNo = txtAlternateMobile.Text.Trim();
        //   objpl.AlternateEmailid = txtAlternateEmailId.Text.Trim();
        objpl.AdminCAInd         = 2;
        objpl.AdminCaCode        = int.Parse(Session["CaCode"].ToString());
        objpl.MainAdminCaOdpCode = int.Parse(Session["CaCodeOdp"].ToString());
        objpl.LoginUserCode      = 0;//int.Parse(Session["UserCode"].ToString());
        DataTable dt = CLSCommon.CallApiPost("api/AddCAAdmin/SaveData/", objpl);

        if (dt.Rows.Count > 0)
        {
            pnlError.Visible    = true;
            Session["ErrorMsg"] = dt.Rows[0]["ErrorMsg"].ToString();
            Response.Redirect("frmSubmitted.aspx");
            //  lblMsg.Text = "Record Saved Successfully. Client Code : " + dt.Rows[0]["ClientCode"].ToString();
        }
        ClearAllControls();
    }
Ejemplo n.º 20
0
    void UpdateData(int AllotCaCode, int ClientCode, int ClientCodeOdp, string GSTNNO, int OdpGSTNNO, string ClientName)
    {
        objpl                 = new PL_CAAllotment();
        objpl.Ind             = 2;
        objpl.CaCode          = int.Parse(Session["CaCode"].ToString());
        objpl.CaCodeOdp       = int.Parse(Session["CaCodeOdp"].ToString());
        objpl.AllotmentCaCode = AllotCaCode;
        objpl.ClientCode      = ClientCode;
        objpl.ClientCodeOdp   = ClientCodeOdp;
        objpl.GSTNNO          = GSTNNO;
        objpl.OdpGSTNNO       = OdpGSTNNO;
        DataTable dt = CLSCommon.CallApiPost("api/CAAllotment/UpdateClientAllotment", objpl);

        if (dt.Rows.Count > 0)
        {
            pnlError.CssClass = "alert alert-success";
            lblMsg.Text       = "Ca Alloted Successfully Client Name : " + ClientName;
            pnlError.Visible  = true;
            GetAllClient();
        }
    }
 protected void btnUploadHasg_Click(object sender, EventArgs e)
 {
     if (hfLogId.Value.ToString() == "")
     {
         return;
     }
     else
     {
         objdscpl               = new PL_DSCRegByTrueCopy();
         objdscpl.Ind           = 1;
         objdscpl.ClientCode    = int.Parse(Session["ClientCode"].ToString());
         objdscpl.ClientCodeOdp = int.Parse(Session["ClientCodeOdp"].ToString());
         objdscpl.CaCode        = int.Parse(Session["CaCode"].ToString());
         objdscpl.CaCodeOdp     = int.Parse(Session["CaCodeOdp"].ToString());
         objdscpl.GSTNNO        = Session["ClientGSTNNo"].ToString();
         objdscpl.LogId         = Convert.ToInt64(hfLogId.Value.ToString());
         DataTable dt = CLSCommon.CallApiPost("api/DSCRegByTrueCopy/UploadHash", objdscpl);
         if (dt != null)
         {
             if (dt.Rows[0]["res"].ToString() == "1")
             {
                 lblUploadStatus.Text     = "Hash Uploaded Successfully.";
                 lblUploadStatus.CssClass = "text-success";
                 divOTP.Enabled           = false;
                 divRegisterDSC.Visible   = true;
             }
             else
             {
                 lblUploadStatus.Text     = dt.Rows[0]["Error"].ToString();
                 lblUploadStatus.CssClass = "text-danger";
             }
         }
         else
         {
             lblUploadStatus.Text     = "Error Occured In Hash Uploading.";
             lblUploadStatus.CssClass = "text-danger";
         }
     }
 }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        objpl           = new PL_AddArticle();
        objpl.Ind       = 1;
        objpl.Name      = txtName.Text;
        objpl.MobileNo  = txtMobileNo.Text;
        objpl.EmailId   = txtEmailId.Text;
        objpl.CaCode    = int.Parse(Session["CaCode"].ToString());
        objpl.CaCodeOdp = int.Parse(Session["CaCodeOdp"].ToString());
        objpl.UserLevel = int.Parse(Session["UserLevel"].ToString());
        DataTable dt = CLSCommon.CallApiPost("api/Article/SaveArticle", objpl);

        if (dt != null)
        {
            if (dt.Rows.Count > 0)
            {
                pnlError.Visible    = true;
                Session["ErrorMsg"] = dt.Rows[0]["ErrorMsg"].ToString();
                Response.Redirect("frmSubmitted.aspx");
            }
        }
    }
    protected void btnGetSummary_Click(object sender, EventArgs e)
    {
        divOTPSuccess.Style.Add("display", "none");

        //  DropDownList ddl = (DropDownList)wucTaxPayerStrip.FindControl("ddlMonthYear");
        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/GSTR1File/GetSummary", objpl);

        if (dt != null)
        {
            if (dt.Rows[0]["res"].ToString() == "1")
            {
                txtSummary.Text = dt.Rows[0]["Summary"].ToString();
                UploadForSigning();
            }
            else
            {
                divsuccessmsg.CssClass = "alert alert-danger";
                divsuccessmsg.Visible  = true;
                lblSummMessage.Text    = dt.Rows[0]["Error"].ToString();
            }
        }
        else
        {
            divsuccessmsg.CssClass = "alert alert-danger";
            divsuccessmsg.Visible  = true;

            lblSummMessage.Text = "Some Error Occured try Again.";
        }
    }
Ejemplo n.º 24
0
    protected void btnSave_Click1(object sender, EventArgs e)
    {
        plobj                        = new PL_CARegis();
        plobj.Ind                    = 1;
        plobj.CA_Name                = txtName.Text;
        plobj.CA_OrganizationName    = txtOrganisationName.Text;
        plobj.CA_Category            = txtCategory.Text;
        plobj.CA_PANNo               = txtPanNo.Text;
        plobj.CA_MobileNo            = txtMobileNo.Text;
        plobj.CA_EmailId             = txtEmailId.Text;
        plobj.CA_ConsultantType      = ddlConsultantType.SelectedValue.ToString();
        plobj.CA_Designation         = txtDesignation.Text;
        plobj.CA_LandlineNo          = txtLandLineNo.Text;
        plobj.CA_AadharNo            = txtAadhaarNo.Text;
        plobj.CA_FullAddress         = txtFullAddress.Text;
        plobj.CA_State               = ddlState.SelectedValue.ToString();
        plobj.CA_City                = ddlCity.SelectedIndex < 0 ? "0" : ddlCity.SelectedValue.ToString();
        plobj.CA_PinCode             = txtPinCode.Text;
        plobj.CA_AlternateContPerson = txtAlternatePerson.Text;
        plobj.CA_AlternateMobileNo   = txtAlternateMobile.Text;
        plobj.CA_AlternateEmailId    = txtAlternateEmailId.Text;
        plobj.CA_BankName            = txtBankName.Text;
        plobj.CA_BranchName          = txtBranchName.Text;
        plobj.CA_IFSCCode            = IFSCCode.Text;
        plobj.CA_AC_No               = txtAccountNo.Text;

        DataTable dt = CLSCommon.CallApiPost("api/CARegis/SaveData/", plobj);

        if (dt.Rows.Count > 0)
        {
            pnlError.Visible    = true;
            Session["ErrorMsg"] = dt.Rows[0]["ErrorMsg"].ToString();
            Response.Redirect("frmSubmitted.aspx");
            lblMsg.Text = "Record Saved Successfully. Client Code : " + dt.Rows[0]["ClientCode"].ToString();
        }
        ClearAllControls();
    }
Ejemplo n.º 25
0
    protected void btnGSTR1Data_Click(object sender, EventArgs e)
    {
        divOTPSuccess.Attributes.Add("class", "col-sm-12 col-xs-12 alert alert-success success");

        //DropDownList ddl = (DropDownList)wucTaxPayerStrip.FindControl("ddlMonthYear");
        objplGSTR1 = new PL_GetGSTR1Data();

        objplGSTR1.Ind           = 1;
        objplGSTR1.ClientCode    = int.Parse(Session["ClientCode"].ToString());
        objplGSTR1.ClientCodeOdp = int.Parse(Session["ClientCodeOdp"].ToString());
        // objPLLedger.CaCode = int.Parse(Session["CaCode"].ToString());
        // objPLLedger.CaCodeOdp = int.Parse(Session["CaCodeOdp"].ToString());
        objplGSTR1.GSTNNO = Session["ClientGSTNNo"].ToString();
        objplGSTR1.LogId  = Convert.ToInt64(hfLogId.Value.ToString());
        // objPLLedger.OTP = txtOtp.Text;
        objplGSTR1.MonthCD = Convert.ToInt32(Session["MonthYrCode"].ToString());
        // objplGSTR1.FromDate = "01-07-2017";
        //objplGSTR1.ToDate = "30-07-2017";
        // divOTPSuccess.Attributes.Remove("class");
        divOTPSuccess.Style.Add("display", "block");
        DataTable dt = CLSCommon.CallApiPost("api/GetGSTR1Data/" + ddlGstr1Type.SelectedValue.ToString(), objplGSTR1);

        if (dt != null)
        {
            if (dt.Rows[0]["res"].ToString() == "1")
            {
                lblLedgerStatus.CssClass = "text-success";
                lblLedgerStatus.Text     = dt.Rows[0]["data"].ToString();
            }
            else
            {
                lblLedgerStatus.CssClass = "text-danger";
                lblLedgerStatus.Text     = dt.Rows[0]["Error"].ToString();
            }
        }
    }
    protected void GetCashLedger_Click(object sender, EventArgs e)
    {
        divOTPSuccess.Attributes.Add("class", "col-sm-12 col-xs-12 alert alert-success success");


        objPLLedger = new PL_LegderApiLog();

        objPLLedger.Ind           = 1;
        objPLLedger.ClientCode    = int.Parse(Session["ClientCode"].ToString());
        objPLLedger.ClientCodeOdp = int.Parse(Session["ClientCodeOdp"].ToString());
        // objPLLedger.CaCode = int.Parse(Session["CaCode"].ToString());
        // objPLLedger.CaCodeOdp = int.Parse(Session["CaCodeOdp"].ToString());
        objPLLedger.GSTNNO = Session["ClientGSTNNo"].ToString();
        objPLLedger.LogId  = Convert.ToInt64(hfLogId.Value.ToString());
        // objPLLedger.OTP = txtOtp.Text;
        objPLLedger.MonthCD  = Convert.ToInt32(Session["MonthYrCode"].ToString());
        objPLLedger.FromDate = "01-07-2017";
        objPLLedger.ToDate   = "30-07-2017";
        // divOTPSuccess.Attributes.Remove("class");
        divOTPSuccess.Style.Add("display", "block");
        DataTable dt = CLSCommon.CallApiPost("api/ctrlLedger/Get_Ledger_BAL", objPLLedger);

        if (dt != null)
        {
            if (dt.Rows[0]["res"].ToString() == "1")
            {
                lblLedgerStatus.CssClass = "text-success";
                lblLedgerStatus.Text     = dt.Rows[0]["Response"].ToString();
            }
            else
            {
                lblLedgerStatus.CssClass = "text-danger";
                lblLedgerStatus.Text     = dt.Rows[0]["Error"].ToString();
            }
        }
    }
Ejemplo n.º 27
0
    void SaveMismatchAction(int ind, Int64 recordNo, int ActionId, string ActionDesc, string invoiceNo, Int64 RecordNo2A, DataTable dtinv, string PurchGSTIN, string G2APurchGSTIN, string G2AinvoiceNo)
    {
        //DropDownList ddl = (DropDownList)wucTaxPayerStrip.FindControl("ddlMonthYear");
        PL_GenerateMismatch objpl = new PL_GenerateMismatch();

        objpl.Ind           = ind;
        objpl.ClientCode    = int.Parse(Session["ClientCode"].ToString());
        objpl.ClientCodeOdp = int.Parse(Session["ClientCodeOdp"].ToString());
        objpl.GSTIN         = Session["ClientGSTNNO"].ToString();
        objpl.MonthCd       = int.Parse(Session["MonthYrCode"].ToString());
        objpl.ActionId      = ActionId;
        objpl.ActionDesc    = ActionDesc;
        objpl.RecordNo      = recordNo;
        objpl.UserCode      = int.Parse(Session["UserCode"].ToString());
        objpl.InvoiceNo     = invoiceNo;
        objpl.RecordNo2A    = RecordNo2A;
        objpl.dtInvoice     = dtinv;
        objpl.PurchGSTIN    = PurchGSTIN;
        objpl.G2APurchGSTIN = G2APurchGSTIN;
        objpl.G2AInvoiceNo  = G2AinvoiceNo;
        DataTable dt = CLSCommon.CallApiPost("api/GenerateMismatch/SaveMismatchAction", objpl);

        if (dt != null)
        {
            if (dt.Rows[0]["res"].ToString() == "1")
            {
                lblActinLabel.Text     = "Action Taken Successfully.";
                lblActinLabel.CssClass = "text-success";
            }
            else
            {
                lblActinLabel.Text     = "Invoice Already Available In GSTR-2.";
                lblActinLabel.CssClass = "text-danger";
            }
        }
    }
Ejemplo n.º 28
0
    private void Import_To_Grid(string FilePath, string Extension, string ExcelNo)
    {
        OleDbConnection  connExcel = null;
        OleDbCommand     cmdExcel;
        OleDbDataAdapter oda;

        try
        {
            string conStr = "";
            switch (Extension)
            {
            case ".xls":     //Excel 97-03
                conStr = ConfigurationManager.ConnectionStrings["Excel03ConString"]
                         .ConnectionString;
                break;

            case ".xlsx":     //Excel 07
                conStr = ConfigurationManager.ConnectionStrings["Excel07ConString"]
                         .ConnectionString;
                break;

            case ".xlsm":     //Excel 07
                conStr = ConfigurationManager.ConnectionStrings["Excel07ConString"]
                         .ConnectionString;
                break;

            default:
            {
                Panels.Attributes.Add("class", "alert alert-danger");
                lblMessage.Text = "Please Select Excel File Only.";
                Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$(document).ready(function(){$('#inputModal').modal('show');});", true);
                Panels.Visible = true;
                return;
                //break;
            }
            }
            conStr    = String.Format(conStr, FilePath + Extension, "Yes");
            connExcel = new OleDbConnection(conStr);
            cmdExcel  = new OleDbCommand();
            oda       = new OleDbDataAdapter();
            DataTable dt = new DataTable();

            cmdExcel.Connection = connExcel;
            DataTable dt1 = new DataTable();
            DataTable dt2 = new DataTable();
            //Get the name of First Sheet
            connExcel.Open();
            DataTable dtExcelSchema;
            dtExcelSchema = connExcel.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
            string SheetName = dtExcelSchema.Rows[0]["TABLE_NAME"].ToString();

            connExcel.Close();
            // string str1 = " ";
            //Read Data from First Sheet
            connExcel.Open();
            if (rdbExcelOswal.Checked)
            {
                cmdExcel.CommandText = "SELECT [LineNo],[ClientGstin],[DocType],[Billgstin] ,[InvoiceNo],Format( [InvoiceDate],'yyyy/MM/dd') AS [InvoiceDate],[InvoiceValue] ,[GoodsSacInd] ,[HsnSacCode],[HsnSacDesc] ,[ItemTaxRate],[Quantity],[Unit] ,[ItemTaxableVal] ,[IgstTax] ,[CgstTax] ,[SGstTax] ,[CessRate],[CessAmount] ,[SuppyStatecode] ,[Suppystateename] ,[ReverseChargInd] ,[E-commerceInd] ,[EcommGstin] ,[ZeroDeemedExp],[shippBillExportNo] ,Format([shippBillExportDate],'yyyy/MM/dd') AS  [shippBillExportDate],[OrignalInvoNo] ,[OrignalGstIn] ,Format([OrignalInvoDt],'yyyy/MM/dd') AS [OrignalInvoDt] ,[ind],[Validate],[Reason For Issuing document],[UR Type]  From [GSTR1Sales$] where [LineNo] IS NOT NULL";
            }
            else
            {
                DataSet ds = CLSCommon.CallApiGet("api/ImportTaxPayerData/GetClientExcelQuery?Ind=1&ClientCode=" + Session["ClientCode"].ToString());
                if (ds != null)
                {
                    if (ds.Tables[0].Rows[0]["Query"].ToString() == "0")
                    {
                        Panels.Attributes.Add("class", "alert alert-danger");
                        lblMessage.Text = "Your Excel file is not mapped with oswal excel file. Please Map Your Excel File To Oswal Excel File.";
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$(document).ready(function(){$('#inputModal').modal('show');});", true);
                        Panels.Visible = true;
                        connExcel.Close();
                        return;
                    }
                    else
                    {
                        cmdExcel.CommandText = ds.Tables[0].Rows[0]["Query"].ToString();
                    }
                }
                else
                {
                    return;
                }
            }
            //"SELECT [SNO#],[Month],[Year],[ClientGstin] ,[Legal Name] ,[TradeName] ,[AggrturnOver] ,[AggrturnOverAprJune] ,[ClientStatecode] ,[Billgstin] ,[InvoiceNo] ,[InvoiceDate] ,[InvoiceValue] ,[GoodsSacInd] ,[HsnSacCode] ,[HsnSacDesc] ,[ItemRate] ,[ItemTaxableVal] ,[IgstTax] ,[CgstTax] ,[SGstTax] ,[Cess] ,[SuppyStatecode] ,[Suppystateename] ,[ReverseChargInd] ,[E-commerceInd] ,[EcommGstin] ,[shippBillExportNo] ,[shippBillExportDate]  ,[NillExmNonGstInd] ,[SaleAmdRecInd] ,[OrignalInvoNo] ,[OrignalGstIn] ,[OrignalInvoDt] ,[AdvanceSalInd] ,[AdvRecvOrAdjustInd] ,[ind],[ZeroDeemedSezInd],[ZeroDeemedSezDesc]  From [Sheet1$] where [Month] IS NOT NULL";

            oda.SelectCommand = cmdExcel;
            oda.Fill(dt);
            //dt.Columns[4].DataType = typeof(string);
            cmdExcel.CommandText = "Select [LineNo],	InfoPeriod,	AdvAdjInd,	Rate,	GrossAdvAdj	,PosCode	,PosName	,IGSTTax	,CGSTTax	,SGSTTax	,CessTax from [GSTR1Adv$] where [LineNo] is not null";
            oda.Fill(dt1);
            cmdExcel.CommandText = "Select [LineNo],	[Nature Of Doc],	[SrNo From],	[SrNo To],	[Total Number],	[Cancelled],[Net Issued] from [DocIssued$] where [LineNo] is not null";
            oda.Fill(dt2);
            //dt.Columns["shippBillExportDate"].DataType = typeof(DateTime);
            //dt.Columns["InvoiceDate"].DataType = typeof(DateTime);
            //dt.Columns["OrignalInvoDt"].DataType = typeof(DateTime);
            connExcel.Close();
            PL_ImportTaxPayerData objpl = new PL_ImportTaxPayerData();
            //objpl.dt = dt;
            objpl.ds.Tables.Add(dt);
            objpl.ds.Tables.Add(dt1);
            objpl.ds.Tables.Add(dt2);
            objpl.ds.Tables[0].TableName = "Table1";
            objpl.ds.Tables[1].TableName = "Table2";
            objpl.ds.Tables[2].TableName = "Table3";
            objpl.ind           = 1;
            objpl.UserCode      = int.Parse(Session["UserCode"].ToString());
            objpl.ClientCode    = int.Parse(Session["ClientCode"].ToString());
            objpl.ClientCodeOdp = int.Parse(Session["ClientCodeOdp"].ToString());
            //Label lbl = (Label)wucTaxPayerStrip.FindControl("lblGSTINNo");
            objpl.ClientGSTNNO  = Session["ClientGSTNNO"].ToString();//lbl.Text;
            objpl.CACode        = int.Parse(Session["CaCode"].ToString());
            objpl.CaCodeOdp     = int.Parse(Session["CaCodeOdp"].ToString());
            objpl.MonthCD       = int.Parse(Session["MonthYrCode"].ToString());
            objpl.MonthYearDesc = Session["MonthYearDesc"].ToString();
            objpl.ExcelType     = rdbSale.Checked ? 1 : 2;
            objpl.ExcelNo       = int.Parse(ExcelNo);
            DataTable dtresponse = CLSCommon.CallApiPost("api/ImportTaxPayerData/ImportData", objpl);
            if (dtresponse != null)
            {
                if (dtresponse.Rows.Count > 0)
                {
                    if (dtresponse.Rows[0][0].ToString() == "1")
                    {
                        //  DataSet ds1 = CLSCommon.CallApiGet("api/GSTR1Payload/SaveSGTR1Payload?Ind=1&ClientCode=" + Session["ClientCode"].ToString() + "&ClientCodeOdp=" + Session["ClientCodeOdp"].ToString() + "&CaCode=" + Session["CaCode"].ToString() + "&CacodeOdp=" + Session["CacodeOdp"].ToString() + "&GSTIN=" + Session["ClientGSTNNO"].ToString() + "&MonthCD=" + ddlMonthYear.SelectedValue.ToString() + "&UserCode=" + Session["UserCode"].ToString() + "&ExcelNo=" + dtresponse.Rows[0]["ExcelNo"].ToString());
                        // txtPayload.Text = ds1.Tables[0].Rows[0]["Payload"].ToString();
                        // lnkbtn1.Visible = true;
                        Panels.Visible          = true;
                        lnkbtnViewError.Visible = false;
                        Panels.Attributes.Add("class", "alert alert-success");
                        lblTotalRecords.Text = dt.Rows.Count.ToString();
                        lblImported.Text     = dt.Rows.Count.ToString();
                        lblMessage.Text      = "Excel Imported Successfully. \n Total Rows : " + dt.Rows.Count.ToString();
                        // lnkbtn.Visible = true;
                    }
                    else if (dtresponse.Rows[0][0].ToString() == "2")
                    {
                        Label lblOrganisation = (Label)wucTaxPayerStrip.FindControl("lblClientName");
                        Panels.Visible = true;
                        Panels.Attributes.Add("class", "alert alert-warning");
                        lblTotalRecords.Text = "0";
                        lblImported.Text     = "0";

                        lblMessage.Text = "Excel File Data Contains Validity Errors Download Error Invoices Here.";

                        StringBuilder sb = new StringBuilder();
                        sb.AppendLine("-------------------------------------------------------------------------------------------------------------");
                        sb.AppendLine("-------------------------------------------------------------------------------------------------------------");
                        sb.AppendLine("");
                        sb.AppendLine("***GST SAATHI REUTRN FILING PORTAL****                           Client Code : " + Session["ClientCode"].ToString());
                        sb.AppendLine("");
                        sb.AppendLine("   SALES DATA IMPORT VALIDITY :                                  Client Name : " + lblOrganisation.Text);
                        sb.AppendLine("   Date & Time : " + DateTime.Parse(dtresponse.Rows[0]["CurrentDate"].ToString()).ToString("dd/MM/yyyy HH:mm:ss tt") + "                          Client GSTIN : " + Session["ClientGSTNNO"].ToString());
                        sb.AppendLine("");
                        sb.AppendLine("-------------------------------------------------------------------------------------------------------------");
                        sb.AppendLine("-------------------------------------------------------------------------------------------------------------");
                        sb.AppendLine("");
                        sb.AppendLine("LineNo|Invoice No.    |Invoice Date|Invoice Value|Error Desc With Code");
                        foreach (DataRow dr in dtresponse.Rows)
                        {
                            sb.AppendLine(dr["LineNo"].ToString().PadRight(6, ' ') + "|" + dr["CurrInvoiceNo"].ToString().PadRight(15, ' ') + "|" + dr["InvoiceDate"].ToString().PadRight(12, ' ') + "|" + dr["TotInvoiceValue"].ToString().PadRight(13, ' ') + "|" + dr["ErrorCode"].ToString() + " - " + dr["ErrorDesc"].ToString());
                        }
                        sb.AppendLine("");
                        sb.AppendLine("******************************************END OF THE RECORDS***************************************************");
                        System.IO.File.WriteAllText(Server.MapPath("~/ErrorTextFile/" + ExcelNo + ".txt"), sb.ToString());
                        lnkbtnViewError.Attributes.Add("href", "../ErrorTextFile/" + ExcelNo + ".txt");
                        lnkbtnViewError.Attributes.Add("download", "GSTR1_ErrorFile_" + ExcelNo);
                        //lnkbtnViewError.Attributes.Add("target", "_blanck");
                        lnkbtnViewError.Visible = true;
                    }
                    else
                    {
                        Panels.Visible = true;
                        Panels.Attributes.Add("class", "alert alert-warning");
                        lblTotalRecords.Text = "0";
                        lblImported.Text     = "0";

                        lblMessage.Text = dtresponse.Rows[0]["ErrorMessage"].ToString().Replace("{{MonthYear}}", Session["MonthYearDesc"].ToString());
                    }
                }
                else
                {
                    lblTotalRecords.Text = "0";
                    lblImported.Text     = "0";
                    Panels.Visible       = true;
                    Panels.Attributes.Add("class", "alert alert-danger");
                    lblMessage.Text = "The File is not in the correct format.";
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$(document).ready(function(){$('#inputModal').modal('show');});", true);
                }
                // Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$(document).ready(function(){$('#inputModal').modal('show');});", true);
            }
            else
            {
                lblTotalRecords.Text = "0";
                lblImported.Text     = "0";
                Panels.Visible       = true;
                Panels.Attributes.Add("class", "alert alert-danger");
                lblMessage.Text = "The File is not in the correct format.";
                Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$(document).ready(function(){$('#inputModal').modal('show');});", true);
            }
        }

        catch (Exception ex)
        {
            connExcel.Close();
            lblTotalRecords.Text = "0";
            lblImported.Text     = "0";
            Panels.Visible       = true;
            Panels.Attributes.Add("class", "alert alert-danger");
            lblMessage.Text = ex.Message;//"The File is not in the correct format.";
        }
    }
Ejemplo n.º 29
0
    protected void Submit_Click(object sender, EventArgs e)
    {
        plobj                     = new PL_CARegis();
        plobj.Ind                 = 1;
        plobj.CA_Name             = Txt_CaName.Text.Trim().ToUpper();
        plobj.CA_OrganizationName = Txt_OrganizationName.Text;
        plobj.CA_MobileNo         = Txt_MobNo.Text;
        // plobj.CA_LandlineNo = Txt_LandLineNo.Text;
        plobj.CA_EmailId = Txt_EmailId.Text;
        plobj.DemoInd    = 1;

        DataTable dt = CLSCommon.CallApiPost("api/CARegis/SaveData/", plobj);

        if (dt.Rows.Count > 0)
        {
            if (dt.Rows[0]["res"].ToString() == "1")
            {
                string errormsg = dt.Rows[0]["ErrorMsg"].ToString();
                string Mobileno = dt.Rows[0]["CaMobileNo1"].ToString();
                string emailid  = dt.Rows[0]["CaEmailid"].ToString();
                string Password = dt.Rows[0]["Password"].ToString();

                StringBuilder sbmail = new StringBuilder();
                sbmail.AppendLine("Dear " + Txt_CaName.Text.Trim().ToUpper());
                sbmail.AppendLine("");
                sbmail.AppendLine("Thank you for showing interest in \"GST-SAATHI\" Return Filing Portal.");
                sbmail.AppendLine("");
                sbmail.AppendLine("To access the application please go to : http://www.gstsaathifiling.com.");
                sbmail.AppendLine("");
                sbmail.AppendLine("UserId :- " + Mobileno);
                sbmail.AppendLine("Password : "******"");
                // sb.AppendLine("Valid Only For 48 Hour" );
                sbmail.AppendLine("Regards");
                sbmail.AppendLine("Team-\"GST-SAATHI\"");
                sbmail.AppendLine("Missed Call No. : 08030-63-63-48");
                sbmail.AppendLine("Phone No. : +91-975502-44-44");
                sbmail.AppendLine("60, Electronics Complex");
                sbmail.AppendLine("Pardeshipura");
                sbmail.AppendLine("Indore-452010 (M.P.)");
                sbmail.AppendLine("India.");

                sbmail.AppendLine("http://www.gstsaathi.com");


                CLSCommon.SendMessage(Mobileno, sbmail.ToString());
                CLSCommon.SendHtmlFormattedEmail(sbmail.ToString(), Txt_EmailId.Text);
                Label_ErrorMsg.Visible = true;
                Label_ErrorMsg.Text    = "Thank You for showing interest in \"GST-Saathi\" . Login details have been sent to you via sms & email!";

                Txt_CaName.Text = "";
                // Txt_LandLineNo.Text = "";
                Txt_MobNo.Text            = "";
                Txt_OrganizationName.Text = "";
                Txt_EmailId.Text          = "";
            }
            else if (dt.Rows[0]["res"].ToString() == "0")
            {
                Label_ErrorMsg.Visible = true;
                Label_ErrorMsg.Text    = dt.Rows[0]["Message"].ToString();
            }
        }
    }
    protected void BtnExcelMapping_Click(object sender, EventArgs e)
    {
        if (txtMappingName.Text.Trim() == "")
        {
            lblmsg.Text = "Enter Mapping Name.";
            return;
        }
        else
        if (GridDdl.Rows.Count > 0)
        {
            int Flage = 0;
            foreach (GridViewRow row in GridDdl.Rows)
            {
                DropDownList ddlOdpExcel = (DropDownList)row.FindControl("DropDownList1");
                if (ddlOdpExcel.SelectedValue.ToString() == "-1")
                {
                    Flage++;
                    ddlOdpExcel.Focus();
                    row.Focus();
                    break;
                }
            }
            if (Flage > 0)
            {
                lblmsg.Text = "Please Map All Fields With Database.";
                return;
            }
            else
            {
                objpl             = new PL_ExcelMapping();
                objpl.Ind         = 2;
                objpl.ClientCode  = Convert.ToInt32(Session["ClientCode"]);
                objpl.MappingName = txtMappingName.Text.Trim();
                foreach (GridViewRow row in GridDdl.Rows)
                {
                    Label        lblClientExcel = (Label)row.FindControl("lblHeader");
                    DropDownList ddlOdpExcel    = (DropDownList)row.FindControl("DropDownList1");
                    objpl.ClientExcelField = ddlOdpExcel.SelectedItem.Text.ToString();
                    objpl.OdpExcelField    = lblClientExcel.Text;
                    DataTable dtresponse = new DataTable();
                    dtresponse = CLSCommon.CallApiPost("api/ExcelMapping/InsertExcelMapping", objpl);

                    if (dtresponse != null && dtresponse.Rows.Count > 0)
                    {
                        if (dtresponse.Rows[0]["Result"].ToString() == "1")
                        {
                            objpl.MappingId = int.Parse(dtresponse.Rows[0]["MappingId"].ToString());
                            lblmsg.Text     = "Excel File Mapped Successfully Complete";
                        }
                        else
                        {
                        }
                    }
                    else
                    {
                        lblmsg.Text = "Excel File Not Mapped";
                    }
                }
            }
        }
    }