Exemplo n.º 1
0
        private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_)
        {
            switch (SomeEvent_)
            {
            case FlowformFormEvents.Next:
                this.MyForm.Hide();
                //---
                frmProcessOutput output = new frmProcessOutput("Output");
                output.MdiParent = this.Base_ref;
                output.Show();
                //---
                this.MyForm.Refresh(); this.MyForm.Hide();
                output.Refresh();
                this.Base_ref.Refresh();
                //---
                //output.DisplayMessage("generating...", true);
                frm_Main.NTierProject.Metadata.MetadataExtendedCollection[0].SQLScriptOption = this.MyForm.SQLscriptOptions;
//					frm_Main.NTierProject.Metadata.PseudoReflectionable = this.MyForm.pReflection;
                frm_Main.NTierProject.Build(output.DisplayMessage);
                //output.DisplayMessage("... finished!", true);
                output.DisplayMessage();
                //---
                this.NotifyBase(FlowformEvents.Closed, this);
                break;
            }
        }
Exemplo n.º 2
0
		private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_) {
			switch (SomeEvent_) {
				case FlowformFormEvents.Next:
					// ToDos: here!



					if (string.IsNullOrEmpty(this.MyForm.ViewName)) {
						System.Windows.Forms.MessageBox.Show(
							"must choose a view",
							"Warning",
							System.Windows.Forms.MessageBoxButtons.OK,
							System.Windows.Forms.MessageBoxIcon.Warning
						);
					} else {
						this.MyProcess.ViewName = this.MyForm.ViewName;
						#region ((cManage_Views_PK_s020)MyFlowforms[0]).Show();
						if (this.MyFlowforms[0] == null) {
							this.MyFlowforms[0] = new cManage_Views_PK_s020(
								this.Base_ref,
								this.MyFlowforms_notifiedMe,
								this.MyProcess
							);
						}
						this.MyForm.Hide();
						this.MyFlowforms[0].Show();
						#endregion
					}



					break;
			}
		}
Exemplo n.º 3
0
		private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_) {
			switch (SomeEvent_) {
				case FlowformFormEvents.Next:
					// ToDos: here!



					this.MyProcess.Undefined_orAll = this.MyForm.Undefined_orAll;
					#region ((Flowform)MyFlowforms[0]).Show();
					if (this.MyFlowforms[0] == null) {
						this.MyFlowforms[0] = new cManage_Views_PK_s010(
							this.Base_ref,
							this.MyFlowforms_notifiedMe,
							this.MyProcess
						);
					}
					this.MyForm.Hide();
					this.MyFlowforms[0].Show();
					#endregion



					break;
			}
		}
Exemplo n.º 4
0
        private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_)
        {
            switch (SomeEvent_)
            {
            case FlowformFormEvents.Next:
                // ToDos: here!



                this.MyProcess.Undefined_orAll = this.MyForm.Undefined_orAll;
                #region ((Flowform)MyFlowforms[0]).Show();
                if (this.MyFlowforms[0] == null)
                {
                    this.MyFlowforms[0] = new cManage_Views_PK_s010(
                        this.Base_ref,
                        this.MyFlowforms_notifiedMe,
                        this.MyProcess
                        );
                }
                this.MyForm.Hide();
                this.MyFlowforms[0].Show();
                #endregion



                break;
            }
        }
Exemplo n.º 5
0
        private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_)
        {
            switch (SomeEvent_)
            {
            case FlowformFormEvents.Next:
                // ToDos: here!



                this.MyProcess.Choice = this.MyForm.Choice;
                #region ((cManage_ConfigTables_CreateOrChange_s010)MyFlowforms[0]).Show();
                if (this.MyFlowforms[0] == null)
                {
                    this.MyFlowforms[0] = new cManage_ConfigTables_CreateOrChange_s010(
                        this.Base_ref,
                        this.MyFlowforms_notifiedMe,
                        this.MyProcess
                        );
                }
                this.MyForm.Hide();
                this.MyFlowforms[0].Show();
                #endregion



                break;
            }
        }
