473,788 Members | 2,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Check whether my Process flow is correct or not

90 New Member
I did a small sample with three tier architecture and i need to know whether the flow of the program is correct or not.The pgm works fine.

Inside web.config
Expand|Select|Wrap|Line Numbers
  1. <configuration>   <appSettings>     <add key="Connection" value="server=.;trusted_connection=true;initial catalog=sanjay"/>   </appSettings></configuration>
Inside Data Access Layer
Expand|Select|Wrap|Line Numbers
  1.  private string username; 
  2.  private string password;
  3.  public string UserName   
  4.   {  
  5.   get { return username; }  
  6.  set { username = value; }  
  7.   }  
  8.  public string PassWord 
  9.   {
  10.  get { return password; }     
  11. set { password = value; }  
  12.   }   
  13.   public int checking(string username,string password)  
  14.    {        
  15.  int temp = 0; 
  16.  SqlDataReader dr;    
  17.  string con = ConfigurationManager.AppSettings["Connection"].ToString();         SqlConnection connection = new SqlConnection(con);         connection.Open();
  18.   SqlCommand cmd = new SqlCommand("select * from pass where username='" + username + "' ", connection); 
  19.   dr = cmd.ExecuteReader(); 
  20.  while (dr.Read())  
  21.   {    
  22.  string a = dr.GetValue(0).ToString();
  23.  string b = dr.GetValue(1).ToString();   
  24.  if ((a.Equals(username)) && (b.Equals(password)))   
  25.         {
  26.             temp= 1;       
  27.         }    
  28. else      
  29.        {    
  30.             temp= 0;   
  31.          } 
  32.   }    
  33.   return temp;    
  34.  dr.Close();       
  35.  connection.Close();   
  36.   }
  37.  
Inside Business access layer

Expand|Select|Wrap|Line Numbers
  1.  public int checking(string username,string password)
  2.     {
  3.         Dal d = new Dal();
  4.         return d.checking(username,password);
  5.     }
Inside Presentation layer


Expand|Select|Wrap|Line Numbers
  1. protected void Button1_Click(object sender, EventArgs e)
  2.     {
  3.         string uname = TextBox1.Text;
  4.         string pwd = TextBox2.Text;
  5.  
  6.         if (Convert.ToBoolean(b.checking(uname,pwd)))
  7.         {
  8.             Button1.Text = "valid";
  9.         }
  10.         else
  11.         {
  12.             Button1.Text = "Invalid";
  13.         }
  14.  
  15.     }
I need to know whether my program flow is correct or is there any modifications need to be done.

Thanks

Regards
Raghul
Sep 8 '08 #1
3 1344
Frinavale
9,735 Recognized Expert Moderator Expert
If your program works properly then why would the flow be incorrect?

In order for your program to work properly, some steps need to be taken before other steps can be executed...if you've tested your application and have determined it to be correct then why is your process flow in question?

If you really want to check things I suggest using the Debugger tool that comes with Visual Studio to step through your application as it's running and confirm that the flow is correct.

-Frinny
Sep 8 '08 #2
raghulvarma
90 New Member
Sir,

I need to know whether the people working in the CMM level 5 Companies use the same type as I did or do they follow some other guidelines in order to complete their task.
ie for example in my sample i got the username and password and i checked that in the same data access layer and then returned only the int value (0 or 1)
to the business access layer, but I need to know whether the people working in CMM level companies get those values (username and password) as parameters and send those via parameters to business layer and do the checking there and then from there return a Boolean value to presentation layer.

Thanks,

Raghul

If your program works properly then why would the flow be incorrect?

In order for your program to work properly, some steps need to be taken before other steps can be executed...if you've tested your application and have determined it to be correct then why is your process flow in question?

If you really want to check things I suggest using the Debugger tool that comes with Visual Studio to step through your application as it's running and confirm that the flow is correct.

-Frinny
Sep 10 '08 #3
Frinavale
9,735 Recognized Expert Moderator Expert
Sir,

