private void hsNew_Click(object sender, EventArgs e) { FunctionObject = new FunctionClass(); FunctionObject.Name = "NEW_FUNCTION"; var pc = new ParameterClass(); pc.Name = ""; pc.RawType = "INTEGER"; pc.FieldType = "LONG"; pc.TypeNumber = 8; pc.Length = 4; pc.Precision = 0; FunctionObject.ParameterOut.Add(pc); pc = new ParameterClass(); pc.Name = "XX"; pc.RawType = "INTEGER"; pc.FieldType = "LONG"; pc.TypeNumber = 8; pc.Length = 4; pc.Precision = 0; FunctionObject.ParameterIn.Add(pc); FunctionObject.Description = ""; OldFunctionObject = (FunctionClass)FunctionObject.Clone(); BearbeitenMode = StateClasses.EditStateClass.eBearbeiten.eInsert; DataToEdit(); MakeSQL(); }
public FunctionForm(Form parent, DBRegistrationClass dbReg, List <TableClass> tables, TreeNode tn, ContextMenuStrip cm, StateClasses.EditStateClass.eBearbeiten mode) { InitializeComponent(); this.MdiParent = parent; Cm = cm; Tn = tn; _tables = tables; try { BearbeitenMode = mode; if (BearbeitenMode == StateClasses.EditStateClass.eBearbeiten.eInsert) { FunctionObject = new FunctionClass(); FunctionObject.Name = "NEW_FUNCTION"; } else { FunctionObject = (FunctionClass)tn.Tag; } } catch (Exception ex) { Console.WriteLine(ex.Message); } OldFunctionObject = (FunctionClass)FunctionObject.Clone(); _dbReg = dbReg; _localNotify.Register4Error(Notify_OnRaiseErrorHandler); _localNotify.Register4Info(Notify_OnRaiseInfoHandler); cbDatatype.Items.Clear(); DBTypeList dbList = new DBTypeList(); foreach (DBDataTypes dt in dbList.Values) { cbDatatype.Items.Add(dt); } DoEvents = true; }