private bool IsFieldValid(string paraName) { if (!CheckItemValid.IsValid(paraName)) { MessageBox.Show("The field name should only contain character, number or '_', and should begin with character, please input another name.", "Third Party Field Validate", MessageBoxButtons.OK, MessageBoxIcon.Warning); return(false); } else { return(true); } }
private bool IsFieldExist(string paraName) { if (type == "Add") { if (CheckItemValid.IsContain(paraName, fieldSet, StringComparison.OrdinalIgnoreCase)) { return(true); } } else { if (CheckItemValid.IsContain(paraName, fieldSet, StringComparison.OrdinalIgnoreCase) && paraName != resultList[resultIndex].ThirdPartyDBPatamter.FieldName) { return(true); } } return(false); }
private bool IsSPNameValid(string name) { if (name == GetSPPrefix()) { MessageBox.Show("Storage procedure name is not valid!", "Storage Procedure Validate", MessageBoxButtons.OK, MessageBoxIcon.Warning); return(false); } else if (!CheckItemValid.IsValid(name)) { MessageBox.Show("The storage procedure name should only contain character, number or '_', and after prefix \"" + GetSPPrefix() + "\", the later should begin with character, please input another name.", "Storage Procedure Validate", MessageBoxButtons.OK, MessageBoxIcon.Warning); return(false); } else { return(true); } }
private bool IsParaExist(string paraName) { if (type == "Add") { if (CheckItemValid.IsContain(paraName, parameterSet, StringComparison.OrdinalIgnoreCase)) { return(true); } } else { if (CheckItemValid.IsContain(paraName, parameterSet, StringComparison.OrdinalIgnoreCase) && paraName != parameterList[parameterIndex].GWDataDBField.FieldName) { return(true); } } return(false); }
private bool IsChannelExist(string channelName) { if (type == "Add") { if (CheckItemValid.IsContain(channelName, nameSet, StringComparison.Ordinal)) { return(true); } } else { if (CheckItemValid.IsContain(channelName, nameSet, StringComparison.Ordinal) && (txtChannelName.Text != channelSet[channelIndex].ChannelName)) { return(true); } } return(false); }
private bool IsParaValid(string paraName) { if (!CheckItemValid.IsValid(paraName)) { if (channelForm.QueryMode == ThrPartyDBOperationType.StorageProcedure.ToString()) { MessageBox.Show("The parameter name should only contain charactor, number or '_', and should begins with charactor, please input another name.", "Third Party Parameter Validate", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { MessageBox.Show("The field name should only contain charactor, number or '_', and should begins with charactor, please input another name.", "Third Party Field Validate", MessageBoxButtons.OK, MessageBoxIcon.Warning); } return(false); } else { return(true); } }
private bool IsSPNameExist(string SPName) { if (type == "Add") { if (CheckItemValid.IsContain(SPName, SPNameSet, StringComparison.OrdinalIgnoreCase)) { return(true); } } else { if (CheckItemValid.IsContain(SPName, SPNameSet, StringComparison.OrdinalIgnoreCase) && (txtSPName.Text != channel.SPName)) { return(true); } } return(false); }
private bool IsChannelNameValid(string name) { if (name == "") { MessageBox.Show("Please add a channel name!", "Channel Information", MessageBoxButtons.OK, MessageBoxIcon.Warning); this.txtChannelName.Focus(); return(false); } else if (!CheckItemValid.IsValid(name)) { MessageBox.Show("The channel name should only contain charactor, number or '_', and should begins with charactor, please input another name.", "Channel Name Validate", MessageBoxButtons.OK, MessageBoxIcon.Warning); this.txtChannelName.Focus(); return(false); } else { return(true); } }