public static void AddNewRole(int application, string name, string description) { try { ERP_Role newRole = new ERP_Role(); newRole.role = name; newRole.application_id = application; newRole.description = description; newRole.modified_by = AppData.CurrentUser.id; newRole.created_at = DateTime.Now; newRole.updated_at = DateTime.Now; Database.ERP.ERP_Roles.InsertOnSubmit(newRole); Database.ERP.SubmitChanges(); } catch (Exception ex) { LogUtil.LogError("Users", "AddNewRole", ex); } }
partial void DeleteERP_Role(ERP_Role instance);
partial void InsertERP_Role(ERP_Role instance);
partial void UpdateERP_Role(ERP_Role instance);
private void detach_ERP_Roles(ERP_Role entity) { this.SendPropertyChanging(); entity.ERP_Application = null; }