15,917,454 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by SandhyaPillai (Top 10 by date)
SandhyaPillai
18-Jan-13 13:47pm
View
yep :) seconds mount up to min.
waiting for others input........thank you very much.
SandhyaPillai
18-Jan-13 11:44am
View
For a single agency method takes only few seconds to get the required result. Method has a complicated business logic, inspite of that it takes only few seconds.
Method is faster, no doubt. Now the quesyion is how I can improve the timing if multiple agencies are selected? User can select 1 to all (500 + agencies). Problem arises if they choose to get data for all. I am running on .net3.5, parallel class is not an option. I was just reading up on that since another developer suggested that. Looks like it is available oly in 4.
There is no requirement forcing me to use multithreading, neither I know much about it. I am just looking for the right approach.
SandhyaPillai
5-Dec-12 16:06pm
View
Thank you very much :)
SandhyaPillai
5-Dec-12 15:52pm
View
oops my mistake.......
modified interface as follows.....
public interface IGOS
{
string GOS_Seq { get; set; }
string Rec1_Amount { get; set; }
string Rec2_Amount { get; set; }
}
It works but I added only elements I need. Should I add all common elements from
GOSMOFAmount , GOSFTEPositions classsomething as follows: public interface IGOS { string GOS_Seq { get; set; } string Bud_Amount { get; set; } string Rec1_Amount { get; set; } string Rec2_Amount { get; set; } }
SandhyaPillai
5-Dec-12 15:11pm
View
can u give a code sample?
I created IGOS interface as follows
public interface IGOS{}
added inheritance to the classes
public class GOSMOFAmount :IGOS
public class GOSOOEAmount :IGOS
then defined following method
private static List<t> RemUnwantedRows<t>(List<t> lstData) where T: IGOS
But inside the method, when i do the following, it gives error
"T does not contain definition for Rec1_Amount "
lstfoundEmpty = lstData.FindAll(c =>
c.Rec1_Amount == "0" &&
c.Rec1_Amount == "0");
SandhyaPillai
5-Dec-12 14:10pm
View
Here is the scenario.
I created 2 classes as follows
public class GOSFTEPositions
{
public string GOS_Seq { get; set; }
public string Bud_Amount { get; set; }
public string Rec1_Amount { get; set; }
public string Rec2_Amount { get; set; }
public string Sequence { get; set; }
}
public class GOSMOFAmount
{
public string GOS_Seq { get; set; }
public string MOF_Code { get; set; }
public string Bud_Amount { get; set; }
public string Rec1_Amount { get; set; }
public string Rec2_Amount { get; set; }
public string Rider_Code { get; set; }
}
Then wrote a method but with different parameter
private static List<gosmofamount> RemoveUnwantedRows(List<gosmofamount> lstData)
private static List<gosftepositions> RemoveUnwantedRows(List<gosftepositions> lstData)
I may have to do the same with different List<t> too, hence looking for generic.
What would be the best way?
SandhyaPillai
5-Dec-12 14:08pm
View
Here is the scenario.
I created 2 classes as follows
public class GOSFTEPositions
{
public string GOS_Seq { get; set; }
public string Bud_Amount { get; set; }
public string Rec1_Amount { get; set; }
public string Rec2_Amount { get; set; }
public string Sequence { get; set; }
}
public class GOSMOFAmount
{
public string GOS_Seq { get; set; }
public string MOF_Code { get; set; }
public string Bud_Amount { get; set; }
public string Rec1_Amount { get; set; }
public string Rec2_Amount { get; set; }
public string Rider_Code { get; set; }
}
Then wrote a method but with different parameter
private static List<gosmofamount> RemoveUnwantedRows(List<gosmofamount> lstData)
private static List<gosftepositions> RemoveUnwantedRows(List<gosftepositions> lstData)
I may have to do the same with different List<t> too, hence looking for generic.
What would be the best way?
SandhyaPillai
5-Dec-12 13:32pm
View
I tried as follows, but how do u specify multiple ones for T?
private static List<t> RemoveUnwantedRows<t>(List<t> lstData) where T: GOSMOFAmount, GOSFTEPositions
SandhyaPillai
8-Nov-12 8:34am
View
no
SandhyaPillai
7-Nov-12 9:51am
View
I do not like the way it is and I try telling that httpcontext shouldn't be used outside the web app. but opposition is asking for a proof. even if you are aware of any msdn web site please let me know. by then way......
Code is modified so that it can be accessed by both windows & web app
Public ReadOnly Property AgencyCode() As Integer
Get
If clsAppInfo.IsWebApplication Then
If (HttpContext.Current.Session(_AgencyCodeKey) Is Nothing) Then
Return 0
Else
Return HttpContext.Current.Session(_AgencyCodeKey)
End If
Else
Return AgencyCodeWIN
End If
End Get
End Property
/****** For windows Agency Code is declared as shared
Public Shared Property AgencyCodeWIN() As Integer
Get
Return _AgencyCodeWIN
End Get
Set(ByVal value As Integer)
_AgencyCodeWIN = value
End Set
End Property
/************
To determine whether it is a web app or not .......
Public Shared ReadOnly Property IsWebApplication() As Boolean
Get
If AppCodeWIN IsNot String.Empty Then
'Desk top App is required to pass AppInfo
Return False
Else
'Web App is default
Return True
End If
End Get
End Property
Show More