I need to know whether the people working in the CMM level 5 Companies use the same type as I did or do they follow some other guidelines in order to complete their task.
ie for example in my sample i got the username and password and i checked that in the same data access layer and then returned only the int value (0 or 1)
to the business access layer, but I need to know whether the people working in CMM level companies get those values (username and password) as parameters and send those via parameters to business layer and do the checking there and then from there return a Boolean value to presentation layer.

Thanks,

Raghul
I know very little about the Capability Maturity Model (CMM) that you mentioned above, but from what I understand it is a Guideline to aid in the definition/understanding of an organization's processes. There are many different ways to implement a solution for a problem, the CMM guidelines help you to develop applications that are well defined, easy to understand, reliable and maintainable.

The approach that you have taken here is one that I have taken myself on many occasion but it doesn't mean that the solution is best suited for your business logic.

It is your responsibility to analyze your application and decide if it is best suited for your needs. The Capability Maturity Model is a tool to aid you in this process and I urge you to use it to create your own well defined structure for your application.

You may want to take the time to look into existing patterns and practices to help you solve your problem...but those too are just guidelines.

-Frinny
Sep 10 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1552
by: Praasd | last post by:
Hi I have a problem in understanding how to implement a process created in visio through code. For example I have a diagram in visio which is defining a process, lets assume some decision boxes i.e it's just like a flow chart. I have to write a program in c# which takes this file as input and follow the flow chart instructions based on the user inputs. Are there any such samples or links that can guide me, whixh can understand the flow chart...
1
2778
by: kiran | last post by:
How to check whether the given application is running or not in the current machine. From, my cshartp program I want check whether the yahoo messenger process is running ro not..? if the process is running i want to open the yahoo messenger application through my csharp program.. I tried using Win32 API "ShowWindow" function , but it is not opening or showing hidden applications. How can I do this..?
4
4275
by: Jiho Han | last post by:
What is the best way to check whether the page is simply a postback or the form has been submit with the intention of doing something? In the olden days, I used to check for a form field name used for the submit button: <input type="submit" name="saverecord" value="push me to save"> Then I'd retrieve it using something like:
4
1200
by: Maxim Fridental | last post by:
It is well advertised .NET allows separate developing of web pages by a web designer and a web programmer. Where could I find recommendations from Microsoft about the corresponding development process or tools that really enable such parallel development? I would also like to read some real world experiences. We have particularly the following problems: 1. Our web designer can't use Visual Studio, so a) all HTML code must be copied...
1
1115
by: D-Someone | last post by:
I am re-posting this message as originially it did not get a single response.. Any ideas? -------------- I am trying to come up with a good design for a web service that has some user logic and business processes involved. Here a small sample of the process flow: --- Client Get's User Input for field 1...
9
7836
by: Michael.Suarez | last post by:
Suppose I have a program that prompts you with a dialogbox to enter a password. If you get the password correct, it allows you into the program, else it kills the program. Suppose that when I am in Visual Studio, running the program in debug mode, i want to bypass the password prompt because if i am the developer, i am definately allowed to use the program. I assumed that I could use the this.DesignMode property while in my main...
13
5128
by: bayer.justin | last post by:
Hi, I am trying to communicate with a subprocess via the subprocess module. Consider the following example: <subprocess.Popen object at 0x729f0> Here hey is immediately print to stdout of my interpreter, I did not type in the "hey". But I want to read from the output into a string, so I do
6
34655
by: Ros | last post by:
There are 10 files in the folder. I wish to process all the files one by one. But if the files are open or some processing is going on them then I do not want to disturb that process. In that case I would ignore processing that particular file and move to next file. How can I check whether the file is open or not? I tried os.stat and os.access but I am not getting the expected results. Also I checked in IO exceptions, IO error handler...
173
8186
by: Marty James | last post by:
Howdy, I was reflecting recently on malloc. Obviously, for tiny allocations like 20 bytes to strcpy a filename or something, there's no point putting in a check on the return value of malloc. OTOH, if you're allocating a gigabyte for a large array, this might fail, so you should definitely check for a NULL return.
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10118
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8995
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.