|
Dear Used The Stored Procedure or View For Multiple Tables Data In One RecordSet
|
|
|
|
|
I am now developing a mobile application using Mobile Client Software Factory and c#. Currently what i need to do is, I have a screen where it have a choice of events, I will have a button where it will add the event from the system to the calendar that build in with mobile application and this will be the reminder.
Can i know whether this can be done?
Thanks.
|
|
|
|
|
Hello Friends
i Have 2 text box
both have validation on validated event
it work well but
when user open form & direct press close button of form
validate event fired first so , how i can prevent this validtion.
|
|
|
|
|
PriteshMalvan wrote: both have validation on validated event
When are you firing this event ? i think you are doing on pageload ..
Fire this event on submit button click if you have
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Sandeep it is not related to pageload event. What exactly is happening is that when the user clicks on the close since all the validators are on so it fires the validation. So to avoid this you need to use the causevalidation property of the control. Set to false and things are done for you.
|
|
|
|
|
i thought that he has written some javascript validation in some event
i never made CausesValidation to true that might be reason
Any way Thanks for showing right path
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
You set the causevalidation property of the close button to false and it will work for you.
|
|
|
|
|
I think you are checking a null or empty value in your validation event. You should skip validation if the text is empty. Or you can add a bool _isClosing = false variable to your class and set it to true on Form.Vlosing event, then skip validation in your textboxes' validation event if _isClosing is true. Hope this helps.
|
|
|
|
|
Send the piece of code.
As i guess, your textboxes are empty when the use clicks close(X sign on to Form Titlebar) validation fails because you validate if the text entered in the textbox is empty or not, if empty fail the validation which vauses form to give focus to this textbox back instead of closing.
|
|
|
|
|
hi i am using remoting on c#.net window application trying to pass 1 int value to the server thru the network.
i have decided to use remoting but i feel that there is some limitation to it that dont fit what i need please advice me pls.
(i will post my test program below)
firstly i realise that when the client connect to the server the client just create an instance with the server's class and not actually passing any value over to the server...
secondly i cant find a way for the server to react when the client pass some values to it.
the class object:
<br />
namespace ClassLibrary1<br />
{<br />
public class Class1 : MarshalByRefObject<br />
{<br />
string aa;<br />
public Class1()<br />
{<br />
aa = "55"; <br />
}<br />
public string abc(string ab)<br />
{<br />
<br />
return (ab + aa);<br />
}<br />
}<br />
}
server:
private void Form1_Load(object sender, EventArgs e)<br />
{<br />
TcpChannel channel = new TcpChannel(8080);<br />
ChannelServices.RegisterChannel(channel);<br />
<br />
RemotingConfiguration.RegisterWellKnownServiceType(<br />
typeof(ClassLibrary1.Class1),<br />
"HelloWorld",<br />
WellKnownObjectMode.SingleCall);<br />
}
client:
private void Form1_Load(object sender, EventArgs e)<br />
{<br />
<br />
TcpChannel chan = new TcpChannel();<br />
ChannelServices.RegisterChannel(chan);<br />
<br />
ClassLibrary1.Class1 obj = (ClassLibrary1.Class1)Activator.GetObject(<br />
typeof(ClassLibrary1.Class1),<br />
"tcp://localhost:8080/HelloWorld");<br />
<br />
string lala = obj.abc("kings");<br />
label1.Text = lala;<br />
<br />
}
|
|
|
|
|
What is the issue you are facing?
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
i found that i made a mistake while understanding the theory of remoting
|
|
|
|
|
i am using foreach statement to read all the strings in a string array but while reading all the time it is showing System.Data.DataRow in the string identifier
here is code which is giving the above specified problem:
string[] fileidentifiers = ReturnFileIdentifiers();
foreach (string identifier in fileidentifiers)
if (identifier == fileidentifier)
|
|
|
|
|
Does ReturnFileIdentifiers() do what it's supposed to do?
/ravi
|
|
|
|
|
Yes it is returning all the strings properly.
|
|
|
|
|
i tried with your code but its working.
i am pasting the code here please update
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace testApp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private string[] ReturnFileIdentifiers()
{
string[] sample = { "sujith", "syam", "tharun" };
return sample;
}
private void button1_Click(object sender, EventArgs e)
{
string fileidentifier = "sujith";
string[] fileidentifiers = ReturnFileIdentifiers();
foreach (string identifier in fileidentifiers)
if (identifier == fileidentifier)
{
MessageBox.Show("hi" + fileidentifier);
}
}
}
}
My small attempt...
|
|
|
|
|
Then you're returning a collection of DataRows and you need to pull out the values that you need.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
You have a collection of data rows. Do a foreach that recognises this fact. You can get items out of a data row by index or by name, using array notation.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello,
Try to use a for loop, with an indexer!
for(int x=0;x < fileidentifiers.Length; x++)
{
string actIdentifier = fileidentifiers[x] as string;
if(actIdentifier.Equals(fileidentifier)
{
}
}
Hope it helps!
All the best,
Martin
|
|
|
|
|
Even this is not working by the way my ReturnFileIdentifiers code would be below
string[] ReturnFileIdentifiers()
{
using (OleDbConnection connection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\\Warehouses_older\\Sample1_cat61.mdb"))
{
OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT MD_Metadata.FileIdentifier FROM MD_Metadata", connection);
DataTable FileIDs = new DataTable();
adapter.Fill(FileIDs);
string[] fileids = new string[FileIDs.Rows.Count];
for (int i = 0; i < FileIDs.Rows.Count; i++)
fileids[i] = FileIDs.Rows[0].ToString();
return fileids;
}
}
|
|
|
|
|
kalaveer wrote: fileids[i] = FileIDs.Rows[0].ToString();
The ToString method of DataRow is inherited from the Object class, and returns the name of the data type.
What is is that you are trying to read from the data table?
---
single minded; short sighted; long gone;
|
|
|
|
|
But while debugging fileids contents are the string values of that perticual field contents which i queried using oledb command.
|
|
|
|
|
The debugger is showing you the contents of the rows.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I think you whant to return the Item (FileIDs.Rows[0].Item) from the DataRow class.
Don't you?
|
|
|
|