Beispiel #1
0
        public void PleaseAttachWGR()
        {
            FormAttachWgr form = new FormAttachWgr();

            form.Bind(dragHWGR);
            try
            {
                if (form.ShowDialog() == DialogResult.OK)
                {
                    dragHWGR.WGRs.Add(new ViceWGR(form.EntityName,
                                                  form.Attached.ID,
                                                  (DateTime)form.Attached.BeginTime,
                                                  (DateTime)form.Attached.EndTime,
                                                  form.Attached.WGR_ID));
                }
            }
            catch (EntityException ex)
            {
                XtraMessageBox.Show(ex.Message, ex.GetType().ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
 public void PleaseAttachWGR()
 {
     FormAttachWgr form = new FormAttachWgr();
     form.Bind(dragHWGR);
     try
     {
         if (form.ShowDialog() == DialogResult.OK)
             dragHWGR.WGRs.Add(new ViceWGR(form.EntityName,
                 form.Attached.ID,
                 (DateTime)form.Attached.BeginTime,
                 (DateTime)form.Attached.EndTime,
                 form.Attached.WGR_ID));
     }
     catch (EntityException ex)
     {
         XtraMessageBox.Show(ex.Message, ex.GetType().ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }