Exemplo n.º 1
0
        //-----------------------------------------------------------------------------


        private void Open_Click(object sender, EventArgs e)
        {
            if (Raspisanie.getStatus(DateTime.Today).Equals("-"))
            {
                Raspisanie.updateStatus(DateTime.Today, "O");
            }
            else
            {
                Raspisanie.updateStatus(DateTime.Today, "C");
            }
            ReadRaspisanie();
        }
Exemplo n.º 2
0
        /////Расписание

        public void ReadRaspisanie()
        {
            try
            {
                list_raspisanie = collection_raspisanie.AsQueryable()
                                  .OrderByDescending(c => c.Date)
                                  .ToList <Raspisanie>();
                list_raspisanie_single = collection_raspisanie.AsQueryable()
                                         .OrderByDescending(c => c.Date)
                                         .Where(c => c.Date > DateTime.Today)
                                         .Where(C => C.Sotrudnik == CurrentSotrudnik.Text)
                                         .ToList <Raspisanie>();

                if (Raspisanie.getStatus(DateTime.Today).Equals("O"))
                {
                    Open.Text = "Закрыть смену";
                }
                else if (Raspisanie.getStatus(DateTime.Today).Equals("C"))
                {
                    Open.Text = "Смена закрыта";
                }
            }
            catch (Exception e)
            {
                String s = e.ToString();
                //show
            }
            DateTime today = DateTime.Today.Date;

            currentDate.Text = today.ToString().Substring(0, 10);
            SummaProdaj.Text = Check.getSum();


            addToGridRaspisanie(list_raspisanie);
            addToGridRaspisanieSingle(list_raspisanie_single);
        }