var val = rdr.GetValue(0);DateTime dt = DateTime.Parse(val.ToString());
feildValue = dt.ToString("hh:mm tt");
Monday, March 26, 2012
Wednesday, December 14, 2011
Opening a PDF File.
string path = Environment.CurrentDirectory + "\\" + UserMessageStrings.HelpFile;
Process.Start(path);
Process.Start(path);
Labels:
Windows.NET
Transactions
using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
{
//your insert/delete/update here.
ts.Complete();
}
Note: If any operation fails then it will rollback automatically.
{
//your insert/delete/update here.
ts.Complete();
}
Note: If any operation fails then it will rollback automatically.
Labels:
C#.NET
Binding to a DataSource Controls.
Binding to a Datasource Controls
-----------------------------------
Dictionary<int, string> source= PetDataAccess.GetStateByCountryId(stateId);
comboBox.DataSource = new BindingSource(breeds, null); comboBox.DisplayMember = "value";
comboBox.ValueMember = "key";
-----------------------------------
Dictionary<int, string> source= PetDataAccess.GetStateByCountryId(stateId);
comboBox.DataSource = new BindingSource(breeds, null); comboBox.DisplayMember = "value";
comboBox.ValueMember = "key";
Labels:
Windows.NET
Subscribe to:
Posts (Atom)