Esempio n. 1
0
        private void tlPlanEdit_Click(object sender, EventArgs e)
        {
            if (grdPlan.SelectedRows == null || grdPlan.SelectedRows.Count < 1)
            {
                MsgBoxEx.Info("Please select the updated data");
                return;
            }

            string id   = grdPlan.SelectedRows[0].Cells["pid"].Value.ToString();
            var    data = grdPlan.DataSource as List <EMPLAN>;

            frm_planedit frm = new frm_planedit();

            frm.emPlan = data.FirstOrDefault(p => p.PID == id);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                tlPlanRefresh.PerformClick();
            }
        }
Esempio n. 2
0
        private void tlPlanAdd_Click(object sender, EventArgs e)
        {
            if (grdLibrary.SelectedRows == null || grdLibrary.SelectedRows.Count < 1)
            {
                MsgBoxEx.Info("Please add a new library");
                return;
            }

            string lid = grdLibrary.SelectedRows[0].Cells["LID"].Value.ToString();

            frm_planedit frm = new frm_planedit();

            frm.LID = lid;

            frm.IsAdd = true;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadPlanData(lid);
            }
        }