Exemplo n.º 1
0
        public void Delete(Mark mark)
        {
            SsDTP ssDTP = getItem(mark);

            list.Remove(ssDTP);

            ssDTP.Delete();
        }
Exemplo n.º 2
0
        public void Add(SsDTP ssDTP)
        {
            if (list.Exists(item => item == ssDTP))
            {
                return;
            }

            list.Add(ssDTP);
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 4
0
        private void _dgvSsDTP_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            Mark mark = GetMark();

            SsDTP ssDTP = SsDTPList.getInstance().getItem(mark);

            SsDTP_AddEdit aessDTP = new SsDTP_AddEdit(ssDTP);

            if (aessDTP.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                loadData();
            }
        }
Exemplo n.º 5
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();
            }
        }
Exemplo n.º 6
0
        public SsDTP_AddEdit(SsDTP ssDTP)
        {
            InitializeComponent();

            _ssDTP = ssDTP;
        }