Пример #1
0
        private void PrintInvoice(String HeadIdno)
        {
            InvoiceDAL obj      = new InvoiceDAL();
            String     CityName = Session["fromcity"] as string;

            dttemp = obj.city(ApplicationFunction.ConnectionString(), CityName);

            String  GRNo = HeadIdno;
            string  CompName = ""; string Add1 = "", Add2 = ""; string PhNo = ""; string City = ""; string State = ""; string PanNo; string TinNo = ""; string FaxNo = "";
            string  GSTIN    = "";
            DataSet CompDetl = SqlHelper.ExecuteDataset(ApplicationFunction.ConnectionString(), CommandType.Text, "select * from tblcompmast A Left JOIN tblCITYMASTER CM On CM.city_idno=A.city_idno Left join tblStateMaster SM ON SM.state_idno=A.state_idno");
            DataSet dsReport = SqlHelper.ExecuteDataset(ApplicationFunction.ConnectionString(), CommandType.Text, "EXEC [spInvGen] @ACTION='PJLBillINVOICE',@Id='" + HeadIdno + "'");

            CompName = Convert.ToString(CompDetl.Tables[0].Rows[0]["Comp_Name"]);
            Add1     = Convert.ToString(CompDetl.Tables[0].Rows[0]["Adress1"]);
            if (dttemp.Rows.Count > 0)
            {
                Add2 = Convert.ToString(dttemp.Rows[0]["Address1"]) + "," + Convert.ToString(dttemp.Rows[0]["Address2"]);
            }
            //PhNo = "Phone No. (O) :" + Convert.ToString(CompDetl.Tables[0].Rows[0]["Phone_Off"] + " " + CompDetl.Tables[0].Rows[0]["Phone_Res"]);
            PhNo        = Convert.ToString(CompDetl.Tables[0].Rows[0]["Phone_Off"] + "," + CompDetl.Tables[0].Rows[0]["Mobile_1"]);
            City        = Convert.ToString(CompDetl.Tables[0].Rows[0]["City_Name"]);
            State       = Convert.ToString(CompDetl.Tables[0].Rows[0]["State_Name"]) + "(CODE :-  " + Convert.ToString(dsReport.Tables[0].Rows[0]["GSTState_Code"]) + ")";
            TinNo       = Convert.ToString(CompDetl.Tables[0].Rows[0]["TIN_NO"]);
            FaxNo       = Convert.ToString(CompDetl.Tables[0].Rows[0]["Fax_No"]);
            PanNo       = Convert.ToString(CompDetl.Tables[0].Rows[0]["Pan_No"]);
            GSTIN       = Convert.ToString(CompDetl.Tables[0].Rows[0]["CompGSTIN_No"]);
            lblpin.Text = Convert.ToString(CompDetl.Tables[0].Rows[0]["Pin_No"]);

            lblCompname.Text = CompName; lblcom.Text = "For - " + CompName;
            lblCompAdd1.Text = Add1;
            lblcity.Text     = City;
            lblstate.Text    = State;
            lblmobile.Text   = PhNo;
            lbgst.Text       = GSTIN;
            lblpan.Text      = PanNo.ToString();

            if (dsReport != null && dsReport.Tables[1].Rows.Count > 0)
            {
                Repeater1.DataSource = dsReport.Tables[1];
                Repeater1.DataBind();
            }
            lblunit.Text     = Convert.ToString(dsReport.Tables[0].Rows[0]["unit"]);
            lblbillno.Text   = Convert.ToString(dsReport.Tables[0].Rows[0]["Inv_No"]);
            lblcontname.Text = Convert.ToString(dsReport.Tables[0].Rows[0]["Party_Name"]);
            lbladd1.Text     = Convert.ToString(dsReport.Tables[0].Rows[0]["Address1"]);
            lblcadd2.Text    = Convert.ToString(dsReport.Tables[0].Rows[0]["Address2"]);
            lbldis.Text      = Convert.ToString(dsReport.Tables[0].Rows[0]["City_Name"]);
            diccode.Text     = Convert.ToString(dsReport.Tables[0].Rows[0]["Pin_Code"]);
            lblst.Text       = Convert.ToString(dsReport.Tables[0].Rows[0]["State_Name"]) + "(CODE :-  " + Convert.ToString(dsReport.Tables[0].Rows[0]["GSTState_Code"]) + ")";
            lblgst.Text      = Convert.ToString(dsReport.Tables[0].Rows[0]["Party_GSTINNo"]);

            double lsttotal = Convert.ToDouble(lbltamount.Text);

            string[] str1        = lsttotal.ToString().Split('.');
            string   numbertoent = NumberToText(Convert.ToInt32(str1[0]));

            lblword.Text = numbertoent;
        }
