Ejemplo n.º 1
0
        private void btnNewEvent_Click(object sender, EventArgs e)
        {
            MYUI.EventControl eventcontrol = new MYUI.EventControl();
            TagEvent          model        = new TagEvent();

            model.Id            = GetTagEventId(lblSearchTime.Text);
            model.DailyLogId    = lblSearchTime.Text;
            model.CreateTime    = DateTime.Now;
            eventcontrol.Status = MYUI.EventControl.StatusType.Create;
            eventcontrol.ShowEvent(model);
            flpContent.Controls.Add(eventcontrol);
        }
Ejemplo n.º 2
0
 private void btnSearch_Click(object sender, EventArgs e)
 {
     flpContent.Controls.Clear();
     if (!string.IsNullOrEmpty(lblSearchTime.Text))
     {
         List <TagEvent> models = context.GetTagEvents(lblSearchTime.Text);
         if (models != null)
         {
             foreach (var model in models)
             {
                 MYUI.EventControl eventcontrol = new MYUI.EventControl();
                 eventcontrol.ShowEvent(model);
                 eventcontrol.Status = MYUI.EventControl.StatusType.Keep;
                 flpContent.Controls.Add(eventcontrol);
             }
         }
     }
     else
     {
         // 显示错误
     }
 }