示例#1
0
 private void notificationsaddform_Load(object sender, EventArgs e)
 {
     cmbevent.DisplayMember = "Name";
     cmbevent.ValueMember   = "IDEvent";
     using (KursovayaoneEntities test = new KursovayaoneEntities())
     {
         cmbevent.DataSource = test.Events.ToList();
     }
 }
示例#2
0
 private void contactsaddformcs_Load(object sender, EventArgs e)
 {
     cmbgroup.DisplayMember = "Name";
     cmbgroup.ValueMember   = "IDGroup";
     using (KursovayaoneEntities test = new KursovayaoneEntities())
     {
         cmbgroup.DataSource = test.Groups.ToList();
     }
 }
示例#3
0
 private void eventsaddform_Load(object sender, EventArgs e)
 {
     cmbcate.DisplayMember  = "Name";
     cmbcate.ValueMember    = "IDCategory";
     cmbhuman.DisplayMember = "FIO";
     cmbhuman.ValueMember   = "IDHuman";
     using (KursovayaoneEntities test = new KursovayaoneEntities())
     {
         cmbcate.DataSource  = test.Categories.ToList();
         cmbhuman.DataSource = test.Contacts.ToList();
     }
 }
示例#4
0
 private void Kontakti_Load(object sender, EventArgs e)
 {
     test = new KursovayaoneEntities();
     contactsBindingSource.DataSource = test.Contacts.Where(z => z.IDHuman != 1).ToList();
     groupsBindingSource.DataSource   = test.Groups.ToList();
     cmbgroup.DisplayMember           = "Name";
     cmbgroup.ValueMember             = "IDGroup";
     using (KursovayaoneEntities test = new KursovayaoneEntities())
     {
         cmbgroup.DataSource = test.Groups.ToList();
     }
     cmbgroup.Enabled        = false;
     dateTimePicker1.Enabled = false;
 }
示例#5
0
 private void Meropriyatia_Load(object sender, EventArgs e)
 {
     test = new KursovayaoneEntities();
     eventsBindingSource.DataSource     = test.Events.OrderBy(x => x.Date).ThenBy(y => y.Time).ToList();
     contactsBindingSource.DataSource   = test.Contacts.ToList();
     categoriesBindingSource.DataSource = test.Categories.ToList();
     cmbcate.DisplayMember   = "Name";
     cmbcate.ValueMember     = "IDCategory";
     cmbhuman.DisplayMember  = "FIO";
     cmbhuman.ValueMember    = "IDHuman";
     cmbcate.DataSource      = test.Categories.ToList();
     cmbhuman.DataSource     = test.Contacts.ToList();
     cmbcate.Enabled         = false;
     cmbhuman.Enabled        = false;
     dateTimePicker1.Enabled = false;
     dateA.Value             = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
     dateB.Value             = new DateTime(DateTime.Now.Year, DateTime.Now.Month, Convert.ToInt32(dateA.Value.AddMonths(1).AddDays(-1).Day));
 }
示例#6
0
 private void Napominania_Load(object sender, EventArgs e)
 {
     test = new KursovayaoneEntities();
     notificationsBindingSource.DataSource = test.Notifications.OrderBy(x => x.Date).ThenBy(y => y.Time).ToList();
     eventsBindingSource.DataSource        = test.Events.ToList();
     cmbevent.DisplayMember  = "Name";
     cmbevent.ValueMember    = "IDEvent";
     cmbevent.DataSource     = test.Events.ToList();
     cmbevent.Enabled        = false;
     dateTimePicker1.Enabled = false;
     if (!done)
     {
         timer          = new System.Timers.Timer();
         timer.Interval = 1000;
         timer.Elapsed += nfnotifibytimer;
         timer.Start();
         done = true;
     }
 }
示例#7
0
        private void Glavnaya_Load(object sender, EventArgs e)
        {
            test = new KursovayaoneEntities();
            var listevent = test.Events.ToList();

            eventsBindingSource.DataSource = listevent.Where(x => Convert.ToDateTime(x.Date).Month == DateTime.Now.Month);
            var listcontact = test.Contacts.ToList();

            contactsBindingSource1.DataSource = listcontact.Where(x => Convert.ToDateTime(x.Birthday).Month == DateTime.Now.Month).Where(z => z.IDHuman != 1).ToList();
            contactsBindingSource.DataSource  = test.Contacts.ToList();
            groupsBindingSource.DataSource    = test.Groups.ToList();
            dataGridView1.ReadOnly            = true;
            birthday();
            var startTimeSpan  = TimeSpan.Zero;
            var periodTimeSpan = TimeSpan.FromSeconds(1);

            var timer = new System.Threading.Timer((get) =>
            {
                notifibytimer();
            }, null, startTimeSpan, periodTimeSpan);
        }
示例#8
0
 private void Gruppi_Load(object sender, EventArgs e)
 {
     test = new KursovayaoneEntities();
     groupsBindingSource.DataSource = test.Groups.ToList();
 }
示例#9
0
 private void Kategorii_Load(object sender, EventArgs e)
 {
     test = new KursovayaoneEntities();
     categoriesBindingSource.DataSource = test.Categories.ToList();
 }