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);
            }
        }
コード例 #2
0
 private void PopulateByProgram()
 {
     if (cboSubProgram.SelectedValue != null && cboStores.SelectedValue != null)
     {
         Items itm = new Items();
         DataTable dtItem;
         if (Convert.ToInt32(cboSubProgram.SelectedValue) > 0)
         {
             if (rdDrug.EditValue!=null)
                 dtItem = ((ckExclude.Checked) ? itm.ExcludeNeverReceivedItemsByProgram(Convert.ToInt32(cboSubProgram.SelectedValue), Convert.ToInt32(cboStores.SelectedValue)) : itm.GetItemsByProgram(Convert.ToInt32(cboSubProgram.SelectedValue)));
             else
                 dtItem = ((ckExclude.Checked) ? itm.ExcludeNeverReceivedSuppliesByProgram(Convert.ToInt32(cboSubProgram.SelectedValue), Convert.ToInt32(cboStores.SelectedValue)) : itm.GetSupplyByProgram(Convert.ToInt32(cboSubProgram.SelectedValue)));
         }
         else
         {
             if (rdDrug.EditValue!=null)
                 dtItem = ((ckExclude.Checked) ? itm.ExcludeNeverReceivedItems(Convert.ToInt32(cboStores.SelectedValue),Convert.ToInt32(lkCommodityTypes.EditValue)) : itm.GetAllItems(1));
             else
                 dtItem = ((ckExclude.Checked) ? itm.ExcludeNeverReceivedSupply(Convert.ToInt32(cboStores.SelectedValue)) : itm.GetAllSupply());
         }
         PopulateItemList(dtItem);
     }
 }