예제 #1
0
 private void btn_addNewTemplate_Click(object sender, EventArgs e)
 {
     if (txt_newTemplateName.Text.Trim() == string.Empty)
     {
         MessageBoxEx.Show("请先选择所属分类", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
     else
     {
         Tb_indicatorTemplate template = new Db.Entity.Tb_indicatorTemplate();
         template.classId        = cbb_classId;
         template.createDatetime = DateTime.Now.ToLocalTime();;
         template.templateName   = txt_newTemplateName.Text.Trim();
         TemplateCache.addCache(template);
         pnl_addTempla.Visible = false;
         bindCbbExitsTemplate();
         cbb_exitsTemplate.SelectedItem = template;
     }
 }