示例#1
0
    protected void GrdCustviewMDC_RowEditing(object sender, GridViewEditEventArgs e)
    {
        string CustCode = ((Label)GrdCustviewMDC.Rows[e.NewEditIndex].FindControl("lblCustCodeMDC")).Text;
        //string DC = ((Label)GrdCustview.Rows[e.NewEditIndex].FindControl("lblDC1")).Text;

        DataTable dt3 = new DataTable();

        dt3 = DCReturnBook.GetCustAddress(CustCode, "RtdBkCustlist").Tables[0];

        if (dt3.Rows.Count > 0)
        {
            lblCustName.Text    = dt3.Rows[0]["CustName"].ToString();
            lblCustAddress.Text = dt3.Rows[0]["Address"].ToString();
        }

        Grd3.DataSource = DCReturnBook.Get_DC_ReturnBook(CustCode, "DCrtbk").Tables[1];
        Grd3.DataBind();

        PnlCustDetails.Visible  = true;
        Pnl3.Visible            = true;
        Pnl4CustDetails.Visible = false;
        Pnl4.Visible            = false;
        Pnl5CustDetails.Visible = false;
        Pnl5.Visible            = false;
        Pnlview.Visible         = false;
        PnlBkdetails.Visible    = false;
        Pnl4view.Visible        = false;
        Pnl4Bkdetails.Visible   = false;
    }
示例#2
0
    protected void DDLCustomer_SelectedIndexChanged(object sender, EventArgs e)
    {
        BindGrd3();
        if (Grd3.Rows.Count > 0)
        {
            Grd3.Focus();
            Pnl3.Visible    = true;
            Pnlview.Visible = false;
            DataTable dt = new DataTable();
            dt = DCReturnBook.GetCustAddress((DDLCustomer.SelectedValue), "RtdBkCustlist").Tables[0];

            if (dt.Rows.Count > 0)
            {
                lblCustName.Text    = dt.Rows[0]["CustName"].ToString();
                lblCustAddress.Text = dt.Rows[0]["Address"].ToString();
            }
        }
        else
        {
            PnlCustDetails.Visible = false;
            Pnl3.Visible           = false;
            Pnlview.Visible        = false;
            if (DDLCustomer.SelectedIndex == 0)
            {
            }
            else
            {
                MessageBox("Record Not Available");
            }
        }
    }
示例#3
0
    //protected void btnview_Click(object sender, EventArgs e)
    //{
    //    BindGrd3();
    //    if (Grd3.Rows.Count > 0)
    //    {
    //        Grd3.Focus();
    //        Panel3.Visible = true;
    //        Panelview.Visible = false;
    //    }
    //    else
    //    {
    //        MessageBox("Record Not Available");
    //    }
    //}

    #region Binddata method
    public void BindGrd3()
    {
        Grd3.DataSource = DCReturnBook.Get_DC_ReturnBook((DDLCustomer.SelectedValue), "DCrtbk").Tables[1];
        Grd3.DataBind();
    }