|
hi everybody,
I hope you can help me.
I have a small 3 layer solution. It works but now I want update my DAL using patterns.
I will use data application block from enterprise library 3.1. It's my first time using patterns and I don't know how start.
My questions are:
Must I use the code from quickstart?
What section of code?
What is the best way to personalize the code to my DAL?
A small example will be excellent.
Thanks in advance
Si crees que estás vencido, vencido estás.
|
|
|
|
|
jesusnaun wrote: I will use data application block from enterprise library 3.1.
Why?
The reason I'm asking is that I feel that many people use the Enterprise Library without really knowing why. They seem to think it is a good idea, but when you ask them the answer doesn't necessarily add up. Sometimes a lightweight DAL is enough. So far, I've come to the conclusion that the Enterprise Library is, for many projects, just bloatware.
jesusnaun wrote: It's my first time using patterns and I don't know how start.
I'll bet it isn't. The way you have said that tells me that you don't quite know what patterns are... Yet.
I found when I first read a book on patterns many years ago that I'd actually been using many without realising. And I'll bet that you have been using many patterns as well without realising.
-- Always write code as if the maintenance programmer were an axe murderer who knows where you live.
Upcoming FREE developer events:
* Glasgow: Agile in the Enterprise Vs. ISVs, Mock Objects, SQL Server CLR Integration, Reporting Services, db4o ...
* Reading: SQL Bits
My website
|
|
|
|
|
Thanks for advice.
you are right but I believe that code from enterpise library could be personalized, so, Only I will use code's section. Not all.
My DAL works but If now I need improvements and aditional funcionalities, I must build another DAL.
Data Acces Appilcation, I believe, will show me code useful for future necessities.
Do u have any example showing how enterprise library works wiht DAL.
Thanks...
Si piensas que estás vencido, vencido estás.
|
|
|
|
|
Colin Angus Mackay wrote: The reason I'm asking is that I feel that many people use the Enterprise Library without really knowing why. They seem to think it is a good idea, but when you ask them the answer doesn't necessarily add up.
Yep. So many projects I've worked on and the only part of the entire enterprise library that has been used is ".ExecuteDataSet()". Makes me laugh every time.
|
|
|
|
|
Mark Churchill wrote: So many projects I've worked on and the only part of the entire enterprise library that has been used is ".ExecuteDataSet()".
So you've seen my company's DAL?
Actually, we're not that bad - but I don't think we use the EL very well at all.
-- Always write code as if the maintenance programmer were an axe murderer who knows where you live.
Upcoming FREE developer events:
* Glasgow: Agile in the Enterprise Vs. ISVs, Mock Objects, SQL Server CLR Integration, Reporting Services, db4o ...
* Reading: SQL Bits
My website
|
|
|
|
|
Say I wanted to use CSS to change the background color of every page in my Web Browser control to blue (I know you can do this by setting the documents back color property, but that won't work with every stylesheet) and all the links' colors to green. How should I go about doing this?
I found two solutions on MSDN - one looked overly complicated and the other just didn't work. And they were both in C# .
My best guess was:
Private Sub wbBrowser_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles wbBrowser.DocumentCompleted
With wbBrowser.Document
Dim elmCSS As System.Windows.Forms.HtmlElement = .CreateElement("style")
elmCSS.InnerText = _
"body {background-color: blue;}" & vbNewLine & _
"a:link {color: green;}" & vbNewLine
.GetElementsByTagName("head").Item(0).AppendChild(x)
End With
End Sub
or
Dim elmCSS As System.Windows.Forms.HtmlElement = .CreateElement("link")
elmCSS.SetAttribute("rel", "stylesheet")
elmCSS.SetAttribute("href", "Styles.css")
.GetElementsByTagName("head").Item(0).AppendChild(elmCSS)
Thanks in advance for any help.
-- modified at 9:12 Friday 24th August, 2007
-- modified at 7:24 Saturday 25th August, 2007
|
|
|
|
|
This question belongs in the ASP.NET forum because it has nothing to do with VB.NET.
|
|
|
|
|
Sorry if I posted it in the wrong forum - but this has nothing to do with ASP.NET (though maybe the Winform forum).
Anyways I found the answer:
The problem was I was using a relative path to point to the same folder as my app, when the CSS file wasn't there.
|
|
|
|
|
Hi,
I need to develop a custom Find Function for a page displayed in a webbrowser control. I cannot use the default IE one as we dont want to display the microsoft interface. I have tried the following method, but with problems:
wBrowser.Document.Body.InnerHtml = Replace(wBrowser.Document.Body.InnerHtml, wordToFind, "" + wordToFind + " ", , 1)
The problem is that it finds and replaces the word whereever it appears, even if its in an image's alt tag. I just want to highlight the text. Is there any way of doing this?
Thanks,
Ahmad
|
|
|
|
|
I think you want to use InnerText instead of InnerHtml
|
|
|
|
|
Anybody working in reports????
Facing problem with multiple subrepotrs in single main report.
Hi,
Can anybody help me how to use two sub reports in single main report?
I am using two sub reports in my main report.
From main reprot one parameter is passed to each sub report.
In Reportviewer1_SubreportProcessing event I am adding the datasource after checking the reportpath(From the event args.)
But I am getting the Subreport could not be shown as error message...
Hope you are getting my scenario...
-Saran
-- modified at 3:15 Tuesday 28th August, 2007
|
|
|
|
|
Hello!
I have a panel (Panel1) on a form (Form1) and i want that on every click on panel a new control should be added to panel. But it dont work! Any Help?
Public Class Form1
Dim counter As Integer
Public Class JOJOBA
Inherits System.Windows.Forms.Control
Dim myControl As Control
Public Sub New()
myControl = New RichTextBox
End Sub
End Class
Private Sub panel1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Panel1.Click
counter = counter + 1
Dim aNC As Control
aNC = New JOJOBA
aNC.Name = "Control" & counter
aNC.Top = Panel1.Top + 20
aNC.Left = Panel1.Left + 20
aNC.Height = 30
aNC.Width = 150
Panel1.Controls.Add(aNC)
aNC.Visible = True
aNC.Show()
End Sub
End Class
colgateas900197
|
|
|
|
|
The code to add the control to the panel works. It's the control you're adding that's all screwed up.
You created a custom control that contains another control, a RTB. The problem is that your custom control doesn't paint any kind of visible interface, so you don't see anything.
What are you expecting this custom control to do??
|
|
|
|
|
Whole scnario is:
A form has a panel. As many times i click on the panel a new control (an RTF Textbox) should be added to the panel at the point where i have clicked. All text boxes added to the panel should have the capability that when i select a textbox i can drag it on the panel.
In order to drag controls i think, i should have event handlers for each textbox.
If you please guide me how can i acheive this? Please give me a basic program structure and some instructions to do so....
Thanks in advance!
colgateas900197
|
|
|
|
|
First, you're code doesn't add a RichTextBox to the panel. It's adding a custom control that doesn't show anything. Just because inside your control you instantiate a RTB doesn't make it visible automatically.
Your control inherits from Control. Don't. Inherit from RichTextBox instead.
Public Class MyRTB
Inherits RichTextBox
You might want to read my article on creating your own runtime-movable controls here[^]. Though, I've never done it with a RichTextBox. You could end up with some goofy side-effects.
|
|
|
|
|
Dear Rupesh Kumar Swami
Thanks for help
But I face an error like :
Microsoft.WindowsMobile.Utilities.Registry from assembly Microsoft.WindowsMobile.Utilities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35.
this above error in line
AddHandler callState.Changed, AddressOf callState_changed
|
|
|
|
|
Nimesh U wrote: Microsoft.WindowsMobile.Utilities.Registry from assembly Microsoft.WindowsMobile.Utilities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35
That's not an error. It's the fully qualified name of an assembly.
What's the error message?
|
|
|
|
|
hi nimesh,
do not add one more new message for continue the previous message. select reply from previous message.
by the way,are u add following reference in your application ?
if No then add this reference
Microsoft.Windowsmobile<br />
Microsoft.Windowsmobile.status<br />
Microsoft.Windowsmobile.Telephony
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Hi all,
Does anybody know how to merge cells in DataGridView like in FlexGrid in
VB6?
There was an method MergeCol and MergeRow.
I am using DataGridView with an DataSet, exactly for this reason, because
I need one row with 3 cols, and the next one with only one col.
Something like this
------------------------------------------------------
¦ some data ¦ some data ¦ some data ¦
------------------------------------------------------
¦ Some other data should be here ¦
------------------------------------------------------
¦ some data ¦ some data ¦ some data ¦
------------------------------------------------------
¦ Some other data should be here ¦
------------------------------------------------------
¦ some data ¦ some data ¦ some data ¦
------------------------------------------------------
¦ Some other data should be here ¦
------------------------------------------------------
Thanx in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
Exelioindia wrote: Does anybody know how to merge cells in DataGridView
Not supported. You'd have to create your own version of the DGV to do this, supplying the property, drawing, and edit code to render the rows cells and still have them be editable. This will be a LOT of work to pull off.
Merging cells in DataGridView[^]
|
|
|
|
|
i am having my project in vb6.0,i have binded my controls at design time with Maindata(RecordSet).
Now i am binding DataCombo control at runtime(with new RECORDSET),when i am writing this code i am getting error in other events when my maindata(recordset)is getting updated.error is "Operation was cancelled" wt clould be the reason???????
This is the code,
Set PartyData = New ADODB.Recordset
PartyData.CursorLocation = adUseClient
If PartyData.state = adStateOpen Then PartyData.Close
PartyData.Open "select StkSuppliersMaster.name from StkSuppliersMaster join purinqparty on StkSuppliersMaster.code=purinqparty.suppliercode where purinqparty.mastid=(select id from purinqmaster where inqno=" & txtInqNo.Text & ")", db, adOpenStatic, adLockPessimistic
Set dbcParty.RowSource = PartyData
above code works fine if i write,
PartyData.Open "SELECT * FROM StkSuppliersMaster order by Name", db, adOpenStatic, adLockPessimistic
GIRISH
|
|
|
|
|
try adLockOptimistic.... May be then it works
colgateas900197
|
|
|
|
|
thanks for ur reply i will try and let u know.
|
|
|
|
|
inqno=" & txtInqNo.Text & ")",
You didn't include the character identifiers ( ' ).
Try:
inqno='" & txtInqNo.Text & "')",
Tom Garth
Developer
R. L. Nelson and Associates, Inc., Virginia
|
|
|
|
|
Hi guys!
I'm using MS Visual Basic 2005 Express Edition and I want to add a self made cursor to one of my projects. There are already some cursors to choose but there is no option where I can use my own one.
Do you know any way to use a selfmade one (I'm using "IcoFX" and "Pixel Toolbox").
Thanks and best wishes
|
|
|
|