|
Try this: string.IsNullOrEmpty(datagridview.rows[i].cells[j].value as string);
|
|
|
|
|
You can use this rather
datagridview.rows[i].cells[j].Text
Paras Kaneriya
|
|
|
|
|
I need to perform an action if I drag to an area outside of the control being dragged from. Namely an error message and a return. I can't figure out how to do this.. help! pleeeeze and thank you 
|
|
|
|
|
You could Capture the mouse using theControl.Capture = true. This way, I believe you'll get drag and drop events even if your mouse is outside of the control.
I'm not certain it will actually work, however. Might be worth looking into.
Outside of crazy capture the mouse schemes, I don't know that this can be done within the confines of the .NET framework.
|
|
|
|
|
when the connection is successfully connected (means if only the user logged into the sql server)need to show the message "successfully logged on".
not just the connection opened before the server validate the user.
could any one help me with this..
|
|
|
|
|
MessageBox.Show("Successfully logged on");
|
|
|
|
|
You won't get an open connection if the user (info) is invalid. Or are you seeing something else?
|
|
|
|
|
Our organization is currently developing an SDLC process for managing development projects. Would anyone be willing to share what your organization is currently doing?
What we are looking for is when our development department is approached with a project, we want to first deliver to the requestor an SDLC type statement of work where everything is outlined and the proceedure that we will follow.
Before going throught the hassle of creating ours from cradle to grave I was hoping to see what others have already created?
Thanks in Advance
|
|
|
|
|
fuziononline wrote: Before going throught the hassle of creating ours from cradle to grave I was hoping to see what others have already created?
So your hoping to see our C# implementations of SDLC?
|
|
|
|
|
More specifically I work in a application design department that designs in c#. They have just now decide to provide application development and are now in the process of defining the process that we will use to develop.
I'm tasked with coming up with the SDLC and also the way to document it (i.e. paperwork, statement of work, contract) that we give to the deparment that is requesting development.
|
|
|
|
|
fuziononline wrote: I work in a application design department that designs in c#
Not sure how to respond to that. See if this helps:
Implementation (or coding) Reducing a design to code may be the most obvious part of the software engineering job, but it is not necessarily the largest portion.
link[^]
also SDLC[^]
|
|
|
|
|
There are a lot of different lifecycle models to choose from and each one has pros and cons.
Do you currently have any level of process in place that governs how software projects are run? It doesn't have to be something formally documented. If so, try to pick a model that resembles that process as close as possible and then refine the model from there.
The main thing is that no model is perfect and no model will completely fit your business without modification (to either the business, the model, or both).
In general, the documentation steps that should be followed are:
- Define the business requirements (high level, business-oriented requirements). This is what the software needs to do, problems it needs to solve, etc. in order for it to be competitive in the market.
- Define the technical requirements for each business requirement. The technical requirements define how the business requirement will be met by the software. Each business requirement can map to one or more technical requirement, but generally one technical requirement should map to one business requirement. This also should cover any integration points to other systems that might be needed.
- (Optional)Define a lower-level set of technical requirements that map to a single higher-level technical requirements. Again, one high-level technical requirement could have multiple lower-level technical requirements.
The developers would work from one of the technical requirement docs. The QA group would base their test plans on the buisness requirements, and the test plans should be written at the same time as the business requirements.
As for actual development cycles, there are many different models and you should choose the one that works the best for you. I have found that the best approach is using short cycles (3-4 weeks each). Each cycle has a clearly defined set of goals and requirements that need to be met. At the end of the cycle, everything is reviewed and things that didn't get completed become part of the next cycle. This allows the business stakeholders to see progress and everyone to evaluate that progress against the business needs early enough where changes and/or rework aren't as painful. (They will always be painful, but it's much easier to loose a few weeks worth of work than a few months.)
The bottom line is that you need to evaluate all of the different models and make the best choice you can. Then figure out what pieces of the model and/or business need to be modified or adapted to work for you. It may be a trial-and-error process until you get things right, but as long as you're not constantly changing tactics every few days (or even few weeks) it shouldn't be a problem.
The key to a process is that you want to build something that allows for consistent repeatability.
Another thing to consider is that SDLC processes should also include things like how QA testing is performed, how builds are performed (automated builds are the best), and how the software is released.
|
|
|
|
|
in my application i use sql server login and i want to verify whether the connection successfully built.to do this as one of you freinds said i tried connection.state, now i get the response but not the correct one,even wrong username/password it gives successfully logged.(means always dd.getconstate give open)
i created a DBconnection class
class DbConnection
{
private SqlConnection SQLCON;
private SqlCommand sqlcommand;
SqlDataReader sqldreader;
private ConnectionState gg = new ConnectionState() ;
public void openConnection(string usr, string pwd)
{
SQLCON = new SqlConnection();
sqlcommand = new SqlCommand();
SQLCON.ConnectionString = "user id =" + usr + "password="
+ pwd+ "encrypt=true;" + ";integrated security = true;" + "
initial catalog = my;" + " data source =buddhika\\SQLEXPRESS";
SQLCON.Open();
sqlcommand.Connection = SQLCON;
gg = SQLCON.State;
}
public ConnectionState getconstate
{
get { return this.gg ; }
}
}
when the logon button click
try
{
dd.openConnection(textBox1.Text, textBox2.Text);
dd.getCommand().CommandText = "insert into my.dbo.loggedin
values(getdate(),'" + service_no + "',getdate())";
if (dd.getconstate==ConnectionState.Open)
{
MessageBox.Show("login sucessfully");
dd.executeConn();
dd.closeReader();
}
else
{
MessageBox.Show("failed log");
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
|
|
|
|
|
prasadbuddhika wrote: SQLCON.ConnectionString = "user id =" + usr + "password="
+ pwd+ "encrypt=true;" + ";integrated security = true;" + "
initial catalog = my;" + " data source =buddhika\\SQLEXPRESS";
So that's how it's done? Really.... that's how we build strings in 2007?
You ever heard of String.Format or StringBuilder?
prasadbuddhika wrote: i use sql server login
So you make an account in SQL Server for ever one of your users?
|
|
|
|
|
Hi,
i am working in windows application of C#
i am using hash table.
i want to add data to hash table from datatable named DTSchool. I have a school name in combobox. when iselect school in combo it takes the curresponding SchoolID from the datatable
i want to know how to write code for that. i wrote like this
List.Add(SchoolDT.Rows[cboSchool.SelectedIndex]["SchoolID"],cboSchool.Text.ToString());
.But it is not taking value from datatable.Please help me regarding this problem?
|
|
|
|
|
I doubt this is a syntax problem. If it was the compiler would be complaining. You have a run time error.
sajin85 wrote: cboSchool.Text.ToString()
Why are you calling ToString() on something that is already a string?
Are the rows in the DataTable order the same way as the items in the combo box?
|
|
|
|
|
Hi,
Are you sure the indexes of the items in your combobox matches the row indexes in your datatable?
Maybe posting a little bit more code might help to tackle your problem.
Mark
|
|
|
|
|
Hi
Anyone who knows how to add filetype programmatically in media player ?
For instance: The player accept .wav but i wish to set the player so it also accept .mp3, programmatically.
Any ideas ?
I tried msdn but dont find anything
With regards
Heino
|
|
|
|
|
Do you mean create a file association so that when you double click on an mp3 it opens with WMP11? If so, that requires some registry hacking - check here[^]; this article simplifies things a bit by providing a wrapper for the registry nastiness
|
|
|
|
|
Hmmmm....maybe.
What i meant is that if you start WMP from startmenu then you have the chance to set filetype by going thru the menu: TOOLS > OPTION and then the tab FILE TYPES.
Yes...so maybe this should do it then
I will give it a try.
Thanks for your help
Heino
|
|
|
|
|
hi there,
i m trying to find string but its irritating me, dont working as i want
i dont know where i did mistake,here is the codes
int isthere = -1;
int quan = 0;
int[] selectedindxes = new int[subtypeCmb.Items.Count];
int check = -1;
for (int a = 0; a < subtypeCmb.Items.Count; a++)
{
check = -1;
check = subtypeCmb.FindStringExact("ABC", isthere);
if (check != -1)
{
isthere = subtypeCmb.FindString("ABC", isthere);
selectedindxes[quan] = isthere;
quan++;
}
}
"ABC" is on 3rd item of combobox and 'check' is always 2, however its assigning -1 in every loop
the no of "ABC" item in combobox is 1, so 'quan' should be 1, but it always show 8 as total items in combobox is 8
can someone tell me where is mistake
i tried it with all ways i can but problem persist
Becoming Programmer...
|
|
|
|
|
Hi,
why do you need a for loop?
You search the ComboBox by just calling FindStringExact, and it finds one occurence.
You repeat it 8 times, so you find the same thing 8 times...
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
i m using loop because i want to search all items in the combobox named "ABC"
i put 'quan' to get the number of items find in the combobox
i got another way to do that what i want but the findstring method not working correctly with overload of 'startposition'
Becoming Programmer...
|
|
|
|
|
Hi,
as I said you don't need the for loop, and you don't need subtypeCmb.Items.Count
if you want to find all occurences, what you need is a while loop ("while there is more")
based on the correct use of FindStringExact and startIndex. I suggest you reread the MSDN
page on FindStringExact
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I need sugge./ advice for video processing for bleow requirement
Person or object will be selected in the first frame of video sequence
manually by mouse. Now the selected object/persion should be segmented in
rest of the frames by the algorithm/porgram.
any souce code/algorithm/ links / suggestion are greatly appericated
Thanks in advance
->electron
|
|
|
|