VS 2010 Check First Rule (not Line) In RTB?

Mar 5, 2011

Let's say I have a rtb with a few lines.

line1: (empty)
line2: (empty)
Line3: "blablablablabla"
Line4: ..... etc

How do I get/read the first, only the first line? ("blablablabla")

View 9 Replies


ADVERTISEMENT

Architecture - Apply The Correct Data From The GUI To The Parameters For The Rule And Execute The Rule

Apr 6, 2011

I have a very simple Business Rules Engine that has only three methods. One gets all the rules for the current operation, one will retrieve a list of parameters for the rules, the last applies the rules. The rules are stored in the database as user defined functions using parameters. The client will call the BRE pass in the operation and a Lot Number and the BRE checks for any rules that apply to this operation for this Lot. The client gets a list of rules that apply (the names of the corresponding UDF's in the database) and at which step in the operation the rule applies. When the material gets to a step that has a rule, it calls BRE to get parameters for the UDF for that operation, fills in the parameters with data contained in the GUI and calls the BRE to apply the rule with this lot's specific data. Multiple lots can share the same rule that is why there are parameters for the UDF. This all works well. However, this is assuming we have a set number of rules for each lot at each operation. If the lot needs a new rule applied at this operation we have to add a new rule and corresponding UDF into the BRE database. This is not a problem, the client will now see two rules, however, it only knows how to apply the parameters for the first rule, and there is no code for applying the parameters for the second rule.

For example: Rule 1 states that only the same Lot number items can be put into a carton. So the UDF expects one parameter called LotID and one parameter called Carton ID. It runs the rule (UDF) with these parameters and checks to ensure the lots match. Now the Lot requires a second rule: Only 25 items can be packed in the carton. We create a new rule and corresponding UDF, but this rule has the CartonID and a quantity associated with it.

The GUI can handle Rule 1 because it knows how to apply the correct data from the GUI to the parameters for the Rule and execute the rule, so LotID from the GUI = LotID in the parameter name in the UDF and CartonID from the GUI = CartonID parameter name in the UDF. Now there is a new rule, the GUI sees this new rule, gets the parameters, but has no way to applying the quantity to the new parameter to execute the rule without having to change the GUI. We don't expect there to be many rule changes, however, when they do occur we don't want to have to recompile the GUI every time. Does anyone have any suggestions on how to create a class that could determine the how to apply set the correct parameters? We have thought about a table in a database that maps the parameter names in the UDF with parameter names in the GUI so when we add a new UDF we update the table with the corresponding data from the GUI. That could work but may get cumbersome and would require us to make sure that, that table is kept current. Another suggestion was to name the parameters in the UDF the same as the parameters in the GUI, but this too, would require us to maintain the names in two locations.

View 5 Replies

Business Rule Engine - GUI To Check For Three Rules ?

Mar 30, 2011

I have a simple business rules engine that I need to write. I have looked at both Biztalk and Windows Workflow, but they are to much for what we need to do. This is a process that material will come to an operation, the GUI will check for three rules, one for the operation, one for the steps in the operation, and one for the item coming into the operation. These are the only three checks that will be done. It is possible there will be more than one rule for each check. I have a simple database set up to contain all the operations, steps and products and there is a crosstab table that links all the rules to each item. Here is an example of some rules (these are actual rules from the process):

View 5 Replies

VS 2010 Read Line By Line And Send To Check List Box

Jul 9, 2011

I have a text file with an unknown number of lines. I want to read this file line by line and send each line's text in a check list box. But how am i gonna do that when i don't know how many lines exist in text the file? [code]The code above reads only the first line. I tried to do it as in vb6 using while not eof(but here i don't know what to write cause my file isn't opened in a certain channel).

View 4 Replies

VS 2010 Check If Richtextbox1 Contains The First Line Of Richtextbox2

Oct 31, 2010

How can I do it? I tried this but it gives me an error.

View 1 Replies

Compare Two Lines - Check Whether The Previous Line Is Equal To Next Line?

Jun 6, 2010

i am using while loop. i need to check whether the previous line is equal to next line ...

Try
Dim r As Integer
r = str.IndexOf("action = LGN; description = Success")--- i need to check next line also same content[code].....

View 1 Replies

Command Line Argument: Check If Correct Command Line Or Exit App?

Jun 6, 2012

I have beginner skills using VB (am using the Express edition to learn). I would like to know how to set up a conditional statement in a Windows Form (WF) app that would check if a specific command line has been passed by another separate app that launchesthe Windows Form app using command lines, and if not passed, then the Windows Form app would shut down (exit, close).So far, I can use:

For Each s As String In My.Application.CommandLineArgs
If s <> "xyz" Then
Me.Close()

[code]....

View 14 Replies

Create New MS Outlook Rule VB

May 5, 2012

I'm trying to write a rule to compensate for laziness caused by program changes. Used to be, case numbers for family law cases where I work were written as follows: 12-DR-012345. Now, you can get away with 12DR12345, and the file management program accepts it.

View 1 Replies

How To Merge Two DataSets On Specified Rule

Apr 13, 2010

I'm trying to merge two datasets based on these rules:
1. With ds1 and ds2, If the Unique Key from ds1 is not found in ds2, copy it to ds2 and move to next row in the table, else, goto the next part
2. If the unique key in ds2 is found in ds1, check the DateLastEdited row.
a. If DateLastEdited in ds2 is greater then in ds1, copy the row from ds2 to ds1, else , do nothing

I'm just having trouble with the loops. Here's what I have:
Dim ds1 As DataSet = fillNetwork() 'this function fills ds1 with the dataset from a table found on a network
Dim ds2 As DataSet = fillLocal() 'this function fills ds1 with the dataset from a table found on local drive
Dim returnRows() As System.Data.DataRow = Nothing
For Each dtDs1 In ds1.Tables
[Code] .....
This bit of code is just trying to segregate the one that are in both tables from the ones that are just in one table.

View 6 Replies

VS 2010 Read Through A Textfile Line By Line Checking For And Removing Duplicate Values?

May 16, 2012

How do i read through a textfile line by line checking for and removing duplicate values?

View 1 Replies

VS 2010 - Draw A Straight Line Between Two Points And Calculate The Length Of That Line?

Jan 3, 2012

I have a picture in my picturebox. In that picture, I need to draw a straight line between two points and calculate the length of that line (probably in pixels). Is there any suggestion how to do it?

View 2 Replies

VS 2010 : RichTextBox Edit Line By Line, Keeping The Formatting?

Jul 7, 2011

I want to loop the lines of my RTB and add a vbTab on each line.How do i do this?

View 1 Replies

VS 2010 Multi Line String - 1 Line = New Entry To Combobox?

Oct 16, 2010

Ok, So I have a string that has its formats like this:

Line 1
Line 2
Line 3

[code].....

View 6 Replies

Applying A Rule Set To Different Lines Of Text?

Apr 27, 2012

The general purpose of my application simply reads a line of text for example:

1. I have a printer issue
2. I have a software issue

I have a rule set as follows:

'Define the class 'Printer' with 14 values as a string...
Dim Printer(13) As String
'The string 'Printer' gets assigned a value, this is repeated another 13 times...
Printer(0) = "Printing"

[code]....

The code simply uses a number of keywords to detect if the issue is a 'printer', 'software', 'telephone',. or 'password' problem.I want to apply this rule set to 10 issues within the same rich text box, with the results sent to a text file. The exporting to a text file I can do, however the main issue is, i cannot read the lines individually.

View 5 Replies

Asp.net - Subdirectory URL Automatic Rewrite Rule?

Apr 25, 2012

I'm using ASP.NET 4 / VB.NET / IIS to build a web application. Folks will access the web application via a URL like so: [URL] So, for example, here is the urls for Jane Doe, John Doe, and James Doe respectively: [URL] I need to somehow pass them off (no matter what name is entered) to a default.aspx page which then pulls in the name portion of the url and uses it to perform a lookup against the database which contains info. about this particular person and displays a personalized page based on that information.

[Code]...

View 1 Replies

VS 2010 : Reading Line By Line From A Text File?

Feb 13, 2012

the following code was to be entered to read each line of the file "line by line" It did not work for me as instructed and I am trying to understand why?

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim FILE_NAME As String = "C:UsersOwnerDocuments est.txt"
Dim objReader As New System.IO.StreamReader(FILE_NAME)
Dim TextLine As String

[code]....

View 9 Replies

VS 2010 Adding New Line & Writing Text On That Line

May 20, 2012

I want to modify a text file. It has a lot of lines of text in it. I want to add a line after a specific line (in the middle on other lines) and write strings there.

The code i have, writes to a specific line but it also overwrites the text on that line:

[Code].....

View 5 Replies

Conceptual / Rule Implementation / String Manipulation

Dec 29, 2011

So I'm working on a software in VB.Net where I need to scrape information and process it according to rules. For example, simple string replace rules like making "Det" into "Detached" for a specific field, or a split/join rule, basic string operations. All my scraping rules are RegEx and I store them in a database in rows of rule sets for different situations.What is the best way behind creating/storing rules to manipulate text? I do not want to hardcode the rules into the software, but rather be able to add more as there will be a need for them. I want to store them in a database, but then how do I interpret them?

View 1 Replies

MVC Data Annotation Validation Rule For Collection?

Dec 2, 2010

Is there a dataannotation validate rule for a collection based property? I have the following
<DisplayName("Category")>
<Range(1, Integer.MaxValue, ErrorMessage:="Please select a category")>
Property CategoryId As Integer
<DisplayName("Technical Services")>
Property TechnicalServices As List(Of Integer)
I'm looking for a validator that I can add to the TechnicalServices property to set a minimum for the collection size.

View 1 Replies

Programmatically Modify Access Rule For Directory?

Oct 25, 2011

I want to programmatically change ACL for all the subdirectories into a containing one. Specially when ACL of a particolar user is found I want to duplicate that ACL, change the security identifier and add the rule.

Look at this code:

cDirectoryInfo = New DirectoryInfo(strPath)
cDirectorySecurity = cDirectoryInfo.GetAccessControl()
cAuthorizationRuleCollection = cDirectorySecurity.GetAccessRules(True, True,

[Code]....

View 5 Replies

Check If There Is More Than One Strings In Each Line?

Jan 8, 2010

I am still working on my project, I use regex method to get the html class string in each line. However can you guess that if it possible to check the full strings whether if one line has more than one strings then get the full strings?[code]...

View 19 Replies

GDI+ Flat File Disposal Rule For Textured Brush?

Dec 8, 2010

I place these 2 questions in this forum simply 'cause those that know GDI+ best are probably .Net vs. VB6 classic users... So here it goes.I'm using GDI+ flat file to generate a textured brush with image attributes. Creating these are no problem, but I can't find documentation that says whether disposing of the brush will dispose the original image & attributes handles I've assigned to the brush or whether I need to destroy those also? I can't locate anything that says whether GDI+ copies the handles or uses the ones I provided. Destroying the handles well before the brush is destroyed does no damage. Thus my assumption is that the handles are copied. But you know what they say about assumptions.

2. Likewise I use a GDI+ function to return the image assigned to a textured brush. Again, I don't know if that returned image handle is to be disposed by me or not. The returned handle changes every time I call the function, so I'm assuming that I should be destroying it. Thanx to all that can shed any light whether from personal experience or pointing me to some black & white documentation.

View 1 Replies

VS 2010 Read A File Line By Line?

Aug 21, 2011

how to read a simple text file line by line like when you're writing to a file with System.IO.StreamWriter where you write to the file line by line.

View 5 Replies

Check Box In Form Only Edits One Line?

May 10, 2011

I have a form that has a checkbox value for field 4. What I'd like a user to do is to be able to check that checkbox and when they fire the holidaysavebutton event, that my code will look for any of the checkboxes that are checked and save that line of data to my database. As the code stands now, I am able to get the first line to do this, but none of the lines after will save the data.

[Code]...

View 5 Replies

Check If A Line Of Code Actually Succeeded?

Dec 28, 2009

I'm making an email sending program and still I don't know how to check if the mail was really sent or not, because sometimes the program will have no error messages but the mail was not actually sent. Is there any other way on how to deal with this except for making use of try catch?Here is my code:

Try
mail.From = New MailAddress(TextBox2.Text)
mail.To.Add(New MailAddress(TextBox1.Text))

[code].....

View 3 Replies

Check If Line In Richtextbox Contains Numbers?

Sep 14, 2010

I have a list of strings in my richtextbox. I need a code to check if there are numbers in the first line, if there is then proceed with the rest of my code, else delete first line.

View 2 Replies

Check If The First Line In A Richtextbox Contains Numbers Or Not?

Sep 19, 2010

I need some kind of code to check if the first line in a richtextbox contains numbers or not.

Something like this:

If Richtextbot1.Lines(0) contains Numbers Then
Goto startbot
Else

[Code].....

If the first line contains 4 or more numbers, it will use it. After each loop it will delete line 1. So it repeats for the next line. When my code reaches the 3rd line, and it doesnt find 4 or more numbers it needs to delete the line.

View 2 Replies

VS 2008 Check For A Certain Line In A Textbox?

Apr 12, 2009

So I have a keylogger so everything I type shows up n the textbox I want to make it so if I type a certain word like a kind of password my application closes

View 3 Replies

Enforce Validation Rule In Create Table Statement For A Coloumn

Dec 15, 2011

I want to enforce validation rule in create table statement for a coloumn. im using vb.net as front end and access as back end.

View 2 Replies

Import Or Create An Outlook 2003 Rule (.rwz) With VSTO 2005?

Jul 29, 2009

I would like to automatically create an Outlook rule (move email containing something in subject to folder xyz) but dont know how to achieve this. Of course I can create the rule and export it to a .rwz file. This file can be imported manually, but how can I import it automatically?

Can I import a rule through my VSTO 2005 Outlook (2003) Addin? Or can I create the rule from within this addin?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved