Exemplo n.º 1
0
        private void SetExpBackground(string empId)
        {
            ExperienceManager     mExpManager = new ExperienceManager();
            List <ExperienceItem> workExpList = new List <ExperienceItem>();

            if (workExpCollection.Count != 0)
            {
                workExpCollection.Remove(selectedExpItem);

                foreach (var item in workExpCollection)
                {
                    workExpList.Add(item);
                }
            }

            if (!string.IsNullOrEmpty(tbDesignation.Text))
            {
                var expItem = new ExperienceItem();
                expItem._EMP_NO        = empId;
                expItem._DESIGNATION   = tbDesignation.Text;
                expItem._COMPANY       = tbCompanyName.Text;
                expItem._WORK_LOCATION = tbComanyLocation.Text;
                expItem._DATE_START    = dpWorkStart.Text;
                expItem._DATE_END      = dpWorkEnd.Text;

                workExpList.Add(expItem);
            }

            mExpManager.DeleteExpData(empId);

            foreach (var item in workExpList)
            {
                mExpManager.SaveExpData(item);
            }
        }