private void reloadgrid(object sender, EventArgs e) { DataSources.refreshEmployeeList(); this.employees = DataSources.EmployeeCopy.ToList(); employeeview.Source = this.employees; this.mangaEmployeegrid.Items.Refresh(); }
partial void InsertEmployee(Employee instance) { string msg = verifyEmployee(instance); DataSources.refreshEmployeeList(); if ((DataSources.EmployeeCopy.FindAll(x => x.EMPCode == instance.EMPCode || x.UserName == instance.UserName)).Count > 0) { msg += "Username and employee code must be unique \n"; } if (msg != "") { throw new System.Exception(msg); } this.ExecuteDynamicInsert(instance); }
private void ReloadEmployeeGrid_Click(object sender, RoutedEventArgs e) { DataSources.refreshEmployeeList(); this.employees = DataSources.EmployeeCopy; employeeview.Source = this.employees; }