void SetInfo_EffectValue()
        {
            Business_CWQC_CreativePersentation_EffectValue effectValue = m_mainService.GetInfo_EffectValue(txtBillNo.Text);

            if (effectValue == null)
            {
                return;
            }
            else
            {
                numWorkReduce1.Value = effectValue.WorkReduce1;
                numWorkReduce2.Value = effectValue.WorkReduce2;
                numWorkReduce3.Value = effectValue.WorkReduce3;
                numWorkReduce4.Value = effectValue.WorkReduce4;

                numMaterialReduce1.Value = effectValue.MaterialReduce1;
                numMaterialReduce2.Value = effectValue.MaterialReduce2;
                numMaterialReduce3.Value = effectValue.MaterialReduce3;
                numMaterialReduce4.Value = effectValue.MaterialReduce4;

                numElseEffectValue.Value = effectValue.ElseEffectValue;

                txtElseContent.Text = effectValue.ElseContent;
            }
        }
        bool frm_CommonProcessSubmit(CustomFlowForm form, string advise)
        {
            try
            {
                Business_CWQC_CreativePersentation             lnqSaveInfo    = form.ResultList[0] as Business_CWQC_CreativePersentation;
                Business_CWQC_CreativePersentation_EffectValue lnqEffectValue = form.ResultList[2] as Business_CWQC_CreativePersentation_EffectValue;
                this.OperationType = GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[1].ToString());
                this.BillNo        = lnqSaveInfo.BillNo;

                switch (this.OperationType)
                {
                case CE_FlowOperationType.提交:
                    m_mainService.SaveInfo(lnqSaveInfo, lnqEffectValue);
                    break;

                case CE_FlowOperationType.暂存:
                    m_mainService.SaveInfo(lnqSaveInfo, lnqEffectValue);
                    break;

                case CE_FlowOperationType.回退:
                    break;

                case CE_FlowOperationType.未知:
                    break;

                default:
                    break;
                }

                if (!m_mainService.IsExist(lnqSaveInfo.BillNo))
                {
                    MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面");
                    return(false);
                }

                return(true);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return(false);
            }
        }
        Business_CWQC_CreativePersentation_EffectValue GetInfo_EffectValue()
        {
            Business_CWQC_CreativePersentation_EffectValue tempLnq = new Business_CWQC_CreativePersentation_EffectValue();

            tempLnq.BillNo = txtBillNo.Text;

            tempLnq.ElseContent     = txtElseContent.Text;
            tempLnq.ElseEffectValue = numElseEffectValue.Value;

            tempLnq.MaterialReduce1 = numMaterialReduce1.Value;
            tempLnq.MaterialReduce2 = numMaterialReduce2.Value;
            tempLnq.MaterialReduce3 = numMaterialReduce3.Value;
            tempLnq.MaterialReduce4 = numMaterialReduce4.Value;

            tempLnq.WorkReduce1 = numWorkReduce1.Value;
            tempLnq.WorkReduce2 = numWorkReduce2.Value;
            tempLnq.WorkReduce3 = numWorkReduce3.Value;
            tempLnq.WorkReduce4 = numWorkReduce4.Value;

            return(tempLnq);
        }
        void OperationInfo_EffectValue(DepotManagementDataContext ctx, Business_CWQC_CreativePersentation_EffectValue effectValue)
        {
            Business_CWQC_CreativePersentation_EffectValue lnqInfo = GetInfo_EffectValue(ctx, effectValue.BillNo);

            if (lnqInfo == null)
            {
                ctx.Business_CWQC_CreativePersentation_EffectValue.InsertOnSubmit(effectValue);
            }
            else
            {
                lnqInfo.ElseContent     = effectValue.ElseContent;
                lnqInfo.ElseEffectValue = effectValue.ElseEffectValue;
                lnqInfo.MaterialReduce1 = effectValue.MaterialReduce1;
                lnqInfo.MaterialReduce2 = effectValue.MaterialReduce2;
                lnqInfo.MaterialReduce3 = effectValue.MaterialReduce3;
                lnqInfo.MaterialReduce4 = effectValue.MaterialReduce4;
                lnqInfo.WorkReduce1     = effectValue.WorkReduce1;
                lnqInfo.WorkReduce2     = effectValue.WorkReduce2;
                lnqInfo.WorkReduce3     = effectValue.WorkReduce3;
                lnqInfo.WorkReduce4     = effectValue.WorkReduce4;
            }

            ctx.SubmitChanges();
        }