Ejemplo n.º 1
0
    protected void btnget_Click(object sender, EventArgs e)
    {
        lblviewCNNo.Text = txtCnno.Text.Trim();
        CNNo             = Convert.ToInt32(txtCnno.Text.Trim());
        // Bindgrdcn();
        //grdcn.DataSource = CreditNote.PrintCN(CNNo);
        //grdcn.DataBind();
        DataSet grid = new DataSet();

        grid = CreditNote.EditCN(Convert.ToInt32(strFY), CNNo);
        grdBookDetails.DataSource = grid;
        grdBookDetails.DataBind();
        Session["tempDCData1"] = grid.Tables[0];
        DataSet ds6 = new DataSet();

        ds6 = CreditNote.PrintCN(Convert.ToInt32(strFY), CNNo);

        if (ds6.Tables[1].Rows.Count > 0)
        {
            txtCNDate.Text      = ds6.Tables[1].Rows[0]["CNDate"].ToString();
            lblCustN.Text       = ds6.Tables[1].Rows[0]["CustName"].ToString();
            lbledit.Text        = Convert.ToInt32(ds6.Tables[1].Rows[0]["IsEdit"]).ToString();
            txtGCN.Text         = ds6.Tables[1].Rows[0]["GCN"].ToString();
            txtSCN.Text         = ds6.Tables[1].Rows[0]["SCN"].ToString();
            txtlRNO.Text        = ds6.Tables[1].Rows[0]["LrNo"].ToString();
            lbltransporter.Text = ds6.Tables[1].Rows[0]["TransportName"].ToString();
            lblflagdc.Text      = ds6.Tables[1].Rows[0]["Flag"].ToString();
            CustCode            = ds6.Tables[1].Rows[0]["CustCode"].ToString();
            if (ds6.Tables[1].Rows[0]["IsExciseApplicable"].ToString() == "1")
            {
                ISExcise.Checked = true;
            }
            else
            {
                ISExcise.Checked = false;
            }
        }

        if (lbledit.Text == "0")
        {
            btn_Save.Enabled     = false;
            btn_Save.BorderColor = System.Drawing.Color.Red;
            btn_Save.ToolTip     = "Record Editing Locked";
        }
        else
        {
            btn_Save.BorderColor = System.Drawing.Color.Green;
            btn_Save.Enabled     = true;
            btn_Save.ToolTip     = "";
        }

        btn_Save.Visible = true;
        PnlAddbk.Visible = true;

        PnlPrint.Visible = false;
        btnPrint.Visible = false;

        grdBookDetails.Focus();
        //UpdatePanel1.Update();
    }
Ejemplo n.º 2
0
    protected void btnget_Click(object sender, EventArgs e)
    {
        lblviewCNNo.Text = txtCnno.Text.Trim();
        CNNo             = Convert.ToInt32(txtCnno.Text.Trim());
        DateTime cndate;

        // Bindgrdcn();
        grdcn.DataSource = CreditNote.PrintCN(Convert.ToInt32(strFY), CNNo);
        grdcn.DataBind();
        DataSet ds = new DataSet();

        ds = CreditNote.PrintCN(Convert.ToInt32(strFY), CNNo);
        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();
            lblCNDate.Text      = ds.Tables[1].Rows[0]["CNDate"].ToString();
        }
        PnlPrint.Visible  = true;
        btnDelete.Visible = true;
        bool i = Global.ValidateDate(lblCNDate.Text.ToString());

        if (i == true)
        {
        }
        else
        {
            btnDelete.Visible = false;
            lblAuditMsg.Text  = "You cannot delete CN with CNDate Less than Audit CutOffDate:" + Session["AuditCutOffDate"].ToString();
        }
    }
Ejemplo n.º 3
0
    public string Bindgrdcn()
    {
        //string CustCode = txtcustomer.Text.ToString().Split(':')[0].Trim();
        DataSet dsprint = new DataSet();

        dsprint          = CreditNote.PrintCN(Convert.ToInt32(strFY), CNNo);
        grdcn.DataSource = dsprint;
        grdcn.DataBind();
        cust = dsprint.Tables[1].Rows[0]["CustCode"].ToString();
        return(cust);
    }
Ejemplo n.º 4
0
    protected void btnget_Click(object sender, EventArgs e)
    {
        lblviewCNNo.Text = txtCnno.Text.Trim();
        CNNo             = Convert.ToInt32(txtCnno.Text.Trim());
        // Bindgrdcn();
        grdcn.DataSource = CreditNote.PrintCN(Convert.ToInt32(strFY), CNNo);
        grdcn.DataBind();
        DataSet ds = new DataSet();

        ds = CreditNote.PrintCN(Convert.ToInt32(strFY), CNNo);
        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;
    }
Ejemplo n.º 5
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 = 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]["CreatedOn"].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();
        }
    }
Ejemplo n.º 6
0
 public void Bindgrdcn()
 {
     //string CustCode = txtcustomer.Text.ToString().Split(':')[0].Trim();
     grdcn.DataSource = CreditNote.PrintCN(Convert.ToInt32(strFY), CNNo);
     grdcn.DataBind();
 }