Ejemplo n.º 1
0
        /// <summary>
        /// 新增预测项目
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAddPrj_ItemClick(object sender, ItemClickEventArgs e)
        {
            AddForePrjForm newPrjForm = new AddForePrjForm(StaticUtil.AddOp);
            DialogResult   prjResult  = newPrjForm.ShowDialog();

            // TODO 预测项目数据刷新
            if (prjResult == DialogResult.OK)
            {
                this.SearchForecastPrj();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 双击预测项目行
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void gvForePrj_DoubleClick(object sender, EventArgs e)
        {
            ColumnView cv = (ColumnView)gcForePrj.FocusedView;

            CafcService.ForecastPrj prjObj = (CafcService.ForecastPrj)cv.GetFocusedRow();

            try
            {
                if (prjObj != null)
                {
                    AddForePrjForm editPrjForm = new AddForePrjForm(StaticUtil.EditOp, prjObj);
                    DialogResult   editResult  = editPrjForm.ShowDialog();

                    if (editResult == DialogResult.OK)
                    {
                        this.SearchForecastPrj();;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }