示例#1
0
        private async void button8_Click(object sender, EventArgs e)
        {
            try
            {
                AjoutShift ajoutshift = new AjoutShift();
                var        result     = ajoutshift.ShowDialog();

                panel3.Controls.RemoveAt(1);

                var control = await callshiftControl();

                panel3.Controls.Add(control);
            }
            catch (Exception ex)
            {
                MessageFormError MessageForm = new MessageFormError(ex.Message.ToString());
                var result = MessageForm.ShowDialog();
            }

            /*DbEntities entity = new DbEntities();
             * SHIFT shift = entity.SHIFT.FirstOrDefault(per => per.CODE == 2);
             * DateTime d = DateTime.Now;
             * DateTime dshift =(DateTime)shift.DATEDDEBUT;
             * //if (d.ToShortDateString().CompareTo(dshift.ToShortDateString()) == 0)
             * //{ MessageBox.Show(d.ToShortDateString() + "ego" + dshift.ToShortDateString()); }
             * //else
             * //    MessageBox.Show(d.ToShortDateString() + "different" + dshift.ToShortDateString());
             * if (d.ToShortTimeString().CompareTo(dshift.ToShortTimeString()) == 0)
             * { MessageBox.Show(d.ToShortTimeString() + "ego" + dshift.ToShortTimeString()); }
             * else
             *  MessageBox.Show(d.ToShortTimeString() + "different" + dshift.ToShortTimeString());
             */
        }
示例#2
0
        private void button5_Click(object sender, EventArgs e)
        {
            AjoutShift ajoutshift = new AjoutShift();
            var        result     = ajoutshift.ShowDialog();

            RemplirGrid();
        }