Ejemplo n.º 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();
    }
Ejemplo n.º 2
0
    void fillGrid_opening()
    {
        string distid  = ddl_dist.SelectedValue;
        string issueid = ddl_IC.SelectedValue;
        string gdwnId  = ddlgodown.SelectedValue;

        string qrychk = "select issue_opening_balance.District_Id as DistiD,issue_opening_balance.Depotid as depid,issue_opening_balance.Godown,issue_opening_balance.Source,issue_opening_balance.Scheme_Id,issue_opening_balance.Commodity_Id,convert(decimal(18,5),issue_opening_balance.Current_Balance) as Current_Balance ,issue_opening_balance.Current_Bags,convert(decimal(18,5),issue_opening_balance.Quantity) as Quantity ,issue_opening_balance.Bags,tbl_MetaData_GODOWN.Godown_Name,tbl_MetaData_STORAGE_COMMODITY .Commodity_Name as Commodity_Name ,tbl_MetaData_SCHEME.Scheme_Name as Scheme_Name,Source_Arrival_Type.Source_Name as Source_Name ,Current_Godown_Position.Month, Current_Godown_Position.Year from dbo.issue_opening_balance left join dbo.tbl_MetaData_STORAGE_COMMODITY on issue_opening_balance.Commodity_Id=tbl_MetaData_STORAGE_COMMODITY .Commodity_Id left join dbo.tbl_MetaData_SCHEME on issue_opening_balance.Scheme_Id =tbl_MetaData_SCHEME.Scheme_Id left join dbo.Source_Arrival_Type on issue_opening_balance.Source=Source_Arrival_Type.Source_ID left join dbo.tbl_MetaData_GODOWN on issue_opening_balance.Godown=tbl_MetaData_GODOWN.Godown_ID  left join Current_Godown_Position on issue_opening_balance.Godown=Current_Godown_Position.Godown  where issue_opening_balance.District_Id='" + distid + "'and issue_opening_balance.Depotid='" + issueid + "'  and Godown='" + gdwnId + "'";

        mobj = new MoveChallan(ComObj);
        DataSet dschk = mobj.selectAny(qrychk);

        if (dschk == null)
        {
        }
        else
        {
            if (dschk.Tables[0].Rows.Count > 0)
            {
                GridView_opn.DataSource = dschk.Tables[0];
                GridView_opn.DataBind();
            }
            else
            {
                GridView_opn.DataSource = null;
                GridView_opn.DataBind();
            }
        }
    }