private void BindGridView()
        {
            string    strMessage   = string.Empty;
            string    strCriteria  = string.Empty;
            string    strunit_code = string.Empty;
            cItem_acc oItem_acc    = new cItem_acc();
            DataSet   ds           = new DataSet();

            try
            {
                strCriteria = "  And  item_acc_doc  ='" + ViewState["item_acc_doc"].ToString() + "' Order by item_acc_deka, director_order,unit_order ,item_group_order";

                if (!oItem_acc.SP_ITEM_ACC_DETAIL_INCOME_SEL(strCriteria, ref ds, ref strMessage))
                {
                    lblError.Text = strMessage;
                }
                else
                {
                    if (ds.Tables[0].Rows.Count == 0)
                    {
                        strCriteria  = "   And  pay_month  ='" + cboPay_Month.SelectedValue + "' ";
                        strCriteria += "  And  pay_year  ='" + cboPay_Year.SelectedValue + "' ";

                        if (base.myBudgetType == "B")
                        {
                            strCriteria += "  And  payment_detail_person_group_code in (" + PersonGroupList + ",'') ";
                        }


                        strCriteria += "  And  payment_detail_budget_type ='" + this.BudgetType + "' ";

                        if (!oItem_acc.SP_ITEM_ACC_INCOME_TMP_SEL(strCriteria, ref ds, ref strMessage))
                        {
                            lblError.Text = strMessage;
                        }
                    }
                    //ds.Tables[0].DefaultView.Sort = ViewState["sort"].ToString() + " " + ViewState["direction"].ToString();
                    GridView1.DataSource = ds.Tables[0];
                    GridView1.DataBind();
                }
            }
            catch (Exception ex)
            {
                lblError.Text = ex.Message.ToString();
            }
            finally
            {
                if (GridView1.Rows.Count == 0)
                {
                    EmptyGridFix(GridView1);
                }
                oItem_acc.Dispose();
                ds.Dispose();
            }
        }