Example #1
0
        public void Add(SsDTP ssDTP)
        {
            if (list.Exists(item => item == ssDTP))
                return;

            list.Add(ssDTP);
        }
Example #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            SsDTPList ssDTPs = SsDTPList.getInstance();
            SsDTP ssDTP = new SsDTP();

            SsDTP_AddEdit aessDTP = new SsDTP_AddEdit(ssDTP);

            if (aessDTP.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ssDTPs.Add(ssDTP);
                loadData();
            }
        }
Example #3
0
        protected override void loadFromSql()
        {
            DataTable dt = _provider.Select("ssDTP");

            clearList();

            foreach (DataRow row in dt.Rows)
            {
                SsDTP ssDTP = new SsDTP(row);
                Add(ssDTP);
            }
        }