I need your help once more. My if/else statment isn't working at all. I tried to do everything and look up at the code for the errors and didn't find any errors, or maybe I couldn't see any errors on it.
I used in VEntradas Form:
private string entrada;
public string entradas {
get { return entrada; }
set { entrada = value; }
}
I used this so I can pick the value from workgroup textbox that is at Form1.
Also in VEntradas Form I put the following:
if (entrada == "Marketing")
{
nDoc.Visible = false;
button1.Visible = false;
label1.Text = "Não tens acesso à edição de entradas.";
}
else
{
nDoc.Visible = true;
button1.Visible = true;
nDoc.Enabled = true;
button1.Enabled = true;
label1.Text = "";
}
Even with this, the if/else statment isn't working and in "Marketing" value of workgroup textbox (Form1) it appears the buttons and shouldn't appear... Anyone can help me with it?
When I run this inside at the form itself VEntradas it only runs the if statment and it runs for both of values "Marketing" and "Wharehouse" and I want to make it work only for "Marketing" the if statment while the else stament is for "Wharehouse"