Example #1
0
        private void tlAdd_Click(object sender, EventArgs e)
        {
            frm_yieldedit frm = new frm_yieldedit();

            frm.IsAdd = true;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                tlRefresh.PerformClick();
            }
        }
Example #2
0
        private void tlEdit_Click(object sender, EventArgs e)
        {
            if (grdData.SelectedRows == null || grdData.SelectedRows.Count < 1)
            {
                return;
            }

            string id   = grdData.SelectedRows[0].Cells["RECIPE_ID"].Value.ToString();
            var    data = grdData.DataSource as List <WMYIELDSETTING>;

            frm_yieldedit frm = new frm_yieldedit();

            frm.wmYield = data.Find(p => p.RECIPE_ID == id);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                tlRefresh.PerformClick();
            }
        }