|
Julen wrote: I use the tree tier model
It's "three-tier", as in the number 3, not "tree tier".
modified on Sunday, June 21, 2009 11:48 PM
|
|
|
|
|
Dave Kreskowiak wrote: It's "three-tier", as in the number 3, not "tree tier".
Sorry for the spelling.
I don't dislike creating a separate DLL to come to a common ground between layers. So, if I have three tier architecture; will I have 5 DLL? Three for the layers themself; and two for the common grounds?
Presentation layer -- Common ground 1 -- Bussiness layer -- Common ground 2 -- Data Layer
Could recommend me an article, reference, matter on this issue?
Thanks!
|
|
|
|
|
Create a Common library for Data Transfer objects and share it among all layers.
So this would be
(Data Transfer Objects)   (Data Transfer Objects)
Data Layer -----------------------> Business Layer ------------------------> UI Layer
|
|
|
|
|
Shukla Rahul wrote: Create a Common library for Data Transfer objects and share it among all layers.
So this would be
(Data Transfer Objects) (Data Transfer Objects)
Data Layer -----------------------> Business Layer ------------------------> UI Layer
To create those Data Transfer Objects, is there a pattern or standard design to create them? Also, regarding the picture; do you mean with the arrows that the data access layer has a reference to business layer instead of reverse?
Thanks!
|
|
|
|
|
You can create a project class library project which holds such classes. Provide the reference of this project in all layers.
Sorry, the arrow shows the flow of the data objects not the reference.
Reference would be as follows
Data Access Layer - Ref of common
Business Layer - Ref of Data Access Layer and Ref of Common
UI - Ref of Business Layer & ref of Common
Download sample project from here.
-Rahul Shukla
|
|
|
|
|
This sounds like a serious case of entanglement. Why should Point know about MyDatabase and why should MyDatabase know about Point? What you might want to look at instead, is using interfaces to control the way things interact, and then code against the interface.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Using VB.net...
I've got an owner drawn toolstrip combobox that displays my system fonts. Each item in the drop down list is in its respective font. Works okay, but the top of the combo where the selection is displayed also uses whatever font is selected. How do I get the combobox to use its default font at the top and still have the drop down list display multiple fonts?
Also, the "Cambria Math" font in Vista displays as being about three lines tall, with tiny text in the middle of the line. That's in my text editor, OO.org and MS Works. A friend tried it in Word and it just produced onscreen gibberish. Anyone else encounter this with Cambria Math?
AB
|
|
|
|
|
every time i run the program an i press the send button i get an error " Exception from HRESULT "
Public Class Form1
Dim SendMessage As String
Dim GetMessage As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Winsock1.LocalPort = 139
Winsock1.Listen()
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
Winsock1.Close()
Winsock1.Accept(requestID)
End Sub
Private Sub Winsock1_DataArrival(ByVal sender As Long)
Winsock1.GetData(GetMessage)
txtMessage.Text = txtMessage.Text & GetMessage
End Sub
Private Sub btnSendMessage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSendMessage.Click
SendMessage = txtSendMessage.Text
Winsock1.SendData("server" & SendMessage)
End Sub
End Class
|
|
|
|
|
I'm on a project with several components (projects) which are deployed on multiple servers. Several components have their own web.config or app.config files with logging configuration settings, all flat file loggers. Some have config files with no logging configuration. Since all the trace listeners point to the same file, everything manages to get to the destination. This will change. I need to understand how the ELLB deals with multiple configuration files.
|
|
|
|
|
Taliesin99 wrote: This will change.
What will change?
Taliesin99 wrote: I need to understand how the ELLB deals with multiple configuration files.
Does it? I thought each application supplies it's own configuration?
|
|
|
|
|
Sorry for my lack of clarity.
There are several projects withing this solution. Many of them provide their own app.config or web.config files. At the moment, each of the categories in all of configuration files ultimately point to the same flat file, trace.log. So all the entries are written to the same file, at least the same file on a particular server. As requirements are changing, different projects need to point to files named something other than trace.log. There will be multiple log files in use. Also, there will be situations where different projects will still need to write to the same log file. Right now, that means managing multiple configuration files, which I would like to avoid if possible.
There are also projects in the solution which make calls to logger.write, but have no config file defined within that project. All the projects have a reference to what I assume are the same binaries for the Application Logging Block (we are not extending that code in any way). The logging in these projects appears to be working, so my assumption is that they are finding the categories defined in some other project and making to the log file. This may be an incorrect assumption on my part.
I guess what I am really looking for is a way to manage the logging across multiple projects (assemblies) within the same solution using as few configuration files as possible, ideally one. This may not be possible. But I have not yet found any documentation that discusses this situation.
|
|
|
|
|
Taliesin99 wrote: I guess what I am really looking for is a way to manage the logging across multiple projects (assemblies) within the same solution using as few configuration files as possible, ideally one.
I’m not an expert on the logging block but it wouldn’t seem likely that any sort of organization like you describe is part of it. There would be far too many variables to account for in a generalized library. If you want some sort of central management of logging configuration across your suite of applications you will probably have to develop that yourself.
I don’t have your complete requirements (and I don’t want them), however one thing you might consider is that a build system could potentially allow you to develop a centralized configuration that will automate the distribution of information into the project files. I’m pretty sure you could use ANT to accomplish that so I imagine MS Build might work as well.
|
|
|
|
|
How do I go about using filtering on the built in trace listeners, such as System.Diagnostics.DefaultTraceListener and System.Diagnostics.TextWriterTraceListener ?
I don't want to have to override write methods and explicitly check the filtering, but I can find no way to attach a level to trace information?
|
|
|
|
|
I'm trying to save a unicode utf8 string --> "سلام" in a feature of a featureclass, but it is saved like "????".as ArcMap support different encodin and also Farsi that I'm working with, It should be possible through my program.but I didn't find any way yet.anybody knows about this?
<br />
<br />
feature = fc.CreateFeature();<br />
feature.Shape = point;<br />
feature.set_Value(feature.Fields.FindField("Name"), o.Name);<br />
feature.Store();<br />
fc is an IFeatureClass, feature is an IFeature and o.Name is a unicode.utf8 string.in watch window:
feature.get_value(feature.Fields.FindField("Name"))--> is OK
but
fc.GetFeature(1).Get_Value(feature.Fields.FindField("Name")) --> is "????"
and this is what is saved. What should I do?
|
|
|
|
|
Cross posting[^] is considered rude.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
i dont know
poda fool
|
|
|
|
|
hi,
This code will export the datalist into Excel with exact text,position and style in asp.net.
Please include System.IO at the top of the file.
string filename = "BacklogData.xls";
Response.Cache.SetExpires(DateTime.Now.AddSeconds(1));
Response.ContentType = "application/vnd.ms-excel";
Response.ContentEncoding = Encoding.Unicode;
Response.BinaryWrite(Encoding.Unicode.GetPreamble());
Response.Charset = "";
this.EnableViewState = false;
Response.Write("<html xmlns:x=\"urn:schemas-microsoft-com:office:excel\">");
Response.Write("\r\n");
Response.Write("<style> .text " + "\r\n" + " {mso-style-parent:style0;mso-number-format:\""+@"\@"+"\""+";} " + "\r\n" + "</style>");
StringWriter tw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(tw);
DataList.RenderControl(hw);
Response.AppendHeader("content-disposition","attachment;filename="+filename);
Response.Write(tw.ToString());
Response.End();
Happy Coding !!!!
Regards
Arun Kumar
H
|
|
|
|
|
this will not work it will give you error like while working with master page
'ctl00_CntFormContents_DataList1_ctl01_gvTopFiveMasterIntroducer' of type 'GridView' must be placed inside a form tag with runat=server'
any suggetion
|
|
|
|
|
Thank you so much. Your code help me. Wish you happy for whole your life.
|
|
|
|
|
Hi,
I have a windows (System.Windows.Window) that shows a question for the user. This window is not opened by the GUI thread. I want this window to always be on top, how can I do this?
Regards
Marc
|
|
|
|
|
Hi,
have you tried Form.TopMost ?
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
|
Hello there!
My code is highlighted below.I have five tabpages(two is shown here!) on a form called vwpatient that runs each time a tabpage is selected.The code below works but my problem is this: there is a textbox called sachPatient.patID from another form called sachPatient, the code pulls data from the database on clicking one or two pages, but if more than two is clicked, an exception fires saying "Make sure you have not released a resource before attempting to use it". I have tried endlessly to fix this problem to no avail. And am still trying!!.
I would appreciate if someone can help me.
Thanks in advance!!!
Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
For Each tabcont As Control In Me.Controls
If TypeOf tabcont Is TabControl Then
For Each tp As Control In tabcont.Controls
If TypeOf tp Is TabPage Then
Select Case tp.Name
Case "vwProfTabPg"
Try
LoadData()
' Configure and execute the command.
cmd = New System.Data.SqlClient.SqlCommand("SELECT * FROM Patient_profile where patient_Id = @Pat_ID")
cmd.Connection = cn
Dim paraPatId As SqlParameter = cmd.Parameters.Add("@Pat_ID", sachPatient.patID.Text)
' Load the DataTable.
datadapt = New System.Data.SqlClient.SqlDataAdapter(cmd)
datadapt.Fill(ds)
ds.Tables.Add(dt)
' Bind the DataGrid.
vwProfDG.DataSource = ds.Tables(0)
vwProfDG.Visible = True
Catch ex As SqlException
MsgBox(ex.Message.ToString())
Finally
cn.Close()
End Try
Case "vwLabTabPg"
Try
LoadData()
' Configure and execute the command.
cmd = New System.Data.SqlClient.SqlCommand("SELECT * FROM lab where patient_Id = @PatLa_ID")
cmd.Connection = cn
Dim paraPatId As SqlParameter = cmd.Parameters.Add("@PatLa_ID", sachPatient.patID.Text)
' Load the DataTable.
datadapt = New System.Data.SqlClient.SqlDataAdapter(cmd)
datadapt.Fill(ds)
ds.Tables.Add(dt)
' Bind the DataGrid.
vwLabDatGrid.DataSource = ds.Tables(0)
vwLabDatGrid.Visible = True
Catch ex As SqlException
MsgBox(ex.Message.ToString())
Finally
cn.Close()
End Try
End Select
End If
Next
End If
Next
|
|
|
|
|
First of all, you can replace the loop through the TabPages at the start with a simple TabControl1.SelectedTab.Name and do a Select Case on that. Second, please post your code in <pre> tags. Lastly, which line does the error occur on?
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Thanks a lot Computafreak for ur help.
Here is still the problem:
My code is highlighted below.I have five tabpages(two is shown here!) on a form called vwpatient that runs each time a tabpage is selected.The code below works but my problem is this: there is a textbox called sachPatient.patID from another form called sachPatient, the code pulls data from the database on clicking one or two pages, but if more than two is clicked, an exception fires saying "Make sure you have not released a resource before attempting to use it". I have tried endlessly to fix this problem to no avail. And am still trying!!.
I would appreciate if someone can help me.
Thanks in advance!!!
Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
Select Case tabControl1.SelectedIndex
Case 0
Try
LoadData()
' Configure and execute the command.
cmd = New System.Data.SqlClient.SqlCommand("SELECT * FROM Patient_profile where patient_Id = @Pat_ID")
cmd.Connection = cn
Dim paraPatId As SqlParameter = cmd.Parameters.Add("@Pat_ID", sachPatient.patID.Text)
' Load the DataTable.
datadapt = New System.Data.SqlClient.SqlDataAdapter(cmd)
datadapt.Fill(ds)
ds.Tables.Add(dt)
' Bind the DataGrid.
vwProfDG.DataSource = ds.Tables(0)
vwProfDG.Visible = True
Catch ex As SqlException
MsgBox(ex.Message.ToString())
Finally
cn.Close()
End Try
Case 1
Try
LoadData()
' Configure and execute the command.
cmd = New System.Data.SqlClient.SqlCommand("SELECT * FROM lab where patient_Id = @PatLa_ID")
cmd.Connection = cn
Dim paraPatId As SqlParameter = cmd.Parameters.Add("@PatLa_ID", sachPatient.patID.Text)
' Load the DataTable.
datadapt = New System.Data.SqlClient.SqlDataAdapter(cmd)
datadapt.Fill(ds)
ds.Tables.Add(dt)
' Bind the DataGrid.
vwLabDatGrid.DataSource = ds.Tables(0)
vwLabDatGrid.Visible = True
Catch ex As SqlException
MsgBox(ex.Message.ToString())
Finally
cn.Close()
End Try
End Select
|
|
|
|