Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i have the following criteria and i want to write a method please help me any one.
Method name: GetEvalTypeByEvalCode<br />
    Parameter: string evalCode<br />
    Return Type: string<br />
    Attribute: [MapperFunction(Constants.AppID.ALL, "GetEvalTypeByEvalCode")]


Logic:

Get value from EVAL_TYPE@LU_EEN_DETAILS with criteria EEN_NO = evalCode
for this i wrote the method like:
C#
[MapperFunction(Constants.AppID.ALL,"GetEvalTypeByEvalCode"]
      public string GetEvalTypeByEvalCode(string evalCode)
      {
          string query = string.Format("SELECT EVAL_TYPE FROM [LU_EEN_DETAILS] WITH (NOLOCK) WHERE EEN_NO ={0}", evalCode);
          return query;
      }

please help me the corrections..

Many thanks,
KPR
Posted
Updated 15-Jul-13 20:11pm
v2
Comments
berrymaria 16-Jul-13 1:57am    
Does it work?
KPrao82 16-Jul-13 2:08am    
no.. so please help me to write the exact qurey and return type..

many thanks,
lpr

1 solution

Try like this:

C#
string query = string.Format("SELECT EVAL_TYPE FROM [LU_EEN_DETAILS] WHERE EEN_NO ='{0}'", evalCode);
 
Share this answer
 
Comments
KPrao82 16-Jul-13 2:33am    
thank you very much..

can u please help me for the following criteria.

Method name: GetFamilyByModelCCC
Parameter: string lineNo
Return Type: string
Attribute: [MapperFunction(Constants.AppID.ALL, "GetFamilyByModelCCC")]
Logic:
* Get value from MODELCCC@LU_INV_LOC. Criteria: TESTER_ID = lineNo
* Get value from PRODUCT_FAMILY@LU_FAMILY.
Criteria:
If length of MODELCCC value <= 3, criteria: CACHE_FAMILY = MODELCCC.
If length of MODELCCC value > 3, criteria: CACHE_FAMILY = [cache family value from ModelCCC]
Example of MODELCCC value:
- A1Y  length <= 3; cache family=A1Y
- WD9001BKHG-12D22V1 3; cache family=D22
- WD5000AAKX-083CA1 > 3; cache family=3C

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900