Exemplo n.º 1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            sellPlanClass sellPlanClass = new sellPlanClass();

            // 2009-4-17 修改人:付中华
            //校验制作人和计划年份
            #region
            if (!Check.CheckEmpty(cbxProducer.Text.ToString()))
            {
                MessageBox.Show("制作人不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                cbxProducer.Focus();
                return;
            }
            if (!Check.CheckNumber(planYear.Text))
            {
                MessageBox.Show("请输入正确的计划年份,如“2009”!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                planYear.Focus();
                return;
            }
            #endregion
            //if (formHelper.inputCheck(groupBox1))
            //{
            sellPlanClass.Producer = cbxProducer.Text.Trim();
            sellPlanClass.Remark   = txtRemark.Text.Trim();
            sellPlanClass.PlanYear = planYear.Text.ToString().Trim();
            sellPlanClass.InputMan = this.userName;

            if (dgvSPDetail.RowCount != 0)
            {
                List <sellPlanDetailClass> list = getSellPlanDetail();

                if (vplanLogic.saveSellPlanAdd(sellPlanClass, list))
                {
                    this.DialogResult = DialogResult.OK;
                    //MessageBox.Show("新增添加销售计划成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.Close();
                }
            }
            //else
            //{
            //if (MessageBox.Show("你还没有添加销售计划的详细信息", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK)
            //    this.Close();

            //}
        }
Exemplo n.º 2
0
 public bool saveSellPlanAdd(sellPlanClass sellPlanClass, List <sellPlanDetailClass> list)
 {
     return(venditionPlanDB.saveSellPlanAdd(sellPlanClass, list));
 }