Guys, help me figure it out. deadlines are running out ... there is a protected virtual string method ParseCustomCustomerAttributes (FormCollection fo

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 3 ans
Guys, help me figure it out. deadlines are running out ... there is a protected virtual string method ParseCustomCustomerAttributes (FormCollection form)
how can I check attribute fields in code, for example by its id. and for a specific field to perform certain logic?

  if (attribute.Id == 18)
   {
         string code_1 = enteredText;
       if (attribute.Id == 18)
      {
         string code_1 = enteredText;
...
if (lines.All(item => item != code_1))
                                    {
                                        break;
                                    }
...
                                if (attribute.Id == 15)
                                {
                                    string code_2 = enteredText;

if (lines.All(item => item != code_2))
                                    {
                                        break;
                                    }
As soon as I enter the value in the second field, the first field is not saved!
Thanks!
Il y a 3 ans
There reference to enteredText is here
 
    case AttributeControlType.MultilineTextbox:
...
        var enteredText = ctrlAttributes.ToString().Trim();


But regarding your "lines.All ... second field ... first field" , we have no clue what you are trying to do.  
Step through the code with the debugger.
Il y a 3 ans
New York wrote:
There reference to enteredText is here
 
    case AttributeControlType.MultilineTextbox:
...
        var enteredText = ctrlAttributes.ToString().Trim();


But regarding your "lines.All ... second field ... first field" , we have no clue what you are trying to do.  
Step through the code with the debugger.


but how can I understand that the text was entered from a specific attribute, and if my condition for this attribute is fulfilled, save only it, and not all attributes in the loop
Il y a 3 ans
You have
attribute.Id
enteredText
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.