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 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 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 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); } }