Exemplo n.º 6
0
		private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_) {
			switch (SomeEvent_) {
				case FlowformFormEvents.Next:
					// ToDos: here!



					#region ((Flowform)MyFlowforms[0]).Show();
					if (this.MyFlowforms[0] == null) {
						//MyFlowforms[0] = new cMODEL_s010(
						//	Base_ref, 
						//	new Flowform.dNotifyBase(MyFlowforms_notifiedMe), 
						//	MyProcess
						//);
					}
					this.MyForm.Hide();
					this.MyFlowforms[0].Show();
					#endregion
					// IF LAST FORM:
					//NotifyBase(FlowformEvents.Closed, this);



					break;
			}
		}
Exemplo n.º 7
0
        private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_)
        {
            switch (SomeEvent_)
            {
            case FlowformFormEvents.Next:
                // ToDos: here!



                #region ((cMODEL_s020)MyFlowforms[0]).Show();
                if (this.MyFlowforms[0] == null)
                {
                    //MyFlowforms[0] = new cMODEL_s020(
                    //	Base_ref,
                    //	new Flowform.dNotifyBase(MyFlowforms_notifiedMe),
                    //	MyProcess
                    //);
                }
                this.MyForm.Hide();
                this.MyFlowforms[0].Show();
                #endregion
                // IF LAST FORM:
                //NotifyBase(FlowformEvents.Closed, this);



                break;
            }
        }
Exemplo n.º 8
0
		public void NotifyBase(FlowformFormEvents someEvent_in) {
			if (someEvent_in == FlowformFormEvents.Next) {
				if (this.notifybase_aboutnext_ != null) this.notifybase_aboutnext_(someEvent_in);
			} else {
				if (this.notifybase_ != null) this.notifybase_(someEvent_in);
			}
		}
Exemplo n.º 9
0
		protected void MyForm_notifiedMe(FlowformFormEvents someEvent_in) {
			switch (someEvent_in) {
				case FlowformFormEvents.Closed:
					this.NotifyBase(FlowformEvents.Closed, this);
					break;
				case FlowformFormEvents.Back:
					this.NotifyBase(FlowformEvents.Back, this);
					break;
			}
		}
Exemplo n.º 10
0
        protected void MyForm_notifiedMe(FlowformFormEvents someEvent_in)
        {
            switch (someEvent_in)
            {
            case FlowformFormEvents.Closed:
                this.NotifyBase(FlowformEvents.Closed, this);
                break;

            case FlowformFormEvents.Back:
                this.NotifyBase(FlowformEvents.Back, this);
                break;
            }
        }
Exemplo n.º 11
0
        private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_)
        {
            switch (SomeEvent_)
            {
            case FlowformFormEvents.Next:



                if (string.IsNullOrEmpty(this.MyForm.TableName))
                {
                    System.Windows.Forms.MessageBox.Show(
                        "must choose one table",
                        "Warning",
                        System.Windows.Forms.MessageBoxButtons.OK,
                        System.Windows.Forms.MessageBoxIcon.Warning
                        );
                }
                else
                {
                    this.MyProcess.TableName = this.MyForm.TableName;
                    switch (this.MyProcess.Choice)
                    {
                    case eInsUpdDel.Delete:
                        this.MyProcess.ConfigTables();
                        this.NotifyBase(FlowformEvents.Closed, this);
                        break;

                    case eInsUpdDel.Insert:
                    case eInsUpdDel.Update:
                        #region ((cManage_ConfigTables_CreateOrChange_s020)MyFlowforms[0]).Show();
                        if (this.MyFlowforms[0] == null)
                        {
                            this.MyFlowforms[0] = new cManage_ConfigTables_CreateOrChange_s020(
                                Base_ref,
                                this.MyFlowforms_notifiedMe,
                                this.MyProcess
                                );
                        }
                        this.MyForm.Hide();
                        this.MyFlowforms[0].Show();
                        #endregion
                        break;
                    }
                }



                break;
            }
        }
