Wavemaker- How to add new user? - crud

Today I am using WaveMaker for the very first time and using WaveMaker's Security.
I want to add a 'Register User' button along side Login, Though i have added the button on UI level but don't know how to bind it with database(sqlServer).
As the name suggests this button will add new users in database, how to do it?
what steps should I follow after adding button?

If you want to add a new user, maybe you can add some layer (or dialog form) that has the inputs that you need to capture, then, in the "create" button of your form, you have to connecto to the service that is connected to the database.
To understand how you can connect a button to the database follow the next tutorial: http://www.youtube.com/watch?v=ofzMBDtAz_w
regards

Related

Adding a "New Button" option on Access form

Please forgive me if this question is too vague or extensive. I have limited experience with Access, SQL, and VBA and have a problem at work that I just can't solve. I'm trying to add a "new button" button to the user interface on our Access database.
I would like it to maybe bring up another form that allows you to input a query you want to make into a quick link on the home page. Obviously this would only be accessible to certain users but I can handle that part.
I don't necessarily need the code written, just an idea of where to start. So far all I've been able to do is hard code a new query or link into a button each team I want to make one. I want this process to be simplified so that anybody can make a button even if they don't know how to use Access very well.
Again, any help would be greatly appreciated and feel free to tell me to get lost if this is too vast or general a question.
I would like it to maybe bring up another form that allows you to input a query
The above seems very confusing. You are asking how a form can be used or launched or displayed to allow the user to add a new record. Then you toss in this VERY unrelated concept of some query? What does some query have to do with adding a new record?
If you want to add a new record, and you are in a form that is displaying current records, then behind the button, you can execute this line of code to jump to a new record ready for data entry:
DoCmd.GoToRecord , , acNewRec
So, that is one line of code.
If you want to launch an existing form and have it start out with a new clean fresh record, then use this:
DoCmd.OpenForm "frmCustomers", , , , acFormAdd
The above will launch the given from in "add mode" and thus you are again on a new fresh record ready for data entry.
The issue(s) of some query etc. for the user What does that have to do with wanting the user to add a new record? So that part does not seem to apply to the basic idea of presenting a form with a new record which allows the user to add that record in question.
You have to explain what all the hub bub about this magic query issue but to jump a form to a new record for the user? Just use the first line of code behind a button.
And if you need to launch a form in "add mode", then use the 2nd example one line of code behind the button in question. None of this has really anything to do with some "query" in regards to you wanting the user to add a new record. You can expand on what you mean by some user query, but you have several options to jump an existing form to a new record, or launch a form in "add mode" to allow adding of a record. In these cases, you don't need nor want to write or deal with some SQL query.

Need prompt to save changes in Windows form when changing displayed record

I am relatively new to programming, so this may be an easy one. I have a Windows form that connects to SQL Server and displays the data in a form where a user can edit and add or delete records (via databinding). The form works well, and has record navigation controls as well as context menus that allow the user to filter data on any field.
Currently, the user can make changes and switch to new records, etc... but changes are not applied until the user clicks the "save" button. However, I'd like to prompt the user to save records whenever the user navigates to a new record (either through navigator or through application of a filter which displays a different record).
What event can I use that will trigger whenever a different record is reflected in the form?
Thanks,
Jay

Visual Basic Opening A Form [duplicate]

