public AddPayroll(DAL.UserModel user, string Conn) { InitializeComponent(); if (string.IsNullOrEmpty(Conn)) { throw new ArgumentNullException("connection"); } connection = Conn; de = new DataEntry(connection); db = new SBPayrollDBEntities(connection); rep = new Repository(connection); _User = user; }
public Payrolls(MainForm f, string Conn) { InitializeComponent(); if (string.IsNullOrEmpty(Conn)) { throw new ArgumentNullException("connection"); } connection = Conn; de = new DataEntry(connection); db = new SBPayrollDBEntities(connection); rep = new Repository(connection); MainForm = f; user = f.LoggedInUser; }