Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. public void AddLine(int parentID, HeadDTO headDTO) {
  2.  
  3. Head line = new Head();
  4. line.Description = headDTO.Description;
  5. line.Min = headDTO.Min;
  6. line.Exp = headDTO.Exp;
  7. line.Max = headDTO.Max;
  8. line.Median = ((line.Min + (3 * line.Exp) + line.Max) / 5.0);
  9. line.StdDev = (line.Max - line.Min) / 5;
  10. line.PValue = Math.Pow((double)line.StdDev, 2);
  11. line.IsLine = parentID;
  12. line.Owner = headDTO.Owner;
  13. line.TeamId = headDTO.TeamId;
  14. try {
  15. db.Heads.InsertOnSubmit(line);
  16. db.SubmitChanges();
  17. } catch { } /*what error??*/
  18. UpdateParent(GetHeadDetails(parentID));
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement