public BooleanCedent( CedentEnum cedentType, BooleanPartialCedentSettingStruct cedent) { CedentType = cedentType; Cedent = cedent; }
public CategorialCedent( CedentEnum cedentType, CategorialPartialCedentSettingStruct cedent) { CedentType = cedentType; Cedent = cedent; }
public CedentIdentifierAndType(int cedentIdentifier, CedentEnum cedentType) { this.cedentIdentifier = cedentIdentifier; this.cedentType = cedentType; }
/// <summary> /// tdKLCedentD or tdCFCedentD /// </summary> /// <returns>ID of new row inserted to database.</returns> private int SetCategorialPartialCedent(CedentEnum cedentType, long minLength, long maxLength, int taskDBID, TaskTypeEnum taskType) { string tableName; switch (taskType) { case TaskTypeEnum.KL: case TaskTypeEnum.SDKL: tableName = "tdKLCedentD"; break; case TaskTypeEnum.CF: case TaskTypeEnum.SDCF: tableName = "tdCFCedentD"; break; default: throw Ferda.Modules.Exceptions.SwitchCaseNotImplementedError(taskType); } string autoIncrementColumn = GetAutoIncrementColumnName(tableName); int autoIncrementValue = GetTableAutoIncrementValue(tableName, 1); string query = "INSERT INTO " + tableName + " (" + autoIncrementColumn + ",TaskID,CedentTypeID,MinLen,MaxLen) VALUES " + "(" + autoIncrementValue + "," + taskDBID + "," + constants.CedentEnumDictionary[cedentType] + "," + minLength + "," + maxLength + ")"; ExecuteInsertQuery(query, tableName); return autoIncrementValue; }
/// <summary> /// tdCedentD /// </summary> /// <returns>ID of new row inserted to database.</returns> private int SetBooleanPartialCedent(CedentEnum cedentType, long minLength, long maxLength, int taskDBID) { string tableName = "tdCedentD"; string autoIncrementColumn = GetAutoIncrementColumnName(tableName); int autoIncrementValue = GetTableAutoIncrementValue(tableName, 1); string query = "INSERT INTO " + tableName + " (" + autoIncrementColumn + ",Name,TaskID,CedentTypeID,MinLen,MaxLen) VALUES " + "(" + autoIncrementValue + "," + "'" + cedentType.ToString() + "'," + taskDBID + "," + constants.CedentEnumDictionary[cedentType] + "," + minLength + "," + maxLength + ")"; ExecuteInsertQuery(query, tableName); return autoIncrementValue; }
protected void addCategorialCedent(CategorialPartialCedentSettingStruct[] categorialPartialCedents, CedentEnum cedentType, ref List<CategorialCedent> categorialCedents) { CategorialCedent categorialCedent; if (categorialPartialCedents != null && categorialPartialCedents.Length > 0) foreach (CategorialPartialCedentSettingStruct categorialPartialCedentSetting in categorialPartialCedents) { categorialCedent = new CategorialCedent(cedentType, categorialPartialCedentSetting); categorialCedents.Add(categorialCedent); } }
protected void addBooleanCedents(BooleanPartialCedentSettingStruct[] booleanPartialCedents, CedentEnum cedentType, ref List<BooleanCedent> booleanCedents) { BooleanCedent booleanCedent; if (booleanPartialCedents != null && booleanPartialCedents.Length > 0) foreach (BooleanPartialCedentSettingStruct booleanPartialCedentSetting in booleanPartialCedents) { booleanCedent = new BooleanCedent(cedentType, booleanPartialCedentSetting); booleanCedents.Add(booleanCedent); } }