Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9069

Re: Updating UDT Field "Name" DI API C#

$
0
0

Hi Peter,

 

UDO Table Insert Update Delete DI API Example source

 

CompanyService oCompanyService = oCompany.GetCompanyService();
GeneralService oGeneralService = oCompanyService.GetGeneralService("UDO_Name");

//GeneralDataParams oGeneralParams = (GeneralDataParams)oGeneralService.GetDataInterface(GeneralServiceDataInterfaces.gsGeneralDataParams);
GeneralDataParams oGeneralParams = null;

oGeneralParams = (GeneralDataParams)oGeneralService.GetDataInterface(GeneralServiceDataInterfaces.gsGeneralDataParams);

//Create data for new row in main UDO
GeneralData oUDO_Name = (GeneralData)oGeneralService.GetDataInterface(GeneralServiceDataInterfaces.gsGeneralData);

string sCode = "A01";

string sName = "Test Name";

string sRemark = "Test_Remark";

string sActiveYN = "Y";

 

// Add
oUDO_Name.SetProperty("Code", sCode);
oUDO_Name.SetProperty("Name", sName);
oUDO_Name.SetProperty("U_Remark", sRemark);
oUDO_Name.SetProperty("U_ActiveYN", sActiveYN);
oGeneralService.Add(oUDO_Name);

 

//Update

oUDO_Name.SetProperty("Code", sCode);
oUDO_Name.SetProperty("Name", sName);
oUDO_Name.SetProperty("U_Remark", sRemark);
oUDO_Name.SetProperty("U_ActiveYN", sActiveYN);
oGeneralService.Update(oUDO_Name);

//Delete
oGeneralParams.SetProperty("Code", sCode);
oGeneralService.Delete(oGeneralParams);

 

 

I do not know the answer to questions.


Viewing all articles
Browse latest Browse all 9069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>