Exemplo n.º 12
0
        private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_)
        {
            switch (SomeEvent_)
            {
            case FlowformFormEvents.Next:



                if (
                    string.IsNullOrEmpty(this.MyForm.ConfigField) ||
                    string.IsNullOrEmpty(this.MyForm.NameField) ||
                    string.IsNullOrEmpty(this.MyForm.DatatypeField)
                    )
                {
                    System.Windows.Forms.MessageBox.Show(
                        "must choose fields",
                        "Warning",
                        System.Windows.Forms.MessageBoxButtons.OK,
                        System.Windows.Forms.MessageBoxIcon.Warning
                        );
                }
                else
                {
                    if (this.MyForm.ConfigField == MyForm.NameField)
                    {
                        System.Windows.Forms.MessageBox.Show(
                            "Name Field must be diferente from Config Field",
                            "Warning",
                            System.Windows.Forms.MessageBoxButtons.OK,
                            System.Windows.Forms.MessageBoxIcon.Warning
                            );
                    }
                    else
                    {
                        this.MyProcess.ConfigField   = this.MyForm.ConfigField;
                        this.MyProcess.NameField     = this.MyForm.NameField;
                        this.MyProcess.DatatypeField = this.MyForm.DatatypeField;

                        this.MyProcess.ConfigTables();
                        this.NotifyBase(FlowformEvents.Closed, this);
                    }
                }



                break;
            }
        }
Exemplo n.º 13
0
		private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_) {
			switch (SomeEvent_) {
				case FlowformFormEvents.Next:
					// ToDos: here!



					this.MyProcess.ViewPKs = this.MyForm.ViewPKs;
					this.MyProcess.Manage_Views_PK();
					this.NotifyBase(FlowformEvents.Closed, this);



					break;
			}
		}
Exemplo n.º 14
0
 public void NotifyBase(FlowformFormEvents someEvent_in)
 {
     if (someEvent_in == FlowformFormEvents.Next)
     {
         if (this.notifybase_aboutnext_ != null)
         {
             this.notifybase_aboutnext_(someEvent_in);
         }
     }
     else
     {
         if (this.notifybase_ != null)
         {
             this.notifybase_(someEvent_in);
         }
     }
 }
Exemplo n.º 15
0
        private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_)
        {
            switch (SomeEvent_)
            {
            case FlowformFormEvents.Next:
                // ToDos: here!



                this.MyProcess.ViewPKs = this.MyForm.ViewPKs;
                this.MyProcess.Manage_Views_PK();
                this.NotifyBase(FlowformEvents.Closed, this);



                break;
            }
        }
Exemplo n.º 16
0
		private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_) {
			switch (SomeEvent_) {
				case FlowformFormEvents.Next:



					if (string.IsNullOrEmpty(this.MyForm.TableName)) {
						System.Windows.Forms.MessageBox.Show(
							"must choose one table",
							"Warning",
							System.Windows.Forms.MessageBoxButtons.OK,
							System.Windows.Forms.MessageBoxIcon.Warning
						);
					} else {
						this.MyProcess.TableName = this.MyForm.TableName;
						switch (this.MyProcess.Choice) {
							case eInsUpdDel.Delete:
								this.MyProcess.ConfigTables();
								this.NotifyBase(FlowformEvents.Closed, this);
								break;
							case eInsUpdDel.Insert:
							case eInsUpdDel.Update:
								#region ((cManage_ConfigTables_CreateOrChange_s020)MyFlowforms[0]).Show();
								if (this.MyFlowforms[0] == null) {
									this.MyFlowforms[0] = new cManage_ConfigTables_CreateOrChange_s020(
										Base_ref,
										this.MyFlowforms_notifiedMe,
										this.MyProcess
									);
								}
								this.MyForm.Hide();
								this.MyFlowforms[0].Show();
								#endregion
								break;
						}
					}



					break;
			}
		}
