Ejemplo n.º 1
0
        private void SaveSurveyButton_Click(object sender, EventArgs e)
        {
            DbConnector db = DbConnector.GetInstance();

            for (int i = 0; i < _surveys.Count; i++)
            {
                DateTime dt = DateTime.Parse(SurveysTable.GetControlFromPosition(1, i).Text);
                _surveys[i].type_id    = _st.Find(x => x.Name == SurveysTable.GetControlFromPosition(0, i).Text).id;
                _surveys[i].DateTime   = dt.ToString("yyy-MM-dd HH:mm:ss");
                _surveys[i].Result     = SurveysTable.GetControlFromPosition(2, i).Text;
                _surveys[i].employeeId = db.GetEmployeeProfile(SurveysTable.GetControlFromPosition(3, i).Text).id;
                db.UpdateSurvey(_surveys[i]);
            }
            LoadEntriesSurveys();
        }