I have a login form which I need to close without the entire application being terminated. I tried using Me.Close() , Me.Hide() as well. The login form is used as the main form as well.
I hope this makes sense....
It sounds like you have a VB.Net project and your Login form is your 'startup form'. When you close that form, your application thinks it is over; but you really want to take action after the Login form is closed.
If you bring up the Properties window for the project, on the Applications Tab you can set the 'Shutdown mode'. The default is when the 'Startup Form Closes'. Change it to 'When the last form closes'.
You can also add Application level events here.
http://msdn.microsoft.com/en-us/library/f2bys999(v=vs.80).aspx
If you stick with the way you are going; your Login form is going to have to create another form before it closes or your app will close. You can do that; but it's probably cleaner to move the login logic into the Application Startup Event (see link for more details).
In the startup event you can show the Login screen, get the result, decide if you want to show the main form for your application, etc, etc...
This depends on where you are trying to close or hide the form. If you are trying to close or hide the form from within the the form itself then Me.Close() and Me.Hide() does the job. If you are attempting to close or hide a form from another form like your main form then you must refer to the form instance example:
frmAbout.Close()
frmAbout.Hide()
I hope this helps.

Making multiple forms appear as one in VB.NET

I am writing a Windows Forms application in VB.NET. I have three forms: the main form, which shows a list of accounts, the account form which allows the user to view/edit the information for a specific account, and the policy form which allows the user to view/edit the information on a specific policy for that account. I want the forms to appear as if they are all the same window. Example: when the application starts, the user clicks an account name in the list box on the main form and clicks "edit". What I want to happen is that the window stays in the exact same place and stays the same exact size, only the content of the main form appears to be replaced with the content of the account form. Same thing if the user then chooses to edit a policy from the account form. When the user finishes and clicks "save", the main form comes back up. Through this entire use case, it would appear to the user as if they were viewing the same window the entire time, with the content of that window changing.
How can I do this? I have tried something like:
Dim newForm as New AcctForm
newForm.Location = Me.Location
newForm.Show()
Me.Close()
The problem is that if the user moves the original window, the new window appears where the parent form originally appeared, not where it ended up.
I see this is already in the comments, but what I have done in this case in the past is build each "form" in the application as a custom control. Then I have one actual form, and navigation works by changing which custom control is currently loaded on the parent form. To move from one screen/view to another, you remove the current custom control from the form's controls collection and add the new custom control.
I believe this is superior to manually setting the startup position and size, because you can use the form's .SuspendLayout()/.ResumeLayout() methods to hide the interim state, where there is no control loaded, from the user. This is harder to do when you want one form to be completely replaced by another.
This also makes it easy to set certain form properties in one place and have them be consistent for the application. You can even have an area on the form with controls that will now show in every view.
When using this pattern, I typically have each of my custom controls inherit from a common base. You may not have anything specific you will do with that base at the outset, but it almost always comes in handy later.
Finally, switching to use this scheme is easier than you think. Just go to the code for the each of your current forms, and you will find that each class currently inherits from System.Windows.Forms.Form. Most of the time, all you really need to do is change them to inherit from System.Windows.Forms.Panel and you're most of the way there.
As others have said, it may be better to redesign your application using custom controls or panels etc.
However, to answer your question regarding the seemingly random location of your forms, the first thing to check is that each form has it's StartPosition property set to Manual.
If your main form is resizable, then I would also add code to adjust newForm to the same size too.
I hope that helps with your immediate issues; so that you can move on to redesigning the application!
good morning there is another way . set property for second form to (top most) and use also
from2.show();
that make you switch between forms and keep form2 top other
Thanks
try using ShowDialog()
Dim newForm as New AcctForm
newForm.Location = Me.Location
newForm.ShowDialog()
Me.Close() <-- removed this

Disabling the initiation form when workflow is started manually in sharepoint 2010

I have a sharepoint site(sharepoint 2010).
I have created a custom action, on click of which will initiate the workflow associated to a list. When the user clicks on the custom action button, an initiation form will be shown which will have the Start and Cancel button. Only on click of this Start button, the workflow will Run. I want to avoid the last step of clicking on the Start button. What I want is "On click of Custom action, Workflow should Run. Initiation form should not come into picture at all". Is this possible ?
two solutions:
Say it's good because you make sure the user didn't make a mistake
Change the custom action form to a page where you start the workflow manually (via code) and then redirect the user to the home screen (you can also do that with a dialog and then there's no need for redirect)