Hello,
If you want set the 4 text box values depending on the selection using code follow this steps.
Insert onAfterChange event for dropdown field.
In onAfterChange event you have to write the below code,
string dropdownValue = e.site.Value;
//Secondary DOM is contains of text box values
//Get the textbox1 value form secondary dom
string textbox1Value = secondaryDOM.selectSingleNode(string.Format("<XPath of your field>", dropdownValue));
//Setting the value to text box1
XDocument.DOM.selectSingleNode("<XPath of textbox1>").text = textbox1Value;
Note: Like this you can write for 4 text box values.