Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Also, connection, commandcommand and reader should be disposed

Also, connection, command and reader should be disposed

Also, connection, command and reader should be disposed

fixed code spacing so all code is included, and to make 6 character minimum I've spelled out EF
Source Link
Pimgd
  • 22.6k
  • 5
  • 68
  • 144
private Label getRequiredLabel(int i, bool isRequired)  {  Label L = new Label(); if (isRequired)   L.Text = Name + "*"; else   L.Text = Name; L.Name = "L" + i; L.AutoSize = true; L.TextAlign = ContentAlignment.MiddleLeft; L.Visible = true; L.Font = new Font("Microsoft Sans Serif", 8); L.Dock = DockStyle.Fill; L.Margin = new Padding(0, 3, 0, 3); if (!_labels.Contains(L)) { _labels.Add(L); L.MouseUp += new MouseEventHandler(wl_Lock); } Form_Grid.Controls.Add(L, 0, i + 1); Form_Grid.RowStyles[i + 1].SizeType = SizeType.AutoSize; } 
private Label getRequiredLabel(int i, bool isRequired) { Label L = new Label(); if (isRequired) L.Text = Name + "*"; else L.Text = Name; L.Name = "L" + i; L.AutoSize = true; L.TextAlign = ContentAlignment.MiddleLeft; L.Visible = true; L.Font = new Font("Microsoft Sans Serif", 8); L.Dock = DockStyle.Fill; L.Margin = new Padding(0, 3, 0, 3); if (!_labels.Contains(L)) { _labels.Add(L); L.MouseUp += new MouseEventHandler(wl_Lock); } Form_Grid.Controls.Add(L, 0, i + 1); Form_Grid.RowStyles[i + 1].SizeType = SizeType.AutoSize; } 
private Label getRequiredLabel(int i, bool isRequired)  {  Label L = new Label(); if (isRequired)   L.Text = Name + "*"; else   L.Text = Name; L.Name = "L" + i; L.AutoSize = true; L.TextAlign = ContentAlignment.MiddleLeft; L.Visible = true; L.Font = new Font("Microsoft Sans Serif", 8); L.Dock = DockStyle.Fill; L.Margin = new Padding(0, 3, 0, 3); if (!_labels.Contains(L)) { _labels.Add(L); L.MouseUp += new MouseEventHandler(wl_Lock); } Form_Grid.Controls.Add(L, 0, i + 1); Form_Grid.RowStyles[i + 1].SizeType = SizeType.AutoSize; } 
fixed code spacing so all code is included, and to make 6 character minimum I've spelled out EF
Source Link

private Label getRequiredLabel(int i, bool isRequired) { Label L = new Label();

private Label getRequiredLabel(int i, ifbool (isRequired) { Label L = new Label();  if (isRequired)  L.Text = Name + "*"; else   L.Text = Name; L.Name = "L" + i; L.AutoSize = true; L.TextAlign = ContentAlignment.MiddleLeft; L.Visible = true; L.Font = new Font("Microsoft Sans Serif", 8); L.Dock = DockStyle.Fill; L.Margin = new Padding(0, 3, 0, 3); if (!_labels.Contains(L)) { _labels.Add(L); L.MouseUp += new MouseEventHandler(wl_Lock); } Form_Grid.Controls.Add(L, 0, i + 1); Form_Grid.RowStyles[i + 1].SizeType = SizeType.AutoSize; } 

}

Reading your question also made me curious about Entity Framework (EF) and MySql. It looks like they can be used together.

private Label getRequiredLabel(int i, bool isRequired) { Label L = new Label();

 if (isRequired) L.Text = Name + "*"; else   L.Text = Name; L.Name = "L" + i; L.AutoSize = true; L.TextAlign = ContentAlignment.MiddleLeft; L.Visible = true; L.Font = new Font("Microsoft Sans Serif", 8); L.Dock = DockStyle.Fill; L.Margin = new Padding(0, 3, 0, 3); if (!_labels.Contains(L)) { _labels.Add(L); L.MouseUp += new MouseEventHandler(wl_Lock); } Form_Grid.Controls.Add(L, 0, i + 1); Form_Grid.RowStyles[i + 1].SizeType = SizeType.AutoSize; 

}

Reading your question also made me curious about EF and MySql. It looks like they can be used together.

private Label getRequiredLabel(int i, bool isRequired) { Label L = new Label();  if (isRequired)  L.Text = Name + "*"; else L.Text = Name; L.Name = "L" + i; L.AutoSize = true; L.TextAlign = ContentAlignment.MiddleLeft; L.Visible = true; L.Font = new Font("Microsoft Sans Serif", 8); L.Dock = DockStyle.Fill; L.Margin = new Padding(0, 3, 0, 3); if (!_labels.Contains(L)) { _labels.Add(L); L.MouseUp += new MouseEventHandler(wl_Lock); } Form_Grid.Controls.Add(L, 0, i + 1); Form_Grid.RowStyles[i + 1].SizeType = SizeType.AutoSize; } 

Reading your question also made me curious about Entity Framework (EF) and MySql. It looks like they can be used together.

Source Link
Alexei
  • 1.8k
  • 1
  • 14
  • 34
Loading