private void txtItemName_TextChanged(object sender, EventArgs e)
        {
            if (cboStores.SelectedValue != null && (cboYear.SelectedItem != null))
            {
                Items itm = new Items();
                int storeId = (cboStores.SelectedValue != null) ? Convert.ToInt32(cboStores.SelectedValue) : 0;
                DataTable dtItm = new DataTable();
                if (txtItemName.Text != "")
                {

                        dtItm = ((ckExclude.Checked && ckExcNeverIssued.Checked) ? itm.GetReceivedNotIssuedItemsByKeyword(storeId, txtItemName.Text) : ((ckExclude.Checked) ? itm.ExcludeNeverReceivedItemsByKeyword(storeId, txtItemName.Text) : itm.GetItemByKeywordInList(txtItemName.Text)));

                }
                else
                {
                        dtItm = ((ckExclude.Checked && ckExcNeverIssued.Checked) ? itm.GetReceivedNotIssuedItems(storeId, Convert.ToInt32(lkCommodityTypes.EditValue)) : ((ckExclude.Checked) ? itm.ExcludeNeverReceivedItems(storeId, Convert.ToInt32(lkCommodityTypes.EditValue)) : itm.GetAllItems(1)));

                }
                PopulateItemList(dtItm);

            }
        }
        private void ckExcNeverIssued_CheckedChanged(object sender, EventArgs e)
        {
            if (cboStores.SelectedValue != null && (cboYear.SelectedItem != null))
            {
                Items itm = new Items();
                int storeId = (cboStores.SelectedValue != null) ? Convert.ToInt32(cboStores.SelectedValue) : 0;
                DataTable dtItm = new DataTable();

                dtItm = ((ckExclude.Checked && ckExcNeverIssued.Checked) ? itm.GetReceivedNotIssuedItems(storeId,Convert.ToInt32(lkCommodityTypes.EditValue)) : ((ckExclude.Checked) ? itm.ExcludeNeverReceivedItems(storeId, Convert.ToInt32(lkCommodityTypes.EditValue)) : itm.GetAllItems(1)));

                PopulateItemList(dtItm);
            }
        }
        private void PopulateByProgram()
        {
            if (cboSubProgram.SelectedValue != null && cboStores.SelectedValue != null)
            {
                Items itm = new Items();
                DataTable dtItem = new DataTable();
                if (Convert.ToInt32(cboSubProgram.SelectedValue) > 0)
                {

                    dtItem = ((ckExclude.Checked) ? itm.ExcludeNeverReceivedItemsByProgram(Convert.ToInt32(cboSubProgram.SelectedValue), Convert.ToInt32(cboStores.SelectedValue)) : itm.GetItemsByProgram(Convert.ToInt32(cboSubProgram.SelectedValue)));

                }
                else
                {
                      dtItem = (((ckExcNeverIssued.Checked && ckExclude.Checked) ? itm.GetReceivedNotIssuedItems(Convert.ToInt32(cboStores.SelectedValue),Convert.ToInt32(lkCommodityTypes.EditValue)) : (ckExclude.Checked) ? itm.ExcludeNeverReceivedItems(Convert.ToInt32(cboStores.SelectedValue), Convert.ToInt32(lkCommodityTypes.EditValue)) : itm.GetAllItems(1)));
                }
                PopulateItemList(dtItem);
            }
        }
        private void cboStores_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cboStores.SelectedValue != null)
            {
                Items itm = new Items();
                int storeId = Convert.ToInt32(cboStores.SelectedValue);
                DataTable dtItem = new DataTable();

                    dtItem = ((ckExclude.Checked && ckExcNeverIssued.Checked) ? itm.GetReceivedNotIssuedItems(storeId,Convert.ToInt32(lkCommodityTypes.EditValue)) : ((ckExclude.Checked) ? itm.ExcludeNeverReceivedItems(storeId,Convert.ToInt32(lkCommodityTypes.EditValue)) : itm.GetAllItems(1,Convert.ToInt32(lkCommodityTypes.EditValue))));

                PopulateItemList(dtItem);
                lblState.Text = "All Items";
            }
        }