Пример #2
0
        private void PrintInvoice(String HeadIdno)
        {
            ChallanConfirmationDAL obj = new ChallanConfirmationDAL();
            String GRNo = HeadIdno;

            string  CompName = ""; string Add1 = "", Add2 = ""; string PhNo = ""; string City = ""; string State = ""; string PanNo; string TinNo = ""; string FaxNo = "";
            string  GSTIN    = "";
            DataSet CompDetl = SqlHelper.ExecuteDataset(ApplicationFunction.ConnectionString(), CommandType.Text, "select * from tblcompmast");
            DataSet dsReport = SqlHelper.ExecuteDataset(ApplicationFunction.ConnectionString(), CommandType.Text, "EXEC [spInvGen] @ACTION='SelectPrint1',@Id='" + HeadIdno + "'");

            CompName         = Convert.ToString(CompDetl.Tables[0].Rows[0]["Comp_Name"]);
            Add1             = Convert.ToString(CompDetl.Tables[0].Rows[0]["Adress1"]);
            Add2             = Convert.ToString(CompDetl.Tables[0].Rows[0]["Adress2"]);
            PhNo             = Convert.ToString(CompDetl.Tables[0].Rows[0]["Phone_Off"]);
            City             = Convert.ToString(CompDetl.Tables[0].Rows[0]["City_Idno"]);
            State            = Convert.ToString(CompDetl.Tables[0].Rows[0]["State_Idno"]) + "(CODE :-  " + Convert.ToString(dsReport.Tables[0].Rows[0]["GSTState_Code"]) + ")";
            TinNo            = Convert.ToString(CompDetl.Tables[0].Rows[0]["TIN_NO"]);
            FaxNo            = Convert.ToString(CompDetl.Tables[0].Rows[0]["Fax_No"]);
            PanNo            = Convert.ToString(CompDetl.Tables[0].Rows[0]["Pan_No"]);
            GSTIN            = Convert.ToString(CompDetl.Tables[0].Rows[0]["CompGSTIN_No"]);
            lblpin.Text      = Convert.ToString(CompDetl.Tables[0].Rows[0]["Pin_No"]);
            lblCompname.Text = CompName; //lblcomp.Text = "For - " + CompName;
            lblCompAdd1.Text = Add1;

            lbladd2.Text   = Add2;
            lblcity.Text   = City;
            lblstate.Text  = State;
            lblmobile.Text = PhNo;
            lblgstin.Text  = GSTIN;
            lblpan.Text    = PanNo.ToString();
            if (dsReport != null && dsReport.Tables[1].Rows.Count > 0)
            {
                Repeater1.DataSource = dsReport.Tables[1];
                Repeater1.DataBind();
                Repeater2.DataSource = dsReport.Tables[1];
                Repeater2.DataBind();
            }
            lblunit.Text     = Convert.ToString(dsReport.Tables[0].Rows[0]["unit"]);
            lblbillno.Text   = Convert.ToString(dsReport.Tables[0].Rows[0]["Inv_No"]);
            lblbilldate.Text = Convert.ToDateTime(dsReport.Tables[0].Rows[0]["Inv_Date"]).ToString("dd-MM-yyyy");
            lblcontname.Text = Convert.ToString(dsReport.Tables[0].Rows[0]["Party_Name"]);
            lbladd1.Text     = Convert.ToString(dsReport.Tables[0].Rows[0]["Address1"]);
            lblcadd2.Text    = Convert.ToString(dsReport.Tables[0].Rows[0]["Address2"]);
            lblcity1.Text    = Convert.ToString(dsReport.Tables[0].Rows[0]["City_Name"]);
            lblst.Text       = Convert.ToString(dsReport.Tables[0].Rows[0]["State_Name"]);
            lblgst.Text      = Convert.ToString(dsReport.Tables[0].Rows[0]["Party_GSTINNo"]);
            Double T1 = Convert.ToDouble(lbltotal.Text);
            Double T2 = Convert.ToDouble(lbltot.Text);

            lblgrandtotal.Text = Convert.ToString((T1 + T2));
        }
