lr_save_datetime

lr_save_datetime: assigns the current date and time to a parameter.

 

void lr_save_datetime(const char *format, int offset, const char *name);

 

lr_save_datetime retrieves tomorrow's date:

lr_save_datetime("Tomorrow is %B %d %Y", DATE_NOW + ONE_DAY, "next");
lr_output_message(lr_eval_string("{next}"));
If today is January 7th, 1999, these lines will return the message: Tomorrow is January 08 1999.

 

Following is one example to use lr_save_datetime to create unique parameters in my code.

Action()
{

lr_save_datetime("testSales%Y%m%d%H%M%S",TIME_NOW,"accountValue");

lr_output_message(lr_eval_string("Value={accountValue}"));

lr_start_transaction("CreateNewSales");

web_submit_data("user_management.do",
"Action=http://192.168.19.13/discountmgmttool/user_management.do?execution=e3s1",
"Method=POST",
"RecContentType=text/xml",
"Referer=http://192.168.19.13/discountmgmttool/user_management.do?execution=e3s1",
"Snapshot=t4.inf",
"Mode=HTML",
"EncodeAtSign=YES",
ITEMDATA,
"Name=AJAXREQUEST", "Value=_viewRoot", ENDITEM,
"Name=create_new_profile_form:account", lr_eval_string("Value={accountValue}"), ENDITEM,
"Name=create_new_profile_form:user_name", lr_eval_string("Value={accountValue}"), ENDITEM,
"Name=create_new_profile_form:user_email", lr_eval_string("Value={accountValue}@xxx.com"), ENDITEM,
"Name=create_new_profile_form:user_roles", "Value=ROLE_SALES", ENDITEM,
"Name=create_new_profile_form:user_title", "Value=Sales", ENDITEM,
"Name=create_new_profile_form:user_leader", "Value={testLeaderId}", ENDITEM,
"Name=create_new_profile_form_SUBMIT", "Value=1", ENDITEM,
"Name=javax.faces.ViewState", "Value={Siebel_Analytic_ViewState2}", ENDITEM,
"Name=create_new_profile_form:save_my_profile_btn", "Value=create_new_profile_form:save_my_profile_btn", ENDITEM,
LAST);

lr_end_transaction("CreateNewSales",LR_AUTO);

return 0;

}

 

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页