//===================================================================== // FunctionName : GetModifyInputParameter /// <summary> /// 得到修改用户输入参数操作 /// </summary> //===================================================================== protected override Boolean GetModifyInputParameter() { Boolean boolReturn = true; ValidateData validateData = new ValidateData(); // 验证输入参数 appData = RICH.Common.BM.ShortMessage.ShortMessageBusinessEntity.GetDataByObjectID(base.ObjectID); appData.OPCode = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ID; validateData = ValidateDXXBT(DXXBT.Text, false, false); if (validateData.Result) { if (!validateData.IsNull) { appData.DXXBT = Convert.ToString(validateData.Value.ToString()); } else { appData.DXXBT = null; } DXXBT.BackColor = System.Drawing.Color.Empty; } else { DXXBT.BackColor = System.Drawing.Color.YellowGreen; MessageContent += @"<font color=""red"">" + validateData.Message + "</font>"; boolReturn = validateData.Result; } validateData = ValidateDXXNR(DXXNR.Text, true, false); if (validateData.Result) { if (!validateData.IsNull) { appData.DXXNR = Convert.ToString(validateData.Value.ToString()); } else { appData.DXXNR = null; } DXXNR.BackColor = System.Drawing.Color.Empty; } else { DXXNR.BackColor = System.Drawing.Color.YellowGreen; MessageContent += @"<font color=""red"">" + validateData.Message + "</font>"; boolReturn = validateData.Result; } if (DXXFJ.Upload()) { appData.DXXFJ = DXXFJ.Text; } else { MessageContent += @"<font color=""red"">" + DXXFJ.Message + "</font>"; boolReturn = false; } validateData = ValidateJSR(JSR.SelectedValues, false, false); if (validateData.Result) { if (!validateData.IsNull) { appData.JSR = Convert.ToString(validateData.Value.ToString()); } else { appData.JSR = null; } JSR.BackColor = System.Drawing.Color.Empty; } else { JSR.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 = ValidateDXXBT(DXXBT.Text, false, false); if (validateData.Result) { if (!validateData.IsNull) { appData.DXXBT = Convert.ToString(validateData.Value.ToString()); } DXXBT.BackColor = System.Drawing.Color.Empty; } else { DXXBT.BackColor = System.Drawing.Color.YellowGreen; MessageContent += @"<font color=""red"">" + validateData.Message + "</font>"; boolReturn = validateData.Result; } validateData = ValidateDXXNR(DXXNR.Text, true, false); if (validateData.Result) { if (!validateData.IsNull) { appData.DXXNR = Convert.ToString(validateData.Value.ToString()); } DXXNR.BackColor = System.Drawing.Color.Empty; } else { DXXNR.BackColor = System.Drawing.Color.YellowGreen; MessageContent += @"<font color=""red"">" + validateData.Message + "</font>"; boolReturn = validateData.Result; } if (DXXFJ.Upload()) { appData.DXXFJ = DXXFJ.Text; } else { MessageContent += @"<font color=""red"">" + DXXFJ.Message + "</font>"; boolReturn = false; } validateData = ValidateJSR(JSR.SelectedValues, false, false); if (validateData.Result) { if (!validateData.IsNull) { appData.JSR = Convert.ToString(validateData.Value.ToString()); } JSR.BackColor = System.Drawing.Color.Empty; } else { JSR.BackColor = System.Drawing.Color.YellowGreen; MessageContent += @"<font color=""red"">" + validateData.Message + "</font>"; boolReturn = validateData.Result; } // 自动生成编号 appData.DXXLX = "01"; appData.FSSJ = DateTime.Now; appData.FSR = (string)Session[ConstantsManager.SESSION_USER_ID]; appData.FSBM = (string)Session[ConstantsManager.SESSION_SSDW_ID]; appData.FSIP = (string)Request.ServerVariables["REMOTE_ADDR"]; return(boolReturn); }