Пример #3
0
        private void PrintInvoice(String HeadIdno)
        {
            InvoiceDAL obj      = new InvoiceDAL();
            Int64      inv      = Convert.ToInt64(HeadIdno);
            Int64      chlnidno = obj.ChlnIdno(ApplicationFunction.ConnectionString(), inv);
            String     chln     = Convert.ToString(chlnidno);

            String CityName = Session["fromcity"] as string;

            dttemp = obj.city(ApplicationFunction.ConnectionString(), CityName);


            string  CompName = ""; string Add1 = "", Add2 = ""; string PhNo = ""; string City = ""; string State = ""; string PanNo; string TinNo = ""; string FaxNo = "";
            string  GSTIN    = "";
            DataSet CompDetl = SqlHelper.ExecuteDataset(ApplicationFunction.ConnectionString(), CommandType.Text, "select * from tblcompmast A Left JOIN tblCITYMASTER CM On CM.city_idno=A.city_idno Left join tblStateMaster SM ON SM.state_idno=A.state_idno");
            DataSet dsReport = SqlHelper.ExecuteDataset(ApplicationFunction.ConnectionString(), CommandType.Text, "EXEC [spInvGen] @ACTION='SelectPrint1',@Id='" + HeadIdno + "'");
            DataSet TOLLinfo = SqlHelper.ExecuteDataset(ApplicationFunction.ConnectionString(), CommandType.Text, "EXEC [spInvGen] @ACTION='TOLLINFO',@Id='" + chln + "'");

            CompName         = Convert.ToString(CompDetl.Tables[0].Rows[0]["Comp_Name"]);
            Add1             = Convert.ToString(CompDetl.Tables[0].Rows[0]["Adress1"]);
            Add2             = Convert.ToString(dttemp.Rows[0]["Address1"]) + "," + Convert.ToString(dttemp.Rows[0]["Address2"]);
            PhNo             = Convert.ToString(CompDetl.Tables[0].Rows[0]["Phone_Off"] + "," + CompDetl.Tables[0].Rows[0]["Mobile_1"]);
            City             = Convert.ToString(CompDetl.Tables[0].Rows[0]["City_Name"]);
            State            = Convert.ToString(CompDetl.Tables[0].Rows[0]["State_Name"]) + "(CODE :-  " + Convert.ToString(dsReport.Tables[0].Rows[0]["GSTState_Code"]) + ")";
            TinNo            = Convert.ToString(CompDetl.Tables[0].Rows[0]["TIN_NO"]);
            FaxNo            = Convert.ToString(CompDetl.Tables[0].Rows[0]["Fax_No"]);
            PanNo            = Convert.ToString(CompDetl.Tables[0].Rows[0]["Pan_No"]);
            GSTIN            = Convert.ToString(CompDetl.Tables[0].Rows[0]["CompGSTIN_No"]);
            lblpin.Text      = Convert.ToString(CompDetl.Tables[0].Rows[0]["Pin_No"]);
            lblCompname.Text = CompName; //lblcomp.Text = "For - " + CompName;
            lblCompAdd1.Text = Add1;

            lbladd2.Text   = Add2;
            lblcity.Text   = City;
            lblstate.Text  = State;
            lblmobile.Text = PhNo;
            lblgstin.Text  = GSTIN;
            lblpan.Text    = PanNo.ToString();
            if (dsReport != null && dsReport.Tables[1].Rows.Count > 0)
            {
                Repeater1.DataSource = dsReport.Tables[1];
                Repeater1.DataBind();
            }
            if (TOLLinfo != null)
            {
                Repeater2.DataSource = TOLLinfo.Tables[0];
                Repeater2.DataBind();
            }
            lblunit.Text     = Convert.ToString(dsReport.Tables[0].Rows[0]["unit"]);
            lblbillno.Text   = Convert.ToString(dsReport.Tables[0].Rows[0]["Inv_No"]);
            lblbilldate.Text = Convert.ToDateTime(dsReport.Tables[0].Rows[0]["Inv_Date"]).ToString("dd-MM-yyyy");
            lblcontname.Text = Convert.ToString(dsReport.Tables[0].Rows[0]["Party_Name"]);
            lbladd1.Text     = Convert.ToString(dsReport.Tables[0].Rows[0]["Address1"]);
            lblcadd2.Text    = Convert.ToString(dsReport.Tables[0].Rows[0]["Address2"]);
            lblcity1.Text    = Convert.ToString(dsReport.Tables[0].Rows[0]["City_Name"]);
            lblst.Text       = Convert.ToString(dsReport.Tables[0].Rows[0]["State_Name"]);
            lblgst.Text      = Convert.ToString(dsReport.Tables[0].Rows[0]["Party_GSTINNo"]);
            Double T1 = Convert.ToDouble(lbltotal.Text);
            Double T2 = Convert.ToDouble(lbltot.Text);

            lblgrandtotal.Text = Convert.ToString((T1 + T2));
        }
