Пример #1
0
 private void tvItemType_Click(object sender, EventArgs e)
 {
     var mouA = e as MouseEventArgs;
     if (mouA != null)
     {
         var currentNode = tvItemType.GetNodeAt(mouA.Location);
         currentItemTypeInfo = currentNode.Tag as ItemTypeInfo;
         OnSearch(currentItemTypeInfo, 1);
     }
 }
Пример #2
0
 /// <summary>
 /// Called when [search].
 /// </summary>
 /// <param name="obj">The obj.</param>
 /// <param name="pageIndex">Index of the page.</param>
 /// Created by SMK 
 private void OnSearch(ItemTypeInfo obj, int pageIndex)
 {
     if (obj != null)
     {
         var crit = new ItemSearchCriteria()
         {
             ItemTypeId = obj.Id,
             PageNum = pageIndex,
             PageSize = Config.PageSize
         };
         var result = itemData.GetItemList(crit,obj.Id);
         ClearGrid(gvInsurance);
         foreach (var item in result)
         {
             AddItem(gvInsurance, item);
         }
     }
 }