Exemplo n.º 17
0
        private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_)
        {
            switch (SomeEvent_)
            {
            case FlowformFormEvents.Next:
                // ToDos: here!



                if (string.IsNullOrEmpty(this.MyForm.ViewName))
                {
                    System.Windows.Forms.MessageBox.Show(
                        "must choose a view",
                        "Warning",
                        System.Windows.Forms.MessageBoxButtons.OK,
                        System.Windows.Forms.MessageBoxIcon.Warning
                        );
                }
                else
                {
                    this.MyProcess.ViewName = this.MyForm.ViewName;
                    #region ((cManage_Views_PK_s020)MyFlowforms[0]).Show();
                    if (this.MyFlowforms[0] == null)
                    {
                        this.MyFlowforms[0] = new cManage_Views_PK_s020(
                            this.Base_ref,
                            this.MyFlowforms_notifiedMe,
                            this.MyProcess
                            );
                    }
                    this.MyForm.Hide();
                    this.MyFlowforms[0].Show();
                    #endregion
                }



                break;
            }
        }
Exemplo n.º 18
0
		private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_) {
			switch (SomeEvent_) {
				case FlowformFormEvents.Next:
					this.MyForm.Hide();
					//---
					frmProcessOutput output = new frmProcessOutput("Output");
					output.MdiParent = this.Base_ref;
					output.Show();
					//---
					this.MyForm.Refresh(); this.MyForm.Hide();
					output.Refresh();
					this.Base_ref.Refresh();
					//---
					//output.DisplayMessage("generating...", true);
					frm_Main.NTierProject.Metadata.MetadataExtendedCollection[0].SQLScriptOption = this.MyForm.SQLscriptOptions;
//					frm_Main.NTierProject.Metadata.PseudoReflectionable = this.MyForm.pReflection;
					frm_Main.NTierProject.Build(output.DisplayMessage);
					//output.DisplayMessage("... finished!", true);
					output.DisplayMessage();
					//---
					this.NotifyBase(FlowformEvents.Closed, this);
					break;
			}
		}
