Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // CustCode = txtcustomer.Text.ToString().Split(':')[0].Trim();
        //CustCode = Convert.ToInt32(DDLCustomer.SelectedValue)

        if (Session["FY"] != null)
        {
            strFY = Session["FY"].ToString();
        }
        else
        {
            Session.Clear();
        }
        //Response.Write(strFY);


        if (!Page.IsPostBack)
        {
            btnPrint.Visible = false;

            Pnl2.Visible     = true;
            PnlPrint.Visible = false;
            // BindDDlCust();
            fdt = Convert.ToDateTime("1900/01/01");
            tdt = Convert.ToDateTime("1900/01/01");
            RptrCN.DataSource = C_CreditNote.C_GetCNNo_Bydt(Convert.ToInt32(strFY), fdt, tdt);
            RptrCN.DataBind();
            //txtcustomer.Focus();
        }
        else
        {
        }
    }
Exemplo n.º 2
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;
    }
Exemplo n.º 3
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]);
        }
    }