Exemplo n.º 1
0
 /// <summary>
 /// 新建模板
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void barBtnNewTemplate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     //触发自定义事件
     if (OnNewTemplate != null)
     {
         if (treeListLogisticCompany.FocusedNode != null)
         {
             string companyName         = treeListLogisticCompany.FocusedNode.GetDisplayText(0);
             EditTemplateEventArgs edit = new EditTemplateEventArgs(null, companyName);
             OnNewTemplate(this.gvLogisticComTemplate, edit);
         }
     }
 }
Exemplo n.º 2
0
 private void barButtonItemEditTemplate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     //触发自定义事件
     if (OnEditTemplate != null)
     {
         LogisticCompanyTemplate template = gvLogisticComTemplate.GetFocusedRow() as LogisticCompanyTemplate;
         if (template != null)
         {
             EditTemplateEventArgs edit = new EditTemplateEventArgs(template, string.Empty);
             OnEditTemplate(this.gvLogisticComTemplate, edit);
         }
     }
 }