Skip to content

Commit

Permalink
Merge pull request #57 from aronhr/Add-Staff-Name-To-Kvittun
Browse files Browse the repository at this point in the history
Add staff name to kvittun
  • Loading branch information
aronhr authored May 11, 2017
2 parents 5c35011 + 0c665ee commit 15d5d3c
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 4 deletions.
1 change: 1 addition & 0 deletions Forrit/Client/Client/ApiHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public class Product
public string Magn { get; set; }
public int Verd { get; set; }
public string Kassakerfi { get; set; }
public string Staff { get; set; }
public override string ToString()
{
return Name + " " + Verd.ToString();
Expand Down
32 changes: 31 additions & 1 deletion Forrit/Client/Client/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 35 additions & 3 deletions Forrit/Client/Client/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,36 @@ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
case Keys.NumPad9:
num_Button_Click(button9, new System.EventArgs());
break;
case Keys.D0:
num_Button_Click(button0, new System.EventArgs());
break;
case Keys.D1:
num_Button_Click(button1, new System.EventArgs());
break;
case Keys.D2:
num_Button_Click(button2, new System.EventArgs());
break;
case Keys.D3:
num_Button_Click(button3, new System.EventArgs());
break;
case Keys.D4:
num_Button_Click(button4, new System.EventArgs());
break;
case Keys.D5:
num_Button_Click(button5, new System.EventArgs());
break;
case Keys.D6:
num_Button_Click(button6, new System.EventArgs());
break;
case Keys.D7:
num_Button_Click(button7, new System.EventArgs());
break;
case Keys.D8:
num_Button_Click(button8, new System.EventArgs());
break;
case Keys.D9:
num_Button_Click(button9, new System.EventArgs());
break;
default:
break;
}
Expand Down Expand Up @@ -183,6 +213,7 @@ private void buttonListDel_Click(object sender, EventArgs e)
}
ReiknaSamtals();
}

int samtals = 0;
private void ReiknaSamtals()
{
Expand All @@ -191,7 +222,7 @@ private void ReiknaSamtals()
{
samtals += p.Verd;
}
labelSamtals.Text = "Samtals " + samtals;
labelSamtals.Text = "Samtals: " + samtals;
}

private void buttonReidufe_Click(object sender, EventArgs e)
Expand All @@ -210,9 +241,12 @@ private void SaveKvittun()
listBox.Items.Clear();
ReiknaSamtals();
}

private string GetListText()
{
StringBuilder builder = new StringBuilder();
string Staff = textBox1.Text;
builder.AppendFormat("Starfsmaður: {0}", Staff).AppendLine();
builder.AppendLine("---------------");
foreach (Product product in listBox.Items)
{
Expand All @@ -222,7 +256,5 @@ private string GetListText()
builder.AppendFormat("\t\t{0}", samtals);
return builder.ToString();
}


}
}
1 change: 1 addition & 0 deletions Forrit/RetailServer/ServiceDesk/ApiHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ public class Product
public string Magn { get; set; }
public string Verd { get; set; }
public string Kassakerfi { get; set; }
public string Staff { get; set; }
}
}

0 comments on commit 15d5d3c

Please sign in to comment.