Ejemplo n.º 1
0
    private void inv_detail()
    {
        if (Request.QueryString["inv"] != "" && Request.QueryString["inv"] != null)
        {
            bl.inv_no = Request.QueryString["inv"].ToString();
            DataSet ds = new DataSet();
            ds = dl.select_inv_detail(bl);

            if (ds.Tables[0].Rows.Count > 0)
            {
                lbl_odr_no.Text     = ds.Tables[0].Rows[0]["po_no"].ToString();
                lbl_odr_dt.Text     = ds.Tables[0].Rows[0]["po_date"].ToString();
                lbl_tt_qty.Text     = ds.Tables[0].Rows[0]["total_qty"].ToString();
                lbl_dc_no.Text      = ds.Tables[0].Rows[0]["dc_no"].ToString();
                lbl_dc_dt.Text      = ds.Tables[0].Rows[0]["dc_date"].ToString();
                lbl_vihical_no.Text = ds.Tables[0].Rows[0]["vehical_no"].ToString();
                lbl_to.Text         = ds.Tables[0].Rows[0]["to_"].ToString();
                lbl_from.Text       = ds.Tables[0].Rows[0]["from_s"].ToString();
                lbl_deshpath.Text   = ds.Tables[0].Rows[0]["transport_name"].ToString();
            }
        }
    }
Ejemplo n.º 2
0
    private void inv_detail()
    {
        if (Request.QueryString["inv"] != "" && Request.QueryString["inv"] != null)
        {
            bl.inv_no = Request.QueryString["inv"].ToString();
            DataSet ds = new DataSet();
            ds = dl.select_inv_detail(bl);

            if (ds.Tables[0].Rows.Count > 0)
            {
                lbl_vch_typ.Text  = ds.Tables[0].Rows[0]["vch_nm"].ToString();
                lbl_inv_no.Text   = ds.Tables[0].Rows[0]["invoice_no"].ToString();
                lbl_inv_dt.Text   = ds.Tables[0].Rows[0]["invoice_date"].ToString();
                lbl_odr_no.Text   = ds.Tables[0].Rows[0]["po_no"].ToString();
                lbl_odr_dt.Text   = ds.Tables[0].Rows[0]["po_date"].ToString();
                lbl_lr_no.Text    = ds.Tables[0].Rows[0]["lr_no"].ToString();
                lbl_lr_dt.Text    = ds.Tables[0].Rows[0]["lr_date"].ToString();
                lbl_dc_no.Text    = ds.Tables[0].Rows[0]["dc_no"].ToString();
                lbl_dc_dt.Text    = ds.Tables[0].Rows[0]["dc_date"].ToString();
                lbl_deshpath.Text = ds.Tables[0].Rows[0]["transport_name"].ToString();
                //lbl_tt_qty.Text = ds.Tables[0].Rows[0]["total_qty"].ToString();
                string amt = ds.Tables[0].Rows[0]["total"].ToString();
                double a   = Convert.ToDouble(amt);

                amt = string.Format("{0:0.00}", a);


                lbl_amt.Text         = amt;
                lbl_vihical_no.Text  = ds.Tables[0].Rows[0]["vehical_no"].ToString();
                lbl_to.Text          = ds.Tables[0].Rows[0]["to_"].ToString();
                lbl_from.Text        = ds.Tables[0].Rows[0]["from_s"].ToString();
                lbl_ecc_comdity.Text = ds.Tables[0].Rows[0]["exci_como_no"].ToString();
                lbl_tariff_no.Text   = ds.Tables[0].Rows[0]["teriff_no"].ToString();
                lbl_issu_dt.Text     = ds.Tables[0].Rows[0]["invoice_date"].ToString();
                lbl_issu_time.Text   = ds.Tables[0].Rows[0]["inv_time"].ToString();
                lbl_removal_dt.Text  = ds.Tables[0].Rows[0]["removel_dt"].ToString();
                lbl_reoval_time.Text = ds.Tables[0].Rows[0]["removal_time"].ToString();
                string exc = ds.Tables[0].Rows[0]["exce"].ToString();
                double pr  = Convert.ToDouble(exc);

                ttl = 0;
                ttl = ttl + pr;
                exc = string.Format("{0:0.00}", pr);


                // lbl_price.Text = exc;
                if (ds.Tables[0].Rows[0]["disc"].ToString() != string.Empty && ds.Tables[0].Rows[0]["disc"].ToString() != "0")
                {
                    lbl_extra.Text = "Discount</Br>";
                    double di = Convert.ToDouble(ds.Tables[0].Rows[0]["disc"].ToString());
                    string.Format("{0:0.00}", di);
                    lbl_extraprice.Text = string.Format("{0:0.00}", di) + "</Br>";
                }


                if (lbl_extra.Text != string.Empty)
                {
                    lbl_extra.Text      = lbl_extra.Text + "Excise 12.5% </Br>";
                    lbl_extraprice.Text = lbl_extraprice.Text + exc + "</Br>";
                }
                else
                {
                    lbl_extra.Text      = "Excise 12.5% </Br>";
                    lbl_extraprice.Text = exc + "</Br>";
                }


                lbl_vat_type.Text = ds.Tables[0].Rows[0]["vat_type"].ToString();
                if (lbl_vat_type.Text == "vat @ 12.5%")
                {
                    lbl_addvat.Text = "2.5%";
                }
                else
                {
                    lbl_addvat.Text = "1%";
                }

                string vat = ds.Tables[0].Rows[0]["tax_4"].ToString();
                double v   = Convert.ToDouble(vat);

                vat = string.Format("{0:0.00}", v);

                lbl_vat_amt.Text = vat;
                string avat = ds.Tables[0].Rows[0]["vat_1"].ToString();
                double av   = Convert.ToDouble(avat);

                avat = string.Format("{0:0.00}", av);

                lbl_add_amt.Text = avat;
                lbl_pa.Text      = ds.Tables[0].Rows[0]["pla"].ToString();
                lbl_rg.Text      = ds.Tables[0].Rows[0]["r_g"].ToString();
                lbl_prt.Text     = ds.Tables[0].Rows[0]["part"].ToString();
                lbl_dt.Text      = ds.Tables[0].Rows[0]["dt"].ToString();

                string str = ds.Tables[0].Rows[0]["total_amount"].ToString();
                double st  = Convert.ToDouble(str);

                str = string.Format("{0:0.00}", st);

                lbl_net_amt.Text = str;
                double n    = Convert.ToDouble(lbl_net_amt.Text);
                string s    = Math.Round(n, 0).ToString();
                double g    = Convert.ToDouble(exc);
                string r    = Math.Round(g, 0).ToString();
                string word = ConvertNumbertoWords(Convert.ToInt32(n));
                lblmsg.InnerText = word;
                string word2 = ConvertNumbertoWords(Convert.ToInt32(r));
                lblmsg2.InnerText = word2;
            }
        }
    }