Пример #4
0
        private void PrintInvoice(String HeadIdno)
        {
            InvoiceDAL obj      = new InvoiceDAL();
            Int64      inv      = Convert.ToInt64(HeadIdno);
            Int64      chlnidno = obj.ChlnIdno(ApplicationFunction.ConnectionString(), inv);
            String     chln     = Convert.ToString(chlnidno);

            String CityName = Session["fromcity"] as string;

            dttemp = obj.city(ApplicationFunction.ConnectionString(), CityName);

            string  CompName = ""; string Add1 = "", Add2 = ""; string PhNo = ""; string City = ""; string State = ""; string PanNo; string TinNo = ""; string FaxNo = "";
            string  GSTIN     = "";
            DataSet CompDetl  = SqlHelper.ExecuteDataset(ApplicationFunction.ConnectionString(), CommandType.Text, "select * from tblcompmast A Left JOIN tblCITYMASTER CM On CM.city_idno=A.city_idno Left join tblStateMaster SM ON SM.state_idno=A.state_idno");
            DataSet dsReport  = SqlHelper.ExecuteDataset(ApplicationFunction.ConnectionString(), CommandType.Text, "EXEC [spInvGen] @ACTION='TaxInvoicePrint',@Id='" + HeadIdno + "'");
            DataSet TOLLCOUNT = SqlHelper.ExecuteDataset(ApplicationFunction.ConnectionString(), CommandType.Text, "EXEC [spInvGen] @ACTION='TOLLCOUNT',@Id='" + chln + "'");

            CompName         = Convert.ToString(CompDetl.Tables[0].Rows[0]["Comp_Name"]);
            Add1             = Convert.ToString(CompDetl.Tables[0].Rows[0]["Adress1"]);
            Add2             = Convert.ToString(dttemp.Rows[0]["Address1"]) + "," + Convert.ToString(dttemp.Rows[0]["Address2"]);
            PhNo             = Convert.ToString(CompDetl.Tables[0].Rows[0]["Phone_Off"] + "," + CompDetl.Tables[0].Rows[0]["Mobile_1"]);
            City             = Convert.ToString(CompDetl.Tables[0].Rows[0]["City_Name"]);
            State            = Convert.ToString(CompDetl.Tables[0].Rows[0]["State_Name"]) + "(CODE :-  " + Convert.ToString(dsReport.Tables[0].Rows[0]["GSTState_Code"]) + ")";
            TinNo            = Convert.ToString(CompDetl.Tables[0].Rows[0]["TIN_NO"]);
            FaxNo            = Convert.ToString(CompDetl.Tables[0].Rows[0]["Fax_No"]);
            PanNo            = Convert.ToString(CompDetl.Tables[0].Rows[0]["Pan_No"]);
            GSTIN            = Convert.ToString(CompDetl.Tables[0].Rows[0]["CompGSTIN_No"]);
            lblpin.Text      = Convert.ToString(CompDetl.Tables[0].Rows[0]["Pin_No"]);
            lblCompname.Text = CompName; lblcom.Text = "For - " + CompName;
            lblCompAdd1.Text = Add1;

            lbladd2.Text   = Add2;
            lblcity.Text   = City;
            lblstate.Text  = State;
            lblmobile.Text = PhNo;
            lblgstin.Text  = GSTIN;
            lblpan.Text    = PanNo.ToString();
            if (dsReport != null && dsReport.Tables[1].Rows.Count > 0)
            {
                Repeater1.DataSource = dsReport.Tables[1];
                Repeater1.DataBind();
            }
            if (TOLLCOUNT != null)
            {
                Repeater2.DataSource = TOLLCOUNT.Tables[0];
                Repeater2.DataBind();
            }
            lblunit.Text     = lblun.Text = Convert.ToString(dsReport.Tables[0].Rows[0]["unit"]);
            lblbillno.Text   = Convert.ToString(dsReport.Tables[0].Rows[0]["Inv_No"]);
            lblbilldate.Text = Convert.ToDateTime(dsReport.Tables[0].Rows[0]["Inv_Date"]).ToString("dd-MM-yyyy");
            lblcontname.Text = Convert.ToString(dsReport.Tables[0].Rows[0]["Party_Name"]);
            lbladd1.Text     = Convert.ToString(dsReport.Tables[0].Rows[0]["Address1"]);
            lblcadd2.Text    = Convert.ToString(dsReport.Tables[0].Rows[0]["Address2"]);
            lblcity1.Text    = Convert.ToString(dsReport.Tables[0].Rows[0]["City_Name"]);
            lblst.Text       = Convert.ToString(dsReport.Tables[0].Rows[0]["State_Name"]);
            lblgst.Text      = Convert.ToString(dsReport.Tables[0].Rows[0]["Party_GSTINNo"]);
            double total    = Convert.ToDouble(lbltamnt.Text);
            double aftrigst = (total * (per / 100));

            lblamt.Text = Convert.ToString(aftrigst);
            double totalamt = total + aftrigst;

            lbltotalamnt.Text = Convert.ToString(totalamt);
            double lsttotal = Convert.ToDouble(lbltotalamnt.Text);

            string[] str1        = lsttotal.ToString().Split('.');
            string   numbertoent = NumberToText(Convert.ToInt32(str1[0]));

            lblword.Text = numbertoent;
            if (Session["RCM"] as string == "True")
            {
                lblamt.Visible    = false;
                lbltotalamnt.Text = Convert.ToString(total);
                igst.Visible      = false;
            }
        }