private void Fill() { WareExtrasLogic extras = new WareExtrasLogic(manager); DataGV.AutoGenerateColumns = false; DataGV.DataSource = extras.GetAll(); DataGV.Update(); }
private void DeleteSB_Click(object sender, EventArgs e) { WareExtrasLogic wares = new WareExtrasLogic(manager); wares.Delete(Convert.ToInt32(DataGV.SelectedRows[0].Cells["ID"].Value)); manager.Save(); Fill(); }
private void DeleteSB_Click(object sender, EventArgs e) { WareExtrasLogic wares = new WareExtrasLogic(manager); wares.Delete(Convert.ToInt32(DataGV.SelectedRows[0].Cells["ID"].Value)); manager.Save(); Fill(); }
private void Fill() { WareExtrasLogic extras = new WareExtrasLogic(manager); DataGV.AutoGenerateColumns = false; DataGV.DataSource = extras.GetAll(); DataGV.Update(); }
private void Fill() { WareExtrasLogic extras = new WareExtrasLogic(manager); if (mode == "edit") { WareExtra extra = extras.Get(Convert.ToInt32(id)); if (extra != null) { ExtraPercentNUD.Value = extra.ExtraPercent; DefaultCB.Checked = extra.Default; } } }
private void SaveBt_Click(object sender, EventArgs e) { WareExtrasLogic extras = new WareExtrasLogic(manager); if (mode == "new") { extras.Create(Convert.ToInt32(ExtraPercentNUD.Value), DefaultCB.Checked); } if (mode == "edit") { extras.Update(Convert.ToInt32(id), Convert.ToInt32(ExtraPercentNUD.Value), DefaultCB.Checked); } manager.Save(); this.Close(); }