private void AddPriceBtn_Click(object sender, EventArgs e) { var row = MatPriceGridView.GetFocusedRow() as dynamic; AddIndividualPrice(row.PTypeId); EditPriceBtn.PerformClick(); }
private void MatPriceGridView_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e) { var row = MatPriceGridView.GetFocusedRow() as dynamic; DelPriceBtn.Enabled = (row.IsIndividually == 1); AddPriceBtn.Enabled = (row.IsIndividually == 0); }
private void DelPriceBtn_Click(object sender, EventArgs e) { var row = MatPriceGridView.GetFocusedRow() as dynamic; int PTypeId = row.PTypeId; _db.DeleteWhere <MatGroupPrices>(w => w.PTypeId == PTypeId && w.GrpId == _grp_id.Value); GetListMatPrices(); }
private void EditPriceBtn_Click(object sender, EventArgs e) { var row = MatPriceGridView.GetFocusedRow() as dynamic; DirTreeList.FocusedNode = DirTreeList.FindNodeByFieldValue("DataSetId", row.PTypeId); }