Exemplo n.º 19
0
        private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_)
        {
            switch (SomeEvent_)
            {
            case FlowformFormEvents.Next:
                #region Checking...
                if (
                    (this.mode_ == eMode.New)
                    &&
                    (string.IsNullOrEmpty(this.MyForm.ApplicationPath))
                    )
                {
                    System.Windows.Forms.MessageBox.Show(
                        "must provide a valid Application Path",
                        "Warning",
                        System.Windows.Forms.MessageBoxButtons.OK,
                        System.Windows.Forms.MessageBoxIcon.Warning
                        );
                    return;
                }
                if (
                    (this.mode_ == eMode.New)
                    &&
                    (
                        (System.IO.Directory.GetDirectories(this.MyForm.ApplicationPath).Length != 0)
                        ||
                        (System.IO.Directory.GetFiles(this.MyForm.ApplicationPath).Length != 0)
                    )
                    )
                {
                    switch (System.Windows.Forms.MessageBox.Show(
                                "provided Application Path is not empty,\nfile overwrite may occur,\ncontinue?",
                                "Warning",
                                System.Windows.Forms.MessageBoxButtons.OKCancel,
                                System.Windows.Forms.MessageBoxIcon.Warning
                                ))
                    {
                    case System.Windows.Forms.DialogResult.OK: {
                        break;
                    }

                    case System.Windows.Forms.DialogResult.Cancel: {
                        return;
                    }
                    }
                }
                if (string.IsNullOrEmpty(this.MyForm.ApplicationName))
                {
                    System.Windows.Forms.MessageBox.Show(
                        "must provide a valid Application Name",
                        "Warning",
                        System.Windows.Forms.MessageBoxButtons.OK,
                        System.Windows.Forms.MessageBoxIcon.Warning
                        );
                    return;
                }
                if (string.IsNullOrEmpty(this.MyForm.Namespace))
                {
                    System.Windows.Forms.MessageBox.Show(
                        "must provide a valid Application Namespace",
                        "Warning",
                        System.Windows.Forms.MessageBoxButtons.OK,
                        System.Windows.Forms.MessageBoxIcon.Warning
                        );
                    return;
                }
                #endregion
                OGen.NTier.Libraries.Metadata.MetadataExtended.XS_dbType[]
                _dbs = this.MyForm.UnBind_DBConnections();
                #region More Checking...
                if (_dbs.Length == 0)
                {
                    System.Windows.Forms.MessageBox.Show(
                        "must provide at least one valid DB Connection",
                        "Warning",
                        System.Windows.Forms.MessageBoxButtons.OK,
                        System.Windows.Forms.MessageBoxIcon.Warning
                        );
                    return;
                }
                #endregion
                if (this.mode_ == eMode.Update)
                {
                    #region Updating...
                    frm_Main.ntierproject.Metadata.MetadataExtendedCollection[0].DBs.DBCollection.Clear();
                    int _justadded = -1;
                    for (int d = 0; d < _dbs.Length; d++)
                    {
                        frm_Main.ntierproject.Metadata.MetadataExtendedCollection[0].DBs.DBCollection.Add(
                            out _justadded,
                            false,
                            new OGen.NTier.Libraries.Metadata.MetadataExtended.XS_dbType(
                                _dbs[d].DBServerType.ToString()
                                )
                            );
                        frm_Main.ntierproject.Metadata.MetadataExtendedCollection[0].DBs.DBCollection[
                            _justadded
                        ].CopyFrom(
                            _dbs[d]
                            );
                        //if (d == 0) {
                        //    // ToDos: here! document this behaviour and describe it throught unit testing
                        //    // first item in the array, represents default db connection
                        //    frm_Main.ntierproject.Metadata.Default_DBServerType = frm_Main.ntierproject.Metadata.MetadataExtendedCollection[0].DBs.DBCollection[_justadded].DBServerType;
                        //    frm_Main.ntierproject.Metadata.Default_ConfigMode = frm_Main.ntierproject.Metadata.MetadataExtendedCollection[0].DBs.DBCollection[_justadded].Connections[0].ConfigMode;
                        //}
                    }

                    frm_Main.ntierproject.Metadata.MetadataExtendedCollection[0].ApplicationName
                        = this.MyForm.ApplicationName;
                    frm_Main.ntierproject.Metadata.MetadataExtendedCollection[0].ApplicationNamespace
                        = this.MyForm.Namespace;
                    #endregion
                    frm_Main.NTierProject.HasChanges = true;
                }
                else
                {
                    #region Creating...
                    this.MyForm.Hide();

                    frmProcessOutput _output = new frmProcessOutput("Output");
                    _output.MdiParent = this.Base_ref;
                    _output.Show();

                    frm_Main.ntierproject.New(
                        this.MyForm.ApplicationPath,
                        this.MyForm.ApplicationName,
                        this.MyForm.Namespace,
                        _dbs,
                        _output.DisplayMessage
                        );

                    _output.DisplayMessage();
                    #endregion
                }
                this.Base_ref.Form_Refresh();

                this.MyForm.Hide();
                this.NotifyBase(FlowformEvents.Closed, this);
                break;
            }
        }
		private void MyForm_notifiedMe_aboutNext(FlowformFormEvents SomeEvent_) {
			switch (SomeEvent_) {
				case FlowformFormEvents.Next:
					#region Checking...
					if (
						(this.mode_ == eMode.New) 
						&&
						(string.IsNullOrEmpty(this.MyForm.ApplicationPath))
					) {
						System.Windows.Forms.MessageBox.Show(
							"must provide a valid Application Path",
							"Warning",
							System.Windows.Forms.MessageBoxButtons.OK,
							System.Windows.Forms.MessageBoxIcon.Warning
						);
						return;
					}
					if (
						(this.mode_ == eMode.New) 
						&& 
						(
							(System.IO.Directory.GetDirectories(this.MyForm.ApplicationPath).Length != 0)
							||
							(System.IO.Directory.GetFiles(this.MyForm.ApplicationPath).Length != 0)
						)
					) {
						switch(System.Windows.Forms.MessageBox.Show(
							"provided Application Path is not empty,\nfile overwrite may occur,\ncontinue?",
							"Warning",
							System.Windows.Forms.MessageBoxButtons.OKCancel,
							System.Windows.Forms.MessageBoxIcon.Warning
						)) {
							case System.Windows.Forms.DialogResult.OK: {
								break;
							}
							case System.Windows.Forms.DialogResult.Cancel: {
								return;
							}
						}
					}
					if (string.IsNullOrEmpty(this.MyForm.ApplicationName)) {
						System.Windows.Forms.MessageBox.Show(
							"must provide a valid Application Name",
							"Warning",
							System.Windows.Forms.MessageBoxButtons.OK,
							System.Windows.Forms.MessageBoxIcon.Warning
						);
						return;
					}
					if (string.IsNullOrEmpty(this.MyForm.Namespace)) {
						System.Windows.Forms.MessageBox.Show(
							"must provide a valid Application Namespace",
							"Warning",
							System.Windows.Forms.MessageBoxButtons.OK,
							System.Windows.Forms.MessageBoxIcon.Warning
						);
						return;
					}
					#endregion
					OGen.NTier.Libraries.Metadata.MetadataExtended.XS_dbType[]
						_dbs = this.MyForm.UnBind_DBConnections();
					#region More Checking...
					if (_dbs.Length == 0) {
						System.Windows.Forms.MessageBox.Show(
							"must provide at least one valid DB Connection",
							"Warning",
							System.Windows.Forms.MessageBoxButtons.OK,
							System.Windows.Forms.MessageBoxIcon.Warning
						);
						return;
					}
					#endregion
					if (this.mode_ == eMode.Update) {
						#region Updating...
						frm_Main.ntierproject.Metadata.MetadataExtendedCollection[0].DBs.DBCollection.Clear();
						int _justadded = -1;
						for (int d = 0; d < _dbs.Length; d++) {
							frm_Main.ntierproject.Metadata.MetadataExtendedCollection[0].DBs.DBCollection.Add(
								out _justadded,
								false, 
								new OGen.NTier.Libraries.Metadata.MetadataExtended.XS_dbType(
									_dbs[d].DBServerType.ToString()
								)
							);
							frm_Main.ntierproject.Metadata.MetadataExtendedCollection[0].DBs.DBCollection[
								_justadded
							].CopyFrom(
								_dbs[d]
							);
							//if (d == 0) {
							//    // ToDos: here! document this behaviour and describe it throught unit testing
							//    // first item in the array, represents default db connection
							//    frm_Main.ntierproject.Metadata.Default_DBServerType = frm_Main.ntierproject.Metadata.MetadataExtendedCollection[0].DBs.DBCollection[_justadded].DBServerType;
							//    frm_Main.ntierproject.Metadata.Default_ConfigMode = frm_Main.ntierproject.Metadata.MetadataExtendedCollection[0].DBs.DBCollection[_justadded].Connections[0].ConfigMode;
							//}
						}

						frm_Main.ntierproject.Metadata.MetadataExtendedCollection[0].ApplicationName
							= this.MyForm.ApplicationName;
						frm_Main.ntierproject.Metadata.MetadataExtendedCollection[0].ApplicationNamespace
							= this.MyForm.Namespace;
						#endregion
						frm_Main.NTierProject.HasChanges = true;
					} else {
						#region Creating...
						this.MyForm.Hide();

						frmProcessOutput _output = new frmProcessOutput("Output");
						_output.MdiParent = this.Base_ref;
						_output.Show();

						frm_Main.ntierproject.New(
							this.MyForm.ApplicationPath,
							this.MyForm.ApplicationName,
							this.MyForm.Namespace, 
							_dbs,
							_output.DisplayMessage
						);

						_output.DisplayMessage();
						#endregion
					}
					this.Base_ref.Form_Refresh();

					this.MyForm.Hide();
					this.NotifyBase(FlowformEvents.Closed, this);
					break;
			}
		}