public void Delete(Mark mark) { SsDTP ssDTP = getItem(mark); list.Remove(ssDTP); ssDTP.Delete(); }
public void Add(SsDTP ssDTP) { if (list.Exists(item => item == ssDTP)) { return; } list.Add(ssDTP); }
protected override void loadFromSql() { DataTable dt = _provider.Select("ssDTP"); clearList(); foreach (DataRow row in dt.Rows) { SsDTP ssDTP = new SsDTP(row); Add(ssDTP); } }
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(); } }
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(); } }
public SsDTP_AddEdit(SsDTP ssDTP) { InitializeComponent(); _ssDTP = ssDTP; }