コード例 #1
0
    private void clearData()
    {
        btn_del.Enabled = false;
        Panel1.Visible  = false;


        // cleargrid

        dgrid_Proc.DataSource = null;
        dgrid_Proc.DataBind();


        GridView_other.DataSource = null;
        GridView_other.DataBind();

        GridView_opn.DataSource = null;
        GridView_opn.DataBind();


        GridView_Iado.DataSource = null;
        GridView_Iado.DataBind();

        GridView_trck_chn.DataSource = null;
        GridView_trck_chn.DataBind();
    }
コード例 #2
0
    private void fillgridOther()
    {
        string did   = ddl_dist.SelectedValue;
        string depid = ddl_IC.SelectedValue;
        string gid   = ddlgodown.SelectedValue;

        mobj = new MoveChallan(ComObj);
        string  qry = "SELECT  tbl_Receipt_Details.Godown as Godown, tbl_Receipt_Details.challan_no,  tbl_Receipt_Details.challan_date,tbl_Receipt_Details.Vehile_no,tbl_Receipt_Details.Receipt_Id,tbl_Receipt_Details.S_of_arrival,Source_Arrival_Type.Source_Name as Source_Name   FROM dbo.tbl_Receipt_Details  left join dbo.Source_Arrival_Type on tbl_Receipt_Details.S_of_arrival= Source_Arrival_Type.Source_ID  where  Dist_Id='" + did + "' and Depot_ID='" + depid + "'  and Godown='" + gid + "' order by Order by  challan_date desc";
        DataSet ds  = mobj.selectAny(qry);

        if (ds != null)
        {
            if (ds.Tables[0].Rows.Count > 0)
            {
                GridView_other.DataSource = ds.Tables[0];
                GridView_other.DataBind();
            }

            else
            {
                GridView_other.DataSource = null;
                GridView_other.DataBind();
            }
        }
        else
        {
            GridView_other.DataSource = null;
            GridView_other.DataBind();
        }
    }