//===================================================================== // FunctionName : GetModifyInputParameter /// <summary> /// 得到修改用户输入参数操作 /// </summary> //===================================================================== protected override Boolean GetModifyInputParameter() { Boolean boolReturn = true; ValidateData validateData = new ValidateData(); // 验证输入参数 appData = RICH.Common.BM.T_BM_KCXX.T_BM_KCXXBusinessEntity.GetDataByObjectID(base.ObjectID); appData.OPCode = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ID; validateData = ValidateKCBH(KCBH.Text, false, false); if (validateData.Result) { if (!validateData.IsNull) { appData.KCBH = Convert.ToString(validateData.Value.ToString()); } else { appData.KCBH = null; } KCBH.BackColor = System.Drawing.Color.Empty; } else { KCBH.BackColor = System.Drawing.Color.YellowGreen; MessageContent += @"<font color=""red"">" + validateData.Message + "</font>"; boolReturn = validateData.Result; } validateData = ValidateKCMC(KCMC.Text, false, false); if (validateData.Result) { if (!validateData.IsNull) { appData.KCMC = Convert.ToString(validateData.Value.ToString()); } else { appData.KCMC = null; } KCMC.BackColor = System.Drawing.Color.Empty; } else { KCMC.BackColor = System.Drawing.Color.YellowGreen; MessageContent += @"<font color=""red"">" + validateData.Message + "</font>"; boolReturn = validateData.Result; } validateData = ValidateKCXLBH(KCXLBH.SelectedValue, false, false); if (validateData.Result) { if (!validateData.IsNull) { appData.KCXLBH = Convert.ToString(validateData.Value.ToString()); } else { appData.KCXLBH = null; } KCXLBH.BackColor = System.Drawing.Color.Empty; } else { KCXLBH.BackColor = System.Drawing.Color.YellowGreen; MessageContent += @"<font color=""red"">" + validateData.Message + "</font>"; boolReturn = validateData.Result; } if (KCTP.Upload()) { appData.KCTP = KCTP.Text; } else { MessageContent += @"<font color=""red"">" + KCTP.Message + "</font>"; boolReturn = false; } validateData = ValidateKCNR(KCNR.Text, false, false); if (validateData.Result) { if (!validateData.IsNull) { appData.KCNR = Convert.ToString(validateData.Value.ToString()); } else { appData.KCNR = null; } KCNR.BackColor = System.Drawing.Color.Empty; } else { KCNR.BackColor = System.Drawing.Color.YellowGreen; MessageContent += @"<font color=""red"">" + validateData.Message + "</font>"; boolReturn = validateData.Result; } validateData = ValidateKCKKSJ(KCKKSJ.Text, false, false); if (validateData.Result) { if (!validateData.IsNull) { appData.KCKKSJ = Convert.ToDateTime(validateData.Value.ToString()); } KCKKSJ.BackColor = System.Drawing.Color.Empty; } else { KCKKSJ.BackColor = System.Drawing.Color.YellowGreen; MessageContent += @"<font color=""red"">" + validateData.Message + "</font>"; boolReturn = validateData.Result; } validateData = ValidateKSS(KSS.Text, false, false); if (validateData.Result) { if (!validateData.IsNull) { appData.KSS = Convert.ToInt32(validateData.Value.ToString()); } KSS.BackColor = System.Drawing.Color.Empty; } else { KSS.BackColor = System.Drawing.Color.YellowGreen; MessageContent += @"<font color=""red"">" + validateData.Message + "</font>"; boolReturn = validateData.Result; } return(boolReturn); }
//===================================================================== // FunctionName : GetAddInputParameter /// <summary> /// 得到添加用户输入参数操作 /// </summary> //===================================================================== protected override Boolean GetAddInputParameter() { Boolean boolReturn = true; ValidateData validateData = new ValidateData(); // 验证输入参数 validateData = ValidateKCMC(KCMC.Text, false, false); if (validateData.Result) { if (!validateData.IsNull) { appData.KCMC = Convert.ToString(validateData.Value.ToString()); } KCMC.BackColor = System.Drawing.Color.Empty; } else { KCMC.BackColor = System.Drawing.Color.YellowGreen; MessageContent += @"<font color=""red"">" + validateData.Message + "</font>"; boolReturn = validateData.Result; } validateData = ValidateKCXLBH(KCXLBH.SelectedValue, false, false); if (validateData.Result) { if (!validateData.IsNull) { appData.KCXLBH = Convert.ToString(validateData.Value.ToString()); } KCXLBH.BackColor = System.Drawing.Color.Empty; } else { KCXLBH.BackColor = System.Drawing.Color.YellowGreen; MessageContent += @"<font color=""red"">" + validateData.Message + "</font>"; boolReturn = validateData.Result; } if (KCTP.Upload()) { appData.KCTP = KCTP.Text; } else { MessageContent += @"<font color=""red"">" + KCTP.Message + "</font>"; boolReturn = false; } validateData = ValidateKCNR(KCNR.Text, false, false); if (validateData.Result) { if (!validateData.IsNull) { appData.KCNR = Convert.ToString(validateData.Value.ToString()); } KCNR.BackColor = System.Drawing.Color.Empty; } else { KCNR.BackColor = System.Drawing.Color.YellowGreen; MessageContent += @"<font color=""red"">" + validateData.Message + "</font>"; boolReturn = validateData.Result; } validateData = ValidateKCKKSJ(KCKKSJ.Text, false, false); if (validateData.Result) { if (!validateData.IsNull) { appData.KCKKSJ = Convert.ToDateTime(validateData.Value.ToString()); } KCKKSJ.BackColor = System.Drawing.Color.Empty; } else { KCKKSJ.BackColor = System.Drawing.Color.YellowGreen; MessageContent += @"<font color=""red"">" + validateData.Message + "</font>"; boolReturn = validateData.Result; } validateData = ValidateKSS(KSS.Text, false, false); if (validateData.Result) { if (!validateData.IsNull) { appData.KSS = Convert.ToInt32(validateData.Value.ToString()); } KSS.BackColor = System.Drawing.Color.Empty; } else { KSS.BackColor = System.Drawing.Color.YellowGreen; MessageContent += @"<font color=""red"">" + validateData.Message + "</font>"; boolReturn = validateData.Result; } // 自动生成编号 T_BM_KCXXApplicationLogic instanceT_BM_KCXXApplicationLogic = (T_BM_KCXXApplicationLogic)CreateApplicationLogicInstance(typeof(T_BM_KCXXApplicationLogic)); appData.KCBH = instanceT_BM_KCXXApplicationLogic.AutoGenerateKCBH(appData); return(boolReturn); }