示例#1
0
    protected void btnget_Click(object sender, EventArgs e)
    {
        lblviewCNNo.Text = txtCnno.Text.Trim();
        CNNo             = Convert.ToInt32(txtCnno.Text.Trim());
        DataSet ds = new DataSet();

        ds = C_CreditNote.PrintCN(Convert.ToInt32(strFY), CNNo);
        // Bindgrdcn();
        grdcn.DataSource = ds.Tables[0];
        grdcn.DataBind();

        if (ds.Tables[1].Rows.Count > 0)
        {
            lblCustName.Text    = ds.Tables[1].Rows[0]["CustName"].ToString();
            lblCustAddress.Text = ds.Tables[1].Rows[0]["Address"].ToString();
        }
        PnlPrint.Visible = true;
        btnPrint.Visible = true;
    }
示例#2
0
    //static decimal amt = 0;
    #endregion
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["d"] != null && Request.QueryString["fy"] != null)
        {
            CNNo  = (Convert.ToInt32(Request.QueryString["d"].ToString().Trim()));
            strFY = (Convert.ToInt32(Request.QueryString["fy"].ToString().Trim()));
            Todaydate.InnerHtml = DateTime.Now.ToString("dd/MM/yyyy");

            DataSet ds = new DataSet();
            ds = C_CreditNote.PrintCN(strFY, CNNo);
            if (ds.Tables[1].Rows.Count > 0)
            {
                //  lblCustName.Text = dt.Rows[0]["CustName"].ToString();
                // lblCustAddress.Text = dt.Rows[0]["Address"].ToString();
                CreatedOn.InnerHtml = ds.Tables[1].Rows[0]["CNDate"].ToString();
                crnno.InnerHtml     = ds.Tables[1].Rows[0]["CNNo"].ToString();
                custname.InnerHtml  = ds.Tables[1].Rows[0]["CustName"].ToString() + ",";
                custadd.InnerHtml   = ds.Tables[1].Rows[0]["Address"].ToString();
            }
            Bindgrdcn(ds.Tables[